mirror of
https://github.com/k8snetworkplumbingwg/multus-cni.git
synced 2025-09-18 16:00:04 +00:00
Change to sleep infinity & read and omit & wait on sleep n (e.g. not infinity)
This commit is contained in:
committed by
Tomofumi Hayashi
parent
e728da78bc
commit
8bbd3fdcf2
@@ -257,7 +257,7 @@ if [ "$MULTUS_CONF_FILE" == "auto" ]; then
|
||||
log "Attemping to find master plugin configuration, attempt $tries"
|
||||
fi
|
||||
let "tries+=1"
|
||||
sleep 1 & wait;
|
||||
sleep 1;
|
||||
else
|
||||
error "Multus could not be configured: no master plugin was found."
|
||||
exit 1;
|
||||
@@ -401,22 +401,22 @@ if [ "$MULTUS_CLEANUP_CONFIG_ON_EXIT" == true ]; then
|
||||
# Check and see if the original master plugin configuration exists...
|
||||
if [ ! -f "$MASTER_PLUGIN_LOCATION" ]; then
|
||||
log "Master plugin @ $MASTER_PLUGIN_LOCATION has been deleted. Allowing 45 seconds for its restoration..."
|
||||
sleep 10 & wait
|
||||
sleep 10
|
||||
for i in {1..35}
|
||||
do
|
||||
if [ -f "$MASTER_PLUGIN_LOCATION" ]; then
|
||||
log "Master plugin @ $MASTER_PLUGIN_LOCATION was restored. Regenerating given configuration."
|
||||
break
|
||||
fi
|
||||
sleep 1 & wait
|
||||
sleep 1
|
||||
done
|
||||
|
||||
generateMultusConf
|
||||
log "Continuing watch loop after configuration regeneration..."
|
||||
fi
|
||||
sleep 1 & wait
|
||||
sleep 1
|
||||
done
|
||||
else
|
||||
log "Entering sleep (success)..."
|
||||
sleep infinity & wait
|
||||
read
|
||||
fi
|
||||
|
Reference in New Issue
Block a user