Closed Bug 1097380 Opened 10 years ago Closed 9 years ago

Support REBOOT_AFTER_PUPPET on Windows

Categories

(Infrastructure & Operations :: RelOps: Puppet, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dustin, Assigned: mrrrgn)

Details

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

Attachments

(1 file, 1 obsolete file)

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
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/4114]
Assignee: dustin → relops
Assignee: relops → winter2718
Attached patch reboot.windows.diff (obsolete) — Splinter Review
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+
Attachment #8541804 - Attachment is obsolete: true
Attachment #8542194 - Flags: checked-in+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: