Bug 1374115

Summary: [WALA] AutoUpdate need to be disabled
Product: Red Hat Enterprise Linux 7 Reporter: Yuxin Sun <yuxisun>
Component: WALinuxAgentAssignee: Dave Anderson <anderson>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 7.3CC: ailan, borisb, brendand, danis, hkrijger, jboutaud, jjarvis, jopoulso, leiwang, mheslin, stephen.zarkos, vkuznets, wshi, yuxisun
Target Milestone: rcKeywords: Extras
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: WALinuxAgent-2.2.0-3.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 07:49:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1360492, 1360493, 1387783    

Description Yuxin Sun 2016-09-08 02:16:48 UTC
Description of problem:
AutoUpdate is enabled by default. It auto-updates WALA to a new version which is not tested by Red Hat QE. It's a risk. So we need to disable this feature inside our package.
1. Fresh install: The "AutoUpdate.Enabled=y" inside the waagent.conf, which enables the AutoUpdate feature.
2. Update: When we update from WALA-2.0.16 to WALA-2.1.5, there's no "AutoUpdate.Enabled" parameter inside the waagent.conf, and the AutoUpdate is enabled by default. 

Version-Release number of selected component (if applicable):
WALinuxAgent-2.1.5

RHEL Version: RHEL-7.3

How reproducible:
100%

Steps to Reproduce:
1. Prepare a VM with WALA-2.1.5 installed.
2. Check the AutoUpdate.Enabled default value inside the /etc/waagent.conf
# AutoUpdate.Enabled=y
3. Restart waagent service. Wait for several minutes. Check the process
# ps aux|grep -E "waagent|WALinuxAgent"
# python -u bin/WALinuxAgent-2.1.6-py2.7.egg -run-exthandlers
4. Remove the "AutoUpdate.Enabled=y" from /etc/waagent.conf. Then repeat step 3. Check the process.
 
Actual Result:
AutoUpdate is enabled by default. The version is updated to 2.1.6.
Even if remove the "AutoUpdate.Enabled=y", the AutoUpdate feature is still enabled.

Expect Result:
The AutoUpdate feature is disabled after fresh install and update.

Comment 2 Wei Shi 2016-09-09 02:59:23 UTC
Hi Jerome, Mark,
  If there has a conclusion on this bug, please let us know, thanks.

Comment 3 Mark Heslin 🎸 2016-09-09 03:41:53 UTC
Hi All,

Apologies for the delay - we just held a meeting today with MS to review this.
The full story is a bit more complex then we can cover here but on the surface
it appears we may be able to have the enabled as the default setting only enables
two WALA agent extensions:

  - Linux Diagnostics (telemetry data)
  - VM Access (ssh access if a VM image fails to start)

But as I said, the full story is a bit more complex as there are other extensions
that could be activates by a customer and the impact to a RHEL image is not clear.

We have asked MS to provide us with an architectural overview and more details
- they have agreed to provide this to us by COB next Tue and a follow-up mtg.
will be held next Wed or Thu.

We're pushing to get this resolved as quickly as possible but until next week
please hold off until we know more.

-m

Comment 4 Dave Anderson 2016-10-28 13:14:37 UTC
A patch request to disable AutoUpdate was made here by Wei Shi:

  Bug 1387783 - [WALA]Request to package WALA 2.2.0 into RHEL 7 Repo
  https://bugzilla.redhat.com/show_bug.cgi?id=1387783#c6

  Mark, John,
    QE have confidence to ship 2.2.0 on 7.3 batch update 1, so would you like
    to give us a ack?

  Dave,
    Are we able to reuse RHBA-2016:24814-01?

    For bz#1374115, would you mind to write a patch and rebuild a new one?
    You can reference to:
    https://build.opensuse.org/package/view_file/Cloud:Tools/python-azure-agent/agent-no-auto-update.patch?expand=1
    http://packages.ubuntu.com/source/yakkety/walinuxagent

    Our purpose is to disable AutoUpdate.Enabled in file waagent.conf

I will rebuild the package with the patch referenced above.

Comment 7 Yuxin Sun 2016-10-31 08:18:51 UTC
Verified in WALinuxAgent-2.2.0-2.el7 package in RHEL-7.3-20161019.0. 

1. Fresh install: The "AutoUpdate.Enabled=n" is set in the waagent.conf. 
2. Update: Issue is not fixed. When we update from WALA-2.0.16 to WALA-2.2.0, there's no "AutoUpdate.Enabled" item inside the waagent.conf, which means the AutoUpdate feature is enabled. 

The first issue is fixed. The second issue is not fixed.

Comment 8 Wei Shi 2016-10-31 09:31:26 UTC
Hi PM,
  QE still has problem to completly disable AutoUpdate:
  1. For customer who install wala freshly (eg. rpm -i), our patch could disable AutoUpdate as we expected. --- PASS
  2. But for customer who update wala package (eg. rpm -U), because wala rpm update won't replace config file with the new one which have "AutoUpdate=n" parameter, it will fall back to default method which same as AutoUpdate=y, it's n    ot our expected result. --- FAILED

  For scenario 2, QE do NOT found a patch to reference from the community, so here are our suggestions and looking forward to your advice:
  1. Wrote patch to fix scenario 2
    1) Ask Microsoft to provide the patch to fix (This method seems too hard because it's a vendor issue, but we have already file a issue on github)
    2) Find someone in Red Hat to wrote a patch to fix it
  2. Do NOT fix scenario 2, add a notice on errata document to customer like below:
    This version introduce a new parameter "AutoUpdate" which will auto-update goal state processing, if you update from a older version, we suggest you turn it off by set "AutoUpdate.Enabled=n" in /etc/waagent.conf

Comment 9 Stephen A. Zarkos 2016-10-31 20:33:25 UTC
Hi,

Per the Azure agent team, this feature will remain enabled by default in the WALA code: https://github.com/Azure/WALinuxAgent/issues/473.  Would it be possible to just document this for for now (option #2 above)?

Comment 16 Yuxin Sun 2016-11-04 07:39:37 UTC
Verify in WALinuxAgent-2.2.0-3.el7 RHEL-7.3-20161019.0. 
Result is pass.

Comment 17 Yuxin Sun 2016-11-04 07:49:04 UTC

*** This bug has been marked as a duplicate of bug 1387783 ***