-
Notifications
You must be signed in to change notification settings - Fork 139
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
xADDomain: Set-TargetResource Throws Terminating Error When DC Promotion in Progress #73
Comments
@kwirkykat I don't know how we fix this, but a timeout is not the right solution. In theory, the LCM should not be restarting/continuing with the configuration until after AD is installed/initialised. I presume this is specific to the Azure DSC service/extension starting before the domain is actually up-and-running, invoking the LCM sooner than it would start naturally? Perhaps @HemantMahawar or @TravisEz13 can shed some light on how or what is different with the Azure extension? |
In a reboot LCM will restart almost immediately after a reboot. Some way we need to know what to wait on. Depending on the machine it can take some time for the directory to actually become available on the machine. We need some resource to tell us how to wait. |
I'm getting this in an on-prem machine using Server 2016 TP4 - In this instance LCM seems to not be kicking off immediately after the reboot or immediately erroring out with the Error as mentioned above. However if left until the LCM does its consistency check it seems to just kick off again with no issue and the configuration completes as expected. I believe that this may be an issue to Server 2016 TP4 and i'm spinning up a 2012 environment atm to see if this issue happens there as well. |
I'm getting some long delays (5+ minutes) promoting Windows Server 2016 TP4 to a DC using xADDomain. It does eventually get there though. I have not seen this error though: |
The issue doesn't occur on a 2012R2 VM with WMF5 so I think it is limited to Server 2016 TP4 |
@kwirkykat @kilasuit I've tested this today on both 2012 R2 and 2016 TP4. There is no issue with 2012 R2 with WMF4 and event log is clear. 2016 TP4 is another issue entirely. As @PlagueHO mentioned, it does seem to take a lot, lot longer to promote to a DC on TP4. This might be causing the issue? Here are the DesiredStateConfiguration errors logged in the Event Viewer:
You run the existing configuration (or let the consistency check naturally occur) and it then passes. I haven't a clue how to query whether a DC promotion is in progress. Perhaps this should be raised with the server team @TravisEz13 ? |
@iainbrighton I don't think you have to query. Just create a list of errors which you retry for and the rest you abort. I don't think we will find a reliable way to find if the DC promotion is in progress... only if it is complete. |
@iainbrighton @kwirkykat @PlagueHO @TravisEz13 I have seen this issue on W2K16 TP4 bits as well. I had started making some change to the resource, but never finished the work. My thought process was as follows:
Does it sounds like a good approach for this specific problem? |
@HemantMahawar That sounds good to me. @iainbrighton @PlagueHO @TravisEz13 Thoughts? |
@kwirkykat, @HemantMahawar - sounds good, although looping infinitely might not be a good idea - I prefer a "long number" to be safe. |
We also encounter this issue extensively running 2012R2, WMF 5 & DSC Extension on Azure. On the second reboot, it find the domain and I get: on the third reboot of my sequence It usually don't find the domain: VERBOSE: [2016-06-15T19:33:01] [VERBOSE] [SLAPPDEVDC0]: I know you see cADDomain as the resource but it is xADDomain with one more parameter that we added for DNS. |
Wondering whether this is being addressed? Testing with TP5 repros for me 100%. |
@markreno, what version of the resource where you using? |
@TravisEz13 Version is 2.12.0.0 |
@markreno This currently does not look like it has been addressed since 2.12 |
@markreno - 2016 TP5 is still Preview software though and I expect that the issue we see on there will be fixed at RTM unless it is a change in how the cmdlet that does the underlying domain install is completed (which could easily be the case) @slapointe - Regarding the Azure DSC Extension it could as easily be an issue with that as I have no issues at all with this on an on-premises 2012R2 Hyper-V Vm with WMF4, WMF5 or the WMF5.1 preview I think the Issue should be renamed to highlight its 2016 & Azure DSC where the issue is because this doesn't happen with on 2012R2 machines elsewhere |
Not sure what PR your alluding to @iainbrighton as the link came out as for this issue |
DOH! Try #101 instead :)
|
If you set not a DataBasePath the error message could: |
Just tried on 2016 RTM - same failure. |
Yep, I am getting the same failure as well with 2016, redeploying with 2012R2 datacenter right now to see if that makes a difference. Edit - it did make a difference in that now the error I am getting is that MSFT_xWaitForADDomain isn't finding the domain after x retries, but that domain is there after remoting in and checking, so I will update the timers there for awhile longer and see if that makes a difference. |
@oradcliffe Just a word of warning - the |
Yep, and for simplicity's sake I am passing the same creds I use to set up the machine as those creds in |
Hi there, I am getting the same error on my end. Do you all know of a work-around that we can use in the mean time? |
You can use the Module from the PR #101 on https://github.com/slapointe/xActiveDirectory/tree/Issue73. I use this for some time now and it works for me. |
@StefanSchoof thanks a lot, I did try it and it is working for me as well, so two thumbs up :) |
Yeah agreed. PR 101 seems to work for me also. 2.13.0.0 fails. |
…erenced in this bug report: dsccommunity/ActiveDirectoryDsc#73 At the time of writing the MSFT master version does not seem to work with Server 2016 domain controllers but the branched version (here) does. So this version is the one that must be added to the DSC configuration .zip file.
I have the same experience - I was hard-down until I switched to the PR 101 code. I would also up-vote that this issue get resolved somehow. |
@kwirkykat, thanks! |
The first time DSC tries to install xADDomain, it runs Install-ADDSForrest (or Install-ADDSDomain but I haven't tried that one) appropriately.
If DSC comes back again to run this resource while the domain is still starting up (which happens in the Azure DSC extension), the Get method (which is run by the Test method) will catch the resulting ADServerDownException error and then return nothing.
This triggers the resource to call the Set method again which calls Install-ADDSForrest (or Install-ADDSDomain) again.
This second call to Install-ADDSForrest spits out an ugly error:
[ERROR] Verification of prerequisites for Domain Controller promotion failed. The specified argument 'DataBasePath' was not recognized
This causes the entire configuration to fail and nothing that depends on this resource can run.
But the call to Install-ADDSForrest has actually already happened, so the machine is eventually promoted to a domain controller successfully.
This issue is breaking a lot of ARM templates with AD in Windows Server 2016 since it seems to take longer for DC promotion to occur.
A quick work-around to this problem is to retry retrieving the domain in the Get method until it is found or the resource hits a timeout.
The text was updated successfully, but these errors were encountered: