Browse code

Update WALinuxAgent to 2.2.22, make cloud-init provisioning default

Change-Id: I29239d522c2dff81f12781ca7a3e30503df9ff4b
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/4841
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Sharath George

suezzelur authored on 2018/03/01 10:39:14
Showing 2 changed files
... ...
@@ -1,13 +1,13 @@
1 1
 Name:           WALinuxAgent
2 2
 Summary:        The Windows Azure Linux Agent
3
-Version:        2.2.14
4
-Release:        2%{?dist}
3
+Version:        2.2.22
4
+Release:        1%{?dist}
5 5
 License:        Apache License Version 2.0
6 6
 Group:          System/Daemons
7 7
 Url:            https://github.com/Azure/WALinuxAgent
8 8
 Source0:        %{name}-%{version}.tar.gz
9 9
 Patch0:         photondistroadd.patch
10
-%define sha1 WALinuxAgent=f417009479ea7168ee0f2daa38328c167b4f874b
10
+%define sha1 WALinuxAgent=e8389d8f5982df5d8d59f7475df22d87c5f4d031
11 11
 Vendor:		VMware, Inc.
12 12
 Distribution:	Photon
13 13
 
... ...
@@ -39,7 +39,7 @@ VMs in the Windows Azure cloud. This package should be installed on Linux disk
39 39
 images that are built to run in the Windows Azure environment.
40 40
 
41 41
 %prep
42
-%setup -q -n WALinuxAgent-2.2.14
42
+%setup -q -n %{name}-%{version}
43 43
 %patch0 -p1
44 44
 
45 45
 %pre -p /bin/sh
... ...
@@ -78,6 +78,8 @@ python2 setup.py check && python2 setup.py test
78 78
 /usr/lib/python2.7/site-packages/*
79 79
 
80 80
 %changelog
81
+* Wed Feb 28 2018 Anish Swaminathan <anishs@vmware.com> 2.2.22-1
82
+- Update to 2.2.22
81 83
 * Mon Sep 18 2017 Alexey Makhalov <amakhalov@vmware.com> 2.2.14-2
82 84
 - Requires /bin/grep, /bin/sed and util-linux or toybox
83 85
 * Thu Jul 13 2017 Anish Swaminathan <anishs@vmware.com> 2.2.14-1
... ...
@@ -1,6 +1,6 @@
1
-diff -rupN WALinuxAgent-2.2.14-old/azurelinuxagent/common/osutil/factory.py WALinuxAgent-2.2.14/azurelinuxagent/common/osutil/factory.py
2
-+++ WALinuxAgent-2.2.14/azurelinuxagent/common/osutil/factory.py	2017-07-18 13:22:05.614854350 -0700
1
+diff -rupN WALinuxAgent-2.2.22/azurelinuxagent/common/osutil/factory.py WALinuxAgent-2.2.22-new/azurelinuxagent/common/osutil/factory.py
2
+--- WALinuxAgent-2.2.22/azurelinuxagent/common/osutil/factory.py	2018-02-12 11:55:45.000000000 -0800
3 3
 @@ -21,6 +21,7 @@ from azurelinuxagent.common.version impo
4 4
  from .default import DefaultOSUtil
5 5
  from .arch import ArchUtil
... ...
@@ -9,19 +9,19 @@ diff -rupN WALinuxAgent-2.2.14-old/azurelinuxagent/common/osutil/factory.py WALi
9 9
  from .coreos import CoreOSUtil
10 10
  from .debian import DebianOSUtil
11 11
  from .freebsd import FreeBSDOSUtil
12
-@@ -44,6 +45,9 @@ def get_osutil(distro_name=DISTRO_NAME,
13
-     if distro_name == "clear linux software for intel architecture":
12
+@@ -46,6 +47,9 @@ def get_osutil(distro_name=DISTRO_NAME,
13
+             or distro_name == "clear linux software for intel architecture":
14 14
          return ClearLinuxUtil()
15
-
15
+ 
16 16
 +    if distro_name == "photonos":
17 17
 +        return PhotonOSUtil()
18 18
 +
19 19
      if distro_name == "ubuntu":
20
-         if Version(distro_version) == Version("12.04") or Version(distro_version) == Version("12.10"):
20
+         if Version(distro_version) in [Version("12.04"), Version("12.10")]:
21 21
              return Ubuntu12OSUtil()
22
-diff -rupN WALinuxAgent-2.2.14-old/azurelinuxagent/common/osutil/photonos.py WALinuxAgent-2.2.14/azurelinuxagent/common/osutil/photonos.py
23
-+++ WALinuxAgent-2.2.14/azurelinuxagent/common/osutil/photonos.py	2017-07-18 12:29:32.146925587 -0700
22
+diff -rupN WALinuxAgent-2.2.22/azurelinuxagent/common/osutil/photonos.py WALinuxAgent-2.2.22-new/azurelinuxagent/common/osutil/photonos.py
23
+--- WALinuxAgent-2.2.22/azurelinuxagent/common/osutil/photonos.py	1969-12-31 16:00:00.000000000 -0800
24 24
 @@ -0,0 +1,88 @@
25 25
 +#
26 26
 +# Copyright 2017 Microsoft Corporation
... ...
@@ -111,22 +111,22 @@ diff -rupN WALinuxAgent-2.2.14-old/azurelinuxagent/common/osutil/photonos.py WAL
111 111
 +        except IOError as e:
112 112
 +            raise OSUtilError("Failed to delete root password:{0}".format(e))
113 113
 +        pass
114
-diff -rupN WALinuxAgent-2.2.14-old/azurelinuxagent/common/version.py WALinuxAgent-2.2.14/azurelinuxagent/common/version.py
115
-+++ WALinuxAgent-2.2.14/azurelinuxagent/common/version.py	2017-07-21 17:42:54.424578877 -0700
114
+diff -rupN WALinuxAgent-2.2.22/azurelinuxagent/common/version.py WALinuxAgent-2.2.22-new/azurelinuxagent/common/version.py
115
+--- WALinuxAgent-2.2.22/azurelinuxagent/common/version.py	2018-02-12 11:55:45.000000000 -0800
116 116
 @@ -98,6 +98,9 @@ def get_distro():
117 117
      if os.path.exists("/etc/euleros-release"):
118 118
          osinfo[0] = "euleros"
119
-
119
+ 
120 120
 +    if os.path.exists("/etc/photon-release"):
121 121
 +        osinfo[0] = "photonos"
122 122
 +
123 123
      # The platform.py lib has issue with detecting BIG-IP linux distribution.
124 124
      # Merge the following patch provided by F5.
125 125
      if os.path.exists("/shared/vadc"):
126
-diff -rupN WALinuxAgent-2.2.14-old/config/photonos/waagent.conf WALinuxAgent-2.2.14/config/photonos/waagent.conf
127
-+++ WALinuxAgent-2.2.14/config/photonos/waagent.conf	2017-07-17 16:21:35.248562852 -0700
126
+diff -rupN WALinuxAgent-2.2.22/config/photonos/waagent.conf WALinuxAgent-2.2.22-new/config/photonos/waagent.conf
127
+--- WALinuxAgent-2.2.22/config/photonos/waagent.conf	1969-12-31 16:00:00.000000000 -0800
128 128
 @@ -0,0 +1,81 @@
129 129
 +#
130 130
 +# Microsoft Azure Linux Agent Configuration
... ...
@@ -144,10 +144,10 @@ diff -rupN WALinuxAgent-2.2.14-old/config/photonos/waagent.conf WALinuxAgent-2.2
144 144
 +Role.TopologyConsumer=None
145 145
 +
146 146
 +# Enable instance creation
147
-+Provisioning.Enabled=y
147
++Provisioning.Enabled=n
148 148
 +
149 149
 +# Rely on cloud-init to provision
150
-+Provisioning.UseCloudInit=n
150
++Provisioning.UseCloudInit=y
151 151
 +
152 152
 +# Password authentication for root account will be unavailable.
153 153
 +Provisioning.DeleteRootPassword=y
... ...
@@ -171,7 +171,7 @@ diff -rupN WALinuxAgent-2.2.14-old/config/photonos/waagent.conf WALinuxAgent-2.2
171 171
 +Provisioning.AllowResetSysUser=n
172 172
 +
173 173
 +# Format if unformatted. If 'n', resource disk will not be mounted.
174
-+ResourceDisk.Format=y
174
++ResourceDisk.Format=n
175 175
 +
176 176
 +# File system on the resource disk
177 177
 +# Typically ext3 or ext4. FreeBSD images should use 'ufs2' here.
... ...
@@ -209,14 +209,14 @@ diff -rupN WALinuxAgent-2.2.14-old/config/photonos/waagent.conf WALinuxAgent-2.2
209 209
 +# handling until inVMArtifactsProfile.OnHold is false.
210 210
 +# Default is disabled
211 211
 +# EnableOverProvisioning=n
212
-diff -rupN WALinuxAgent-2.2.14-old/init/photonos/waagent.service WALinuxAgent-2.2.14/init/photonos/waagent.service
213
-+++ WALinuxAgent-2.2.14/init/photonos/waagent.service	2017-07-21 17:44:11.849359536 -0700
212
+diff -rupN WALinuxAgent-2.2.22/init/photonos/waagent.service WALinuxAgent-2.2.22-new/init/photonos/waagent.service
213
+--- WALinuxAgent-2.2.22/init/photonos/waagent.service	1969-12-31 16:00:00.000000000 -0800
214 214
 @@ -0,0 +1,16 @@
215 215
 +[Unit]
216 216
 +Description=Azure Linux Agent
217
-+Wants=network-online.target sshd.service sshd-keygen.service
218
-+After=network-online.target
217
++Wants=systemd-networkd-wait-online.service sshd.service sshd-keygen.service
218
++After=systemd-networkd-wait-online.service cloud-init.service
219 219
 +
220 220
 +ConditionFileIsExecutable=/usr/bin/waagent
221 221
 +ConditionPathExists=/etc/waagent.conf
... ...
@@ -229,10 +229,10 @@ diff -rupN WALinuxAgent-2.2.14-old/init/photonos/waagent.service WALinuxAgent-2.
229 229
 +
230 230
 +[Install]
231 231
 +WantedBy=multi-user.target
232
-diff -rupN WALinuxAgent-2.2.14-old/setup.py WALinuxAgent-2.2.14/setup.py
233
-+++ WALinuxAgent-2.2.14/setup.py	2017-07-21 17:50:50.695661748 -0700
234
-@@ -112,6 +112,12 @@ def get_data_files(name, version, fullna
232
+diff -rupN WALinuxAgent-2.2.22/setup.py WALinuxAgent-2.2.22-new/setup.py
233
+--- WALinuxAgent-2.2.22/setup.py	2018-02-12 11:55:45.000000000 -0800
234
+@@ -113,6 +113,12 @@ def get_data_files(name, version, fullna
235 235
                         src=["config/clearlinux/waagent.conf"])
236 236
          set_systemd_files(data_files, dest='/usr/lib/systemd/system',
237 237
                            src=["init/clearlinux/waagent.service"])