Skip to content

Commit

Permalink
PMM-12913 add check-agent-setup script
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Mar 17, 2024
1 parent 15f215f commit f003f63
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions build/scripts/utils/check-agent-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

# This script checks if PMM Server has finished upgrading so pmm-agent can perform the `setup` command.
# If PMM Server is not ready, the script will wait for 30 seconds and then exit with an error.

if ! timeout 30 bash -c "until supervisorctl status pmm-update-perform-init | grep -q EXITED; do sleep 2; done"; then
echo "FATAL: failed to set up pmm-agent."
exit 1
fi

0 comments on commit f003f63

Please sign in to comment.