chef-cookbooks
chef-cookbooks copied to clipboard
fb_helpers_reboot lies about :now
:now
is suppsoed to reboot now (if allowed). But it has an undocumented FB-ism, that if you're in firstboot, it switches to managed reboots:
action :now do
# TODO (t15830562) - this action should observe required and override the
# same way as the :deferred action
if node['fb_helpers']['reboot_allowed']
if node.firstboot_any_phase?
set_reboot_override('immediate')
do_managed_reboot
else
That's... not cool.
I expect this is useful, so my first instinct is to document the behaviour. I'm not sure what you want here - do you want it documented, or do you want this to work differently - and if so, how?
I want :now
to be :now
, and :managed_now
to be :managed_now
.
If I say "Reboot now" I mean "reboot now". THere's already an option for managed. :now should not be managed, it should be reboot.