don't mark hosts as disabled at the point they get created
I think the intention here was perhaps: - create new host, marked as disabled - finish setting up backups - once done, mark host as enabled ...except the script runs as "set -e", so if something goes wrong we just never get as far as enabling the host, which means not only do no backups run but no failure reports get sent to xymon so we don't even notice the failure. This is not good. Given the entry of a row in the `host` table doesn't do much in and of itself, I see no reason why we shouldn't just mark the host as initially enabled. We won't try to actually perform a backup until a `backup_task` has been created. Perhaps this leads to a brief transient behaviour where xymon reports a backup as failing whilst the script is still running - but OTOH the xymon report for a new machine will always be red for "a while" until the first backup has actually run OK.
Loading
Please register or sign in to comment