chef-cookbooks icon indicating copy to clipboard operation
chef-cookbooks copied to clipboard

fb_helpers_reboot lies about :now

Open jaymzh opened this issue 3 years ago • 2 comments

: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.

jaymzh avatar Nov 03 '20 03:11 jaymzh

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?

malmond77 avatar Nov 03 '20 18:11 malmond77

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.

jaymzh avatar Nov 03 '20 18:11 jaymzh