** Description changed: + [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: + + def LogIfVerbose(message): + if Verbose == True: - LogFileWithPrefix('',message) + LogWithPrefix('',message) - - def LogWithPrefixIfVerbose(prefix, message): - if Verbose == True: + + 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 + 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)
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to 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 -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs