Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.1.6] The updated WALA will be used after restart waagent twice even if its version is lower than the local version #387

Closed
yuxisun1217 opened this issue Aug 24, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@yuxisun1217
Copy link

yuxisun1217 commented Aug 24, 2016

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

RHEL Version:
RHEL-7.3 internal build

How reproducible:
100%

Steps to Reproduce:

  1. Prepare a RHEL7 VM on Azure East US location(ASM mode) with WALA-2.1.6 installed. Enable AutoUpdate in the /etc/waagent.conf:

AutoUpdate.Enabled=y

AutoUpdate.GAFamily=Prod

  1. restart waagent service

systemctl restart waagent

  1. 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

  1. 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)
@brendandixon brendandixon added this to the v2.1.7 milestone Aug 24, 2016
@brendandixon
Copy link
Contributor

@yuxisun1217 Good catch! The last line in update.py#get_latest_agent (https://github.com/Azure/WALinuxAgent/blob/master/azurelinuxagent/ga/update.py#L299) should filter to return an agent whose version is greater than CURRENT_VERSION.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants