Skip to content
Snippets Groups Projects
Commit c17abafe authored by bta's avatar bta
Browse files

get-config: when there is no configuration, wait and retry later.

This will help troubleshooting, as the future sysadmins will connect to
the machine, run `journalctl -f ` to see what's wrong with the machine,
and in about 30 seconds they will see:

  Error fetching machine configuration!
  Error fetching machine info!
  If this is a new machine, did you add it into labmanager-admin?

So they will know what's wrong, and how to correct it.
parent fcc245f0
No related branches found
No related tags found
No related merge requests found
......@@ -166,10 +166,12 @@ updateCurrentConfigId() {
function getConfig() {
getConfigVars
if [[ $? != 0 ]]; then
debug "Error fetching machine info!"
return 1
fi
while [[ $? != 0 ]]; do
echo "Error fetching machine info!"
echo "If this is a new machine, did you add it into labmanager-admin?"
sleep 30;
getConfigVars
done
# back config files up
cp -f /local/esame-machine.conf /local/esame-machine.conf.prev >/dev/null 2>&1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment