Skip to content

Commit

Permalink
Merge branch 'develop' into guest-config
Browse files Browse the repository at this point in the history
  • Loading branch information
narrieta authored Dec 10, 2024
2 parents b1dd761 + 23be951 commit 342cb9c
Showing 1 changed file with 9 additions and 8 deletions.
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

0 comments on commit 342cb9c

Please sign in to comment.