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

fix for installing agent in e2e tests #3271

Merged
merged 2 commits into from
Dec 9, 2024
Merged
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
17 changes: 9 additions & 8 deletions tests_e2e/orchestrator/scripts/install-agent
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,6 @@ if [ $started == false ]; then
exit 1
fi

#
# Install the package
#
echo "========== Installing Agent =========="
echo "Installing $package as version $version..."
unzip.py "$package" "/var/lib/waagent/WALinuxAgent-$version"

python=$(get-agent-python)
# Ensure that AutoUpdate is enabled. some distros, e.g. Flatcar have a waagent.conf in different path
Expand Down Expand Up @@ -162,14 +156,21 @@ if [[ $(uname -a) == *"flatcar"* ]]; then
fi

#
# Restart the service
# Install the package
#
echo "Restarting service..."
echo "========== Installing Agent =========="

agent-service stop

# Rename the previous log to ensure the new log starts with the agent we just installed
mv /var/log/waagent.log /var/log/waagent."$(date --iso-8601=seconds)".log

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

echo "Installing $package as version $version..."
unzip.py "$package" "/var/lib/waagent/WALinuxAgent-$version"

agent-service start

#
Expand Down
Loading