Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update self-update test setup #3088

Merged
merged 2 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
Loading