You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running tasks that depend on it. The package is uninstalled by Puppet
when `govuk_unattended_reboots::enabled` is false (default). This results in
the following output when a task is run:
(fabric)➜ fabric-scripts git:(master) fab preview locksmith.status
[etcd-1.management] run: /usr/bin/locksmithctl -endpoint='http://etcd-1.management:4001,http://etcd-2.management:4001,http://etcd-3.management:4001' status
[etcd-1.management] out: /bin/bash: /usr/bin/locksmithctl: No such file or directory
[etcd-1.management] out:
Fatal error: run() received nonzero return code 127 while executing!
Requested: /usr/bin/locksmithctl -endpoint='http://etcd-1.management:4001,http://etcd-2.management:4001,http://etcd-3.management:4001' status
Executed: /bin/bash -l -c "/usr/bin/locksmithctl -endpoint='http://etcd-1.management:4001,http://etcd-2.management:4001,http://etcd-3.management:4001' status"
Aborting.
Disconnecting from etcd-1.management... done.
Disconnecting from jumpbox.preview.alphagov.co.uk... done.
By checking whether the command is present first we can provide a simpler
error with more context:
(fabric)➜ fabric-scripts git:(check_locksmithctl_installed) fab preview locksmith.status
Fatal error: locksmithctl is not installed. Perhaps unattended_reboots are disabled?
Aborting.
Disconnecting from etcd-1.management... done.
Disconnecting from jumpbox.preview.alphagov.co.uk... done.
I thought about decorating this with `@runs_once` but actually we probably
won't call locksmith multiple times in the same run, we'd want to check for
every machine it's run on, and it's pretty cheap to check.
0 commit comments