Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(MODULES-8201) Add pending reboot due to domain join for windows. #179

Merged
merged 1 commit into from
Jan 27, 2020

Conversation

razorbladex401
Copy link
Contributor

Add an option to the module that checks if there is a pending reboot due to a domain join. This will allow flexibility when puppet is not only joining a server to the domain but also installing software that will trigger a reboot due to software installation. This is especially useful when provisioning servers thru something like Cloudbolt and having a system reboot in the middle of a run will cause failures.

@@ -219,6 +220,13 @@ def pending_ccm_reboot?
reboot
end

def pending_domain_join?
path = 'SYSTEM\CurrentControlSet\Services\Netlogon\JoinDomain'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we also need to look at AvoidSpnSet as well?

The DSC resource (forked by MS employee @bcwilhite) checks that value as well in https://github.com/bcwilhite/PendingReboot/blob/aecb6e44ea3ce5d44c2c740d2c08eda79e955419/Public/Test-PendingReboot.ps1#L162-L165

@Iristyle
Copy link
Contributor

Iristyle commented Jan 14, 2019

So this is a pretty interesting (and useful!) addition to the module. Thanks @razorbladex401 !

Oddly, there appears to be scant information on this particular registry key (https://serverfault.com/a/735854), though some prior art at https://gallery.technet.microsoft.com/scriptcenter/Get-PendingReboot-Query-bdb79542 provided by a Microsoft employee

The changelog there states

 07/27/2015:
-Added Domain Join detection to PendComputerRename, DOES NOT currently detect Workgroup Join/Change.

So I'm inclined to believe this is a legitimate thing to check for, but we may want to do a little vetting here manually (it will be difficult to vet this in an automated fashion given it requires a domain)

@Iristyle Iristyle changed the title MODULES-8201: Add pending reboot due to domain join for windows. (MODULES-8201) Add pending reboot due to domain join for windows. Jan 14, 2019
… checks if the JoinDomain key exists under the netlogon service. When pending_domain_join is used it will reboot a Windows server due to the server being in the process of joining a domain.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants