Skip to content

Commit

Permalink
update setup (Azure#3088)
Browse files Browse the repository at this point in the history
  • Loading branch information
nagworld9 authored Mar 8, 2024
1 parent c96a7f4 commit 3b2c905
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions tests_e2e/tests/agent_update/self_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,12 @@ def _check_agent_version(latest_version: str) -> bool:
else:
return False

waagent_version: str = ""
log.info("Verifying agent updated to latest version: {0}".format(latest_version))
success: bool = retry_if_false(lambda: _check_agent_version(latest_version), delay=60)
waagent_version: str = self._ssh_client.run_command("waagent-version", use_sudo=True)
if not success:
fail("Guest agent didn't update to latest version {0} but found \n {1}".format(
latest_version, waagent_version))
waagent_version: str = self._ssh_client.run_command("waagent-version", use_sudo=True)
log.info(
f"Successfully verified agent updated to latest version. Current agent version running:\n {waagent_version}")

Expand Down
5 changes: 4 additions & 1 deletion tests_e2e/tests/scripts/agent_update-self_update_test_setup
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,13 @@ if [ "$#" -ne 0 ] || [ -z ${package+x} ] || [ -z ${version+x} ]; then
fi

echo "updating the related to self-update flags"
update-waagent-conf AutoUpdate.UpdateToLatestVersion=$update_to_latest_version Debug.EnableGAVersioning=n Debug.SelfUpdateHotfixFrequency=120 Debug.SelfUpdateRegularFrequency=120 Autoupdate.Frequency=120
update-waagent-conf AutoUpdate.UpdateToLatestVersion=$update_to_latest_version AutoUpdate.GAFamily=Test Debug.EnableGAVersioning=n Debug.SelfUpdateHotfixFrequency=120 Debug.SelfUpdateRegularFrequency=120 Autoupdate.Frequency=120
agent-service stop
mv /var/log/waagent.log /var/log/waagent.$(date --iso-8601=seconds).log

# Some distros may pre-install higher version than custom version that test installs, so we need to lower the version to install custom version
agent_update-modify_agent_version 2.2.53

echo "Cleaning up the existing agents"
rm -rf /var/lib/waagent/WALinuxAgent-*

Expand Down

0 comments on commit 3b2c905

Please sign in to comment.