Skip to content

Commit

Permalink
improved error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
nagworld9 committed Jun 20, 2023
1 parent 0e182ea commit 52c4a7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion azurelinuxagent/ga/agent_update_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def run(self, goal_state):
# as historically we don't support downgrades below daemon versions. So daemon will not pickup that requested version rather start with
# installed latest version again. When that happens agent go into loop of downloading the requested version, exiting and start again with same version.
#
raise Exception("Can't process the update as the requested version: {0} is < current daemon version: {1}".format(
raise Exception("as the requested version: {0} is < current daemon version: {1}".format(
requested_version, daemon_version))

msg = "Goal state {0} is requesting a new agent version {1}, will update the agent before processing the goal state.".format(
Expand Down
2 changes: 1 addition & 1 deletion tests/ga/test_agent_update_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def test_it_should_not_downgrade_below_daemon_version(self):
self.assertFalse(os.path.exists(self.agent_dir(downgraded_version)),
"New agent directory should not be found")
self.assertEqual(1, len([kwarg['message'] for _, kwarg in mock_telemetry.call_args_list if
"Can't process the update as the requested version" in kwarg[
"Unable to update Agent: as the requested version" in kwarg[
'message'] and kwarg[
'op'] == WALAEventOperation.AgentUpgrade]), "We should allow downgrade above daemon version")

Expand Down

0 comments on commit 52c4a7e

Please sign in to comment.