sql-server-2014-alwayson-dsc - DSC Failure on Backup DC
Update 1 - it's not the Install-DscExtensionPhaseTwo function, that doesn't appear to ever be called..
Update 2 - manually creating the file "Install-Continue.dsc" (normally done in "Step 2" on line 372 of Install.psm1) and re-running enable.ps1 continues to run successfully, and pulls down CreateADBDC.ps1.0 as expected
When deploying this ARM template, it repeatedly fails to enable the DSC extension on the backup DC.
After diving into the DSC Logs from the dc-bdc machine, it seems that the issue could be ~~in the function Install-DscExtensionPhaseTwo within the Install.psm1 module, based on the log entries below; from what I can gather I would expect to see a log entry for "Verifying that the WMF package was installed..."~~ that the script is falling through Step 3 of the Install.psm1 module, and perhaps Step 2 isn't creating the Install-Continue.dsc file in the DSCWork directory.
CommandExecution_0:

CommandExecution_1:

CommandExecution_2:

Adding @simongdavies to take a look
Updated comment
Updated comment again
This looks like it is an issue with DSC 1.7 extension, there have been some bug fixes to the install in later issues which might resolve this, I need to update the template to use 2.4.
Updating to 2.4 requires a breaking change to the DSC Resources so I need to come up with a way of versioning the resources as the repo is being used at runtime.
I am on vacation at the moment so I will get this done early next week.
In the meantime trying a new deployment may work as this is an intermittent issue, the simplest way of retrying is to delete the entire RG and re-create it, alternatively you can delete the VM that the error occurred on and the underlying disks and try a new deployment to the RG, at the moment just trying a new deployment will not work.
Thanks for logging this issue @scottzilla
Yup, that seems to be it. We tried 2.4, and the DSC extension enables properly, and the issue we’re seeing now is this one: xActiveDirectory issue 30 also referenced in #556
The problem seems to be that the primary domain controller doesn't reboot properly. Version 2.0 of the DSC Extension added support for the RebootNodeIfNeeded flag. Once you change to version 2.1 of the extension and modify the LocalResourceManager configuration node in CreateADBDC.ps1 and CreateADPDC.ps1 to look like this:
LocalConfigurationManager
{
ActionAfterReboot = 'ContinueConfiguration'
ConfigurationMode = 'ApplyOnly'
RebootNodeIfNeeded = $true
}
as discussed at: http://blogs.technet.com/b/ashleymcglone/archive/2015/03/20/deploy-active-directory-with-powershell-dsc-a-k-a-dsc-promo.aspx things seem to work better.
I did also have to bump to the $RetryCount since once during testing the PDC was rather slow to come up. I'll put together a pull request with the fixes above tomorrow.
Interesting. I'll try it out Christoph. Thanks!
This was the breaking change I was referring to above, in 1.7 I had to explicitly stop configuration from continuing after a reboot as it caused a race condition between 2 concurrent configurations, in addition specifying rebootofneeded =$true with 1.7 will cause failures, I think that we need to come up with a way of versioning the resource packages to prevent breaking existing users.
Still broke. Can't find the domain in the backup domain controller setup resource. I'm wondering if I should add another xWaitForADDomain resource before it just to give it more time. I already modified the Set and Test to wait a bit more time.
@scottzilla THere was a major update today to this template. Give it a try and see if it's still an issue
Doesn't work for me, have one domain controller up and I use the json join domain similar to here http://www.ravichaganti.com/blog/building-azure-resource-manager-templates-using-domain-join-extension/, so I know the domain exists. The computer that is simply joining the domain joins just fine, logging on to it you can see it's joined, and it shows up as a computer in ADUC for the domain. However, after that, I am trying to run a DSC extension with xADDomainController to create a second DC in the domain but it says it can't find it. I have tried using the same credentials as was used to create the first DC, same issue, tried separate credentials, same, tried using different credentials when creating the second DC VM and using those for DC promo, same issue. Anyone have any ideas?