[SRU] walinuxagent IsPackaged() logic is broken, runs two instances of waagent

Bug #1111690 reported by Ben Howard
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
walinuxagent (Ubuntu)
Fix Released
Medium
Unassigned
Precise
Fix Released
High
Unassigned
Quantal
Fix Released
High
Unassigned
Raring
Fix Released
Medium
Unassigned

Bug Description

[Impact]
All Azure instances that upgrade to agent 1.3 will have two versions of waagent (the script responisable for bootstrap on Azure) running. This may cause a race condition in the bootstrap, causing rebundled images to fail provisioning.

[Test Case]
New Image test (built with -proposed packages)
   - Confirm that /etc/init/waagent is missing
   - Confirm that "dpkg -S waagent" is present in /var/log/waagent.log
Upgrade Image test:
   - upgrade image using update in main
   - Confirm that two agents are running:
        status waagent
        status walinuxagent
   - upgrade to -proposed
   - Confirm waagent init job is missing
        status waagent (should return "status: Unknown job: waagent")
   - Confirm that "dpkg -s waagent" is present in /var/log/waagent.log

[Regression potential]
The regression potential is low, as this patch more intelligently determines whether or not walinuxagent is installed by using dpkg.

---
Updated bug report:

The variable used to determine whether or not it is packaged was not being exported properly. This results in two version of waaagent running.

---
Original bug report:

A typo in the verb that instructs the package whether or not it in a package has the incorrect verb.
The verb should be WAXLINUXAGENT_PACKAGED=1 not WALINUXAGENT_PACKAGED=1

This results in two version of the walinuxagent being executed.

Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Attached potential fix branches.

Test case:
1. Build from PPA and upgrade affected system. Only one agent should be running and no /etc/init/waagent.conf
2. Build images from PPA. Only one agent should be running and no /etc/init/waagent.conf

AFAIK, have two agents running should not be a problem, so this can and should follow the regular SRU cycle unless there is a very compelling reason otherwise.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1111690/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
Adam Conrad (adconrad) wrote :

The version numbers in these branches are beyond confusing.

You want versions either like:

1.3-0ubuntu1~12.10.2 (ie: the next one after 1.3-0ubuntu1~12.10.1)

or:

1.3-0ubuntu2~12.10.1 (ie: a backport of 1.3-0ubuntu2 from raring)

Any time "ubuntu" shows up twice in a version, you've probably done it wrong. :)

Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Okay, so I figured out the problem. This branch should never have been pushed out...it was a test branch. With that said, I have submitted a fix that more intelligently figures out if it is packaged or not.

description: updated
summary: - walinuxagent default config uses wrong verb
+ walinuxagent IsPackaged logic is broken
summary: - walinuxagent IsPackaged logic is broken
+ walinuxagent IsPackaged() logic is broken, runs two instances of waagent
summary: - walinuxagent IsPackaged() logic is broken, runs two instances of waagent
+ [SRU] walinuxagent IsPackaged() logic is broken, runs two instances of
+ waagent
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

I've verified the fix against Raring:
1. Created new image with latest Raring WALinuxAgent. Confirmed that only one version of waagent is running and it was launched from proper upstart job.

2. Booted old image with bad version of WALinuxAgent. Confirmed that it was a bad version. Upgraded WALinuxAgent to latest Raring version. Confirmed that the bad upstart job is removed and that after upgrade only one version of waagent is running.

Pending second confirmation from med before submitting this for SRU.

affects: ubuntu → walinuxagent (Ubuntu)
description: updated
Revision history for this message
David Medberry (med) wrote :

ACK: I've tested upgrades from walinuxagent_1.2-0ubuntu1_amd64.deb
I've tested upgrades from walinuxagent_1.3-0ubuntu1_amd64.deb

I've tested the actual package itself. Looks like a good fix. (Still no way to reproduce original issue the SRU fixes as reported by Microsoft but I've seen no degradation of any azure instances so nothing has regressed.)

Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Submitting for SRU. Testing is confirmed.

Changed in walinuxagent (Ubuntu):
assignee: Ben Howard (utlemming) → nobody
status: Confirmed → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in walinuxagent (Ubuntu):
status: New → Confirmed
Changed in walinuxagent (Ubuntu Raring):
status: Confirmed → Fix Released
Changed in walinuxagent (Ubuntu Precise):
importance: Undecided → Medium
Changed in walinuxagent (Ubuntu Quantal):
importance: Undecided → Medium
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :
Changed in walinuxagent (Ubuntu Precise):
importance: Medium → High
Changed in walinuxagent (Ubuntu Quantal):
importance: Medium → High
Adam Conrad (adconrad)
Changed in walinuxagent (Ubuntu Precise):
status: New → In Progress
Changed in walinuxagent (Ubuntu Quantal):
status: New → In Progress
Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello Ben, or anyone else affected,

Accepted walinuxagent into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/walinuxagent/1.3-0ubuntu2~12.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in walinuxagent (Ubuntu Precise):
status: In Progress → Fix Committed
Changed in walinuxagent (Ubuntu Quantal):
status: In Progress → Fix Committed
Revision history for this message
Adam Conrad (adconrad) wrote :

Hello Ben, or anyone else affected,

Accepted walinuxagent into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/walinuxagent/1.3-0ubuntu2~12.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Adam Conrad (adconrad)
tags: added: verification-needed
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Quantal is verified for both upgrade and virgin installation.

tags: added: verificate-done-quantal
tags: added: verification-done-quantal
removed: verificate-done-quantal
Revision history for this message
Ben Howard (darkmuggle-deactivatedaccount) wrote :

Precise is verified for both upgrade and virgin installation.

tags: added: verification-done verification-done-precise
removed: verification-needed
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package walinuxagent - 1.3-0ubuntu2~12.04.1

---------------
walinuxagent (1.3-0ubuntu2~12.04.1) precise; urgency=low

  * Changed detection of whether or not agent is packaged to using
    dpkg command. (LP: #1111690)
 -- Ben Howard <email address hidden> Thu, 31 Jan 2013 11:42:39 -0700

Changed in walinuxagent (Ubuntu Precise):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package walinuxagent - 1.3-0ubuntu2~12.10.1

---------------
walinuxagent (1.3-0ubuntu2~12.10.1) quantal; urgency=low

  * Changed detection of whether or not agent is packaged to using
    dpkg command. (LP: #1111690)
 -- Ben Howard <email address hidden> Thu, 31 Jan 2013 11:42:39 -0700

Changed in walinuxagent (Ubuntu Quantal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.