Azure/WALinuxAgent

[BUG] noisy SyntaxWarning for python "is not 0"

moreOver0 opened this issue · 1 comments

The code

if me.returncode is not 0 and chk_err is True and log_cmd:

produces a warning in log, like

/var/lib/waagent/Microsoft.AKS.Compute.AKS.Linux.AKSNode-1.46/waagent:2555: SyntaxWarning: "is not" with a literal. Did you mean "!="?

modify the "is not 0" to be "!= 0" helps reducing noise in log.

Distro and WALinuxAgent details (please complete the following information):

  • Distro and Version: [any]
  • WALinuxAgent version [any]

Additional context
Add any other context about the problem here.

Log file attached
If possible, please provide the full /var/log/waagent.log file to help us understand the problem better and get the context of the issue.

waagent2.0 is dead code from the agent's point of view, it is not invoked by the agent. Some very old legacy VM extensions use that code, in your case it seems to be the AKS extension. This issue would need to be reported in their repo (it may be this one: https://github.com/Azure/AKS)