Azure / WALinuxAgent

Microsoft Azure Linux Guest Agent

Home Page:http://azure.microsoft.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Don't backlist agent version when fetching goalstate failed

smartpcr opened this issue · comments

Describe the bug: A clear and concise description of what the bug is.

In azure stack environment, we observed that when agent find new version of agent, and run new agent to fetch goalstate/config during network outage window, the failure would put new agent version in backlist, and never try agent update again.

Current retry logic (maxretry=6) doesn't account for network outage, we would like to increase retry interval (from 1 sec to 5 min) for new agent, this would give enough time (30 min) for network to recover.

Logs

2022-09-19T13:31:56.377842Z WARNING ExtHandler ExtHandler Traceback (most recent call last):
  File "bin/WALinuxAgent-2.2.53-py3.8.egg/azurelinuxagent/ga/update.py", line 261, in run
    protocol.update_goal_state()
  File "bin/WALinuxAgent-2.2.53-py3.8.egg/azurelinuxagent/common/protocol/wire.py", line 95, in update_goal_state
    self.client.update_goal_state()
  File "bin/WALinuxAgent-2.2.53-py3.8.egg/azurelinuxagent/common/protocol/wire.py", line 727, in update_goal_state
    raise ProtocolError("Error processing goal state: {0}".format(ustr(exception)))
2022-09-19T13:31:56.834590Z WARNING Daemon Agent WALinuxAgent-2.2.53 launched with command 'python -u bin/WALinuxAgent-2.2.53-py3.8.egg -run-exthandlers' failed with return code: 1
2022-09-19T13:31:56.905255Z ERROR Daemon Event: name=WALinuxAgent, op=Enable, message=eJxtzLEOwjAMRdFfeVsnB9EKCbFlZ2cOjUkipW4VbLX9e8rAxniHc31iUTz8vYht/hvUu95dBtRgMmaOWItmjPM0BYnoll3zLCDDs8jpD6RlH9zVcUqgZkK8aT5k5fbu8Aql/paN1Zoc58g3nD91yC5p, duration=0
2022-09-19T13:31:57.002574Z WARNING Daemon Agent WALinuxAgent-2.2.53 launched with command 'python -u bin/WALinuxAgent-2.2.53-py3.8.egg -run-exthandlers' returned code: 1
2022-09-19T13:31:57.067561Z WARNING Daemon Agent WALinuxAgent-2.2.53 is permanently blacklisted
2022-09-19T13:31:57.105823Z INFO Daemon Installed Agent WALinuxAgent-2.2.46 is the most current agent

thanks!

Talked with @smartpcr offline. The blacklisting logic is problematic and we are planning on removing it in a later version of the agent.