[Bug 1193404] [NEW] -verbose flag causes stack trace

Scott Moser smoser at ubuntu.com
Fri Jun 21 15:38:31 UTC 2013


Public bug reported:

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)

** Affects: walinuxagent (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug saucy uec-images

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to walinuxagent in Ubuntu.
https://bugs.launchpad.net/bugs/1193404

Title:
  -verbose flag causes stack trace

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/walinuxagent/+bug/1193404/+subscriptions



More information about the Ubuntu-server-bugs mailing list