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

reset uphold setting for agent service in flatcar distro #3066

Merged
merged 6 commits into from
Feb 27, 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
19 changes: 19 additions & 0 deletions tests_e2e/orchestrator/scripts/install-agent
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,25 @@ if [[ $(uname -a) == *"flatcar"* ]]; then
if [[ ! -f /usr/share/oem/waagent.conf ]]; then
ln -s "$waagent_conf_path" /usr/share/oem/waagent.conf
fi

narrieta marked this conversation as resolved.
Show resolved Hide resolved
# New flatcar images set the uphold property for agent service that is causing automatic restart on stop cmd
# [Upholds= dependency on it has a continuous effect, constantly restarting the unit if necessary]
# Resetting the uphold property as workaround for now
uphold_target=$(systemctl show waagent --property=UpheldBy)
# example output: UpheldBy=multi-user.target
if [[ $uphold_target == *".target"* ]]; then
target_name="${uphold_target#*=}"
if [[ ! -d /etc/systemd/system/$target_name.d ]]; then
mkdir -p /etc/systemd/system/$target_name.d
fi
echo -e "[Unit]\nUpholds=" > /etc/systemd/system/$target_name.d/10-waagent-sysext.conf
systemctl daemon-reload
fi
# Flatcar images does automatic reboot without user input, so turning it off
# Broadcast message from locksmithd at 2024-02-23 19:48:55.478412272 +0000 UTC m=
# System reboot in 5 minutes!
echo "REBOOT_STRATEGY=off" > /etc/flatcar/update.conf
systemctl restart locksmithd
fi

#
Expand Down
7 changes: 1 addition & 6 deletions tests_e2e/test_suites/agent_firewall.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,4 @@ tests:
images:
- "endorsed"
- "endorsed-arm64"
owns_vm: true # This vm cannot be shared with other tests because it modifies the firewall rules and agent status.
# Systemctl stop functionality changed and service doing restart on stop cmd in flatcar images. Thus breaking our tests.
# TODO: Enable once it is fixed
skip_on_images:
- "flatcar"
- "flatcar_arm64"
owns_vm: true # This vm cannot be shared with other tests because it modifies the firewall rules and agent status.
4 changes: 2 additions & 2 deletions tests_e2e/test_suites/agent_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ owns_vm: true
skip_on_clouds:
- "AzureChinaCloud"
- "AzureUSGovernment"
# Systemctl stop functionality changed and service doing restart on stop cmd in flatcar images. Thus breaking our tests.
# TODO: Enable once it is fixed
# Since Flatcar read-only filesystem, we can't edit the version file. This test relies on the version to be updated in version file.
# TODO: Enable once we find workaround for this
skip_on_images:
- "flatcar"
- "flatcar_arm64"
Loading