-verbose flag causes stack trace

Bug #1193404 reported by Scott Moser on 2013-06-21
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
walinuxagent (Ubuntu)
Medium
Ben Howard
Precise
Medium
Ben Howard
Raring
Medium
Ben Howard

Bug Description

[Impact]: When manually running WALinuxAgent's waagent, using -verbose causes a stack trace. This makes debugging provisioning issues difficult. The cause was a typo.

[Regression]: The regression potential is low. The default is to provision with verbose logging turned off.

[Test Case]: Provision a system and run "waagent -daemon -verbose". No stack trace should happen.

[Originial Report]:

If you attempt to run 'waagent -daemon -verbose', it will fail, and you'll find (in /var/log/waagent.log):

2013/06/21 15:32:29 ERROR:Traceback (most recent call last):
2013/06/21 15:32:29 ERROR: File "/usr/sbin/waagent", line 2572, in <module>
2013/06/21 15:32:29 ERROR: WaAgent.Run()
2013/06/21 15:32:29 ERROR: File "/usr/sbin/waagent", line 1926, in Run
2013/06/21 15:32:29 ERROR: self.Endpoint = self.DoDhcpWork()
2013/06/21 15:32:29 ERROR: File "/usr/sbin/waagent", line 1676, in DoDhcpWork
2013/06/21 15:32:29 ERROR: Run("iptables -D INPUT -p udp --dport 68 -j ACCEPT",chk_err=False) # We supress error logging on error.
2013/06/21 15:32:29 ERROR: File "/usr/sbin/waagent", line 215, in Run
2013/06/21 15:32:29 ERROR: retcode,out=RunGetOutput(cmd,chk_err)
2013/06/21 15:32:29 ERROR: File "/usr/sbin/waagent", line 219, in RunGetOutput
2013/06/21 15:32:29 ERROR: LogIfVerbose(cmd)
2013/06/21 15:32:29 ERROR: File "/usr/sbin/waagent", line 459, in LogIfVerbose
2013/06/21 15:32:29 ERROR: LogFileWithPrefix('',message)
2013/06/21 15:32:29 ERROR:NameError: global name 'LogFileWithPrefix' is not defined
2013/06/21 15:32:29 ERROR:
2013/06/21 15:32:29 ERROR:Exception: global name 'LogFileWithPrefix' is not defined

fix is simple enough:

$ diff -u /usr/sbin/waagent.dist /usr/sbin/waagent
--- /usr/sbin/waagent.dist 2013-06-21 15:36:19.412371000 +0000
+++ /usr/sbin/waagent 2013-06-21 15:36:23.892371000 +0000
@@ -456,7 +456,7 @@

 def LogIfVerbose(message):
     if Verbose == True:
- LogFileWithPrefix('',message)
+ LogWithPrefix('',message)

 def LogWithPrefixIfVerbose(prefix, message):
     if Verbose == True:

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: walinuxagent 1.3.2-0ubuntu1
ProcVersionSignature: Ubuntu 3.9.0-6.14-generic 3.9.6
Uname: Linux 3.9.0-6-generic x86_64
ApportVersion: 2.10.2-0ubuntu1
Architecture: amd64
Date: Fri Jun 21 15:34:09 2013
MarkForUpload: True
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: walinuxagent
UpgradeStatus: No upgrade log present (probably fresh install)

Scott Moser (smoser) wrote :
Stephen A. Zarkos (stevez) wrote :

Hi!

Thank you for looking at this. This issue was fixed upstream a little while ago, it just needs to make it into the next Ubuntu package update.

Thanks!
Steve

Ben Howard (darkmuggle) on 2013-07-23
Changed in walinuxagent (Ubuntu):
assignee: nobody → Ben Howard (utlemming)
importance: Undecided → Medium
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package walinuxagent - 1.3.2-0ubuntu4

---------------
walinuxagent (1.3.2-0ubuntu4) saucy; urgency=low

  * debian/patches/shadow_permissions.patch: apply the appropriate
    permissions to /etc/shadow (LP: #1188820).
  * debian/patches/verbose_logging.patch: use the appropriate log
    faculty when using verbose logging (LP: #1193404).
  * Mark bugs fixed in 1.3.2-0ubuntu3:
    debian/patches/config_for_cloud-init.patch:
    - fix for race condition between cloud-init and waagent (LP: #1195524)
    - mount resource disk on /mnt (LP: #1193380)
    - move walinuxagent init functionality to cloud-init (LP: #1037723)
 -- Ben Howard <email address hidden> Tue, 23 Jul 2013 09:43:40 -0600

Changed in walinuxagent (Ubuntu):
status: New → Fix Released
Ben Howard (darkmuggle) on 2013-08-07
description: updated

Hello Scott, 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.2-0ubuntu4~12.04.2 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) wrote :

Hello Scott, 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.2-0ubuntu4~12.04.3 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) wrote :

Hello Scott, 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.2-0ubuntu4~12.04.4 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!

Ben Howard (darkmuggle) wrote :

Confirmed test case. Marking verification-done.

tags: added: verification-done
Stéphane Graber (stgraber) wrote :

Hello Scott, or anyone else affected,

Accepted walinuxagent into raring-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/walinuxagent/1.3.2-0ubuntu2~13.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 Raring):
status: New → Fix Committed
Ben Howard (darkmuggle) on 2013-10-23
Changed in walinuxagent (Ubuntu Precise):
status: New → Fix Released
importance: Undecided → Medium
Changed in walinuxagent (Ubuntu Raring):
importance: Undecided → Medium
Changed in walinuxagent (Ubuntu Precise):
assignee: nobody → Ben Howard (utlemming)
Changed in walinuxagent (Ubuntu Raring):
assignee: nobody → Ben Howard (utlemming)
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package walinuxagent - 1.3.2-0ubuntu2~13.04.1

---------------
walinuxagent (1.3.2-0ubuntu2~13.04.1) raring-proposed; urgency=low

  * Backport of 1.3.2-0ubuntu5 from 13.10
    * disable ephemeral disk formating by default (LP: #1231490)
    * debian/patches/shadow_permissions.patch: apply the appropriate
      permissions to /etc/shadow (LP: #1188820).
    * debian/patches/verbose_logging.patch: use the appropriate log
      faculty when using verbose logging (LP: #1193404).
    * Mark bugs fixed in 1.3.2-0ubuntu3:
      debian/patches/config_for_cloud-init.patch:
      - fix for race condition between cloud-init and waagent (LP: #1195524)
      - mount resource disk on /mnt (LP: #1193380)
      - move walinuxagent init functionality to cloud-init (LP: #1037723)
  * Add requirement of cloud-init (LP: #1037723).
 -- Ben Howard <email address hidden> Thu, 10 Oct 2013 09:24:46 -0600

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

Other bug subscribers