Bug 1371063 - [WALA]The updated WALA will be used after restart waagent twice even if its version is lower than the local version
Summary: [WALA]The updated WALA will be used after restart waagent twice even if its v...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: WALinuxAgent
Version: 7.3
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Miroslav Rezanina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1429325
TreeView+ depends on / blocked
 
Reported: 2016-08-29 09:26 UTC by Yuxin Sun
Modified: 2019-02-26 20:57 UTC (History)
4 users (show)

Fixed In Version: WALinuxAgent-2.2.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1429325 (view as bug list)
Environment:
Last Closed: 2017-03-07 08:52:36 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github Azure WALinuxAgent issues 387 0 None None None 2016-08-29 09:26:46 UTC

Description Yuxin Sun 2016-08-29 09:26:47 UTC
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)

Comment 2 Yuxin Sun 2016-11-29 09:15:09 UTC
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

Comment 3 Yuxin Sun 2017-03-06 03:16:31 UTC
Change the status to "POST" for developers to add it into ERRATA.


Note You need to log in before you can comment on or make changes to this bug.