Skip to content

Commit

Permalink
Merge pull request #1571 from todor-ivanov/WMAgent_HaltExecutionOnDou…
Browse files Browse the repository at this point in the history
…bleRun_fix-12190

Halt wmagent docker run scripts as soon as a second container is detected at the machine
  • Loading branch information
todor-ivanov authored Dec 2, 2024
2 parents 0d9d5b1 + 2e87514 commit 36e30a0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docker/pypi/wmagent/wmagent-docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ echo "Checking if there is no other wmagent container running and creating a lin
ln -s $HOST_MOUNT_DIR/srv/wmagent/$WMA_VER_RELEASE $HOST_MOUNT_DIR/srv/wmagent/current )

echo "Starting $registry/$repository:$WMA_TAG docker container with user: $wmaUser:$wmaGroup"
docker run $dockerOpts $registry/$repository:$WMA_TAG
docker run $dockerOpts $registry/$repository:$WMA_TAG || {
echo "ERROR: WMAgent already running at this machine. Execution HALTED!"
exit 1
}
docker exec -u root -it wmagent service cron start

# Workaround su authentication issue (cron uses setuid via su)
Expand Down

0 comments on commit 36e30a0

Please sign in to comment.