Hide Forgot
This bug is used to track the issue on bugzilla: https://github.com/Azure/WALinuxAgent/issues/387 Description of problem: If enable AutoUpdate, WALA will always use the updated WALA after restart waagent service twice, even if its version is echo to or lower than the local version. Version-Release number of selected component (if applicable): WALinuxAgent-2.1.6 (Upstream build) RHEL Version: RHEL-7.3-20160817.1 How reproducible: 100% Steps to Reproduce: 1. Prepare a RHEL7.3 VM on Azure East US location(ASM mode) with WALA-2.1.6 installed. Enable wala auto-update in the /etc/waagent.conf: # AutoUpdate.Enabled=y # AutoUpdate.GAFamily=Prod 2. restart waagent service # systemctl restart waagent 3. Wait until the new WALA package is downloaded. (Now WALA still use the local version) # ps aux|grep -E "waagent|WALinux" python -u /usr/sbin/waagent -run-exthandlers 4. restart waagent service again # systemctl restart waagent 5. Check the -run-exthandler process # ps aux|grep -E "waagent|WALinux" python -u bin/WALinuxAgent-2.1.6-py2.7.egg -run-exthandlers Actual results: WALA uses the updated version(2.1.6), not the local version(2.1.6). Expected results: WALA uses the local version because the new version is not higher than the local version. Additional info: 1. If change the local version to 2.1.7 in the /usr/lib/python2.7/site-packages/azurelinuxagent/common/version.py, this issue also exists. 2. If I delete the /var/lib/waagent/WALinuxAgent-2.1.6/ and then restart waagent service, it will use the local version(python -u /usr/sbin/waagent -run-exthandlers)
Verify in WALA-2.2.1 RHEL-7.3 ondemand and RHEL-6.9-20161110.2. Result is pass. Steps: 1. Prepare a VM on Azure with WALA-2.2.1 installed. Set AutoUpdate.enabled=y 2. Check wala process. Doesn't use the new WALA because the local version is equal to the new version. # ps aux|grep -E "waagent|WAL" root 24993 6.2 0.6 203652 11076 pts/0 S 17:10 0:00 python /usr/sbin/waagent -daemon root 24998 11.2 0.8 368708 14328 pts/0 Sl 17:10 0:00 python -u bin/WALinuxAgent-2.2.1-py2.7.egg -run-exthandlers 3. Modify AGENT_VERSION = '2.2.0' in /usr/lib/python2.6/site-packages/azurelinuxagent/common/version.py. Remove /var/lib/waagent/current_version. Restart waagent service. 4. Check wala process. Use the new WALA because the local version is lower than the new version # ps aux|grep -E "waagent|WAL" root 24993 6.2 0.6 203652 11076 pts/0 S 17:10 0:00 python /usr/sbin/waagent -daemon root 24998 11.2 0.8 368708 14328 pts/0 Sl 17:10 0:00 python -u bin/WALinuxAgent-2.2.1-py2.7.egg -run-exthandlers 5. Modify AGENT_VERSION = '2.2.2'and repeat step3-4. Doesn't use the new WALA because the local version is higher than the new version. root 25031 7.5 0.6 203604 11084 pts/0 S 17:14 0:00 python /usr/sbin/waagent -daemon root 25036 7.2 0.7 213932 12524 pts/0 S 17:14 0:00 python -u /usr/sbin/waagent -run-exthandlers
Change the status to "POST" for developers to add it into ERRATA.