Support REBOOT_AFTER_PUPPET on Windows

RESOLVED FIXED

Status

Infrastructure & Operations
RelOps: Puppet
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: dustin, Assigned: mrrrgn)

Tracking

Details

(Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/4114] )

Attachments

(1 attachment, 1 obsolete attachment)

Various bits of puppet, such as installing new drivers, require a reboot after the puppet run.  There are two places to support this (look for REBOOT_AFTER_PUPPET to find them):

* in the manifests, so that things like new drivers can make a request
* in the script that runs puppet on startup (runpuppet.rb)
Summary: Support REBOOT_AFTER_PUPPET → Support REBOOT_AFTER_PUPPET on Windows

Updated

4 years ago
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/4114]
Assignee: dustin → relops
(Assignee)

Updated

4 years ago
Assignee: relops → winter2718
(Assignee)

Comment 1

4 years ago
Created attachment 8541804 [details] [diff] [review]
reboot.windows.diff
Attachment #8541804 - Flags: review?(dustin)
Comment on attachment 8541804 [details] [diff] [review]
reboot.windows.diff

Review of attachment 8541804 [details] [diff] [review]:
-----------------------------------------------------------------

r+ with a `sleep` added in and comment updated.

::: modules/puppet/templates/puppet-atboot-runpuppet.rb.erb
@@ +19,5 @@
>  SEMAPHORE = <%= @puppet_semaphore.inspect %>
>  File.delete(SEMAPHORE) if File.exists?(SEMAPHORE)
>  
> +# the REBOOT_FLAG_FILE indicates that we should reboot after running puppet. The flag
> +# should be set server side so we should remove the flag file before each run.

Not quite "server side" but rather "by the `puppet agent` run"

@@ +51,5 @@
>              if run_puppet(puppetmaster)
> +                if File.exists?(REBOOT_FLAG_FILE)
> +                    File.delete(REBOOT_FLAG_FILE)
> +                    puts "Rebooting as requested"
> +                    system('shutdown /r /f /t 0')

This will need to intentionally hang, otherwise runner/buildbot will start while the shutdown operation is percolating -- see https://github.com/mozilla/build-puppet/blob/master/modules/puppet/templates/puppet-atboot-common.erb#L84
Attachment #8541804 - Flags: review?(dustin) → review+
(Assignee)

Comment 3

4 years ago
Created attachment 8542194 [details] [diff] [review]
reboot.windows.diff
Attachment #8541804 - Attachment is obsolete: true
Attachment #8542194 - Flags: checked-in+
(Assignee)

Updated

4 years ago
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.