mirrorlist: try a explicit removal if starting fails
Starting the mirrorlist container after a stop sometimes fails with: Error: error creating container storage: the container name "mirrorlist1.service" is already in use One way to work around this is to run: sudo -u mirrormanager /usr/bin/podman rm mirrorlist1.service --storage --force The restart mirrorlist container script now tries to remove the container with '--storage --force' if the start fails and retries the start. Signed-off-by: Adrian Reber <adrian@lisas.de>
This commit is contained in:
parent
fc25f8e40d
commit
e8503d0d5a
1 changed files with 8 additions and 2 deletions
|
@ -78,8 +78,14 @@ systemctl stop mirrorlist1
|
|||
sleep 1
|
||||
systemctl start mirrorlist1
|
||||
if [[ ${?} -ne 0 ]]; then
|
||||
echo "Unable to start mirrorlist1"
|
||||
exit 1
|
||||
# We have seen this to fail because podman was not able to completely
|
||||
# remove the container for some reason. First try this:
|
||||
sudo -u mirrormanager /usr/bin/podman rm mirrorlist1.service --storage --force
|
||||
systemctl start mirrorlist1
|
||||
if [[ ${?} -ne 0 ]]; then
|
||||
echo "Unable to start mirrorlist1"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue