Closed cdeli closed 6 years ago
Should it be Node $AllNodes.Where{$_.Role -eq 'FirstServerNode' }.NodeName
? :thinking: I haven’t tested it as I don’t have access to a computer now.
I attempted it with that. It does not get that far it seems. No matter how I have that set up, I get this error as the node names are responding as $null apparently. I have no idea why.
You have two NodeName = ‘*’
, if you remove one, is it still the same problem? How do you execute the configuration “rdshnew”?
I fixed that nodename in my code, that was an oversight when i was reverting back to the first.
Right from Azure Automation DSC GUI. I can't get it to compile though without getting that error which tends to lead to $nodename being $null.
When using a configuration data block you need to user PowerShell to compile it in Azure Automation. Look at AzureRm cmdlet for compiling a configuration (don’t remember the actually name of the cmdlet now).
So I should remove it from the DSC file and run it separate against the compiled file "rdshNew"?
You should pass the $ConfigurationData
in the parameter ConfigurationData
. See
https://docs.microsoft.com/en-us/azure/automation/automation-dsc-compile
It does not matter. No matter what I do I am getting the same error. This is an issue with it not accepting a wildcard as NodeName it seems.
Even without any config data in the DSC file, I am getting the exact same error.
Ok after using an article I found how to get that error resolved. I am now running into this error
"The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: An exception was raised while processing Node 'Master': Defining node 'Additional' inside the current node 'Master' is not allowed since node definitions cannot be nested. Please move the definition for node 'Additional' to the top level of the configuration 'rdshNew'. At line:84 char:5 + Node"
Now I understand what this error means, however, as you can see in the code above, these are seperate Node calls, they are not nested. My config data looks as follows:
$Parameters = @{
'Creds' = "Creds"
}
$ConfigData =
@{
AllNodes =
@(
@{
NodeName = '*'
ClusterName = 'Cluster01'
ClusterIPAddress = '<IP>'
PSDscAllowPlainTextPassword = $true
},
@{
NodeName = "Master"
Role = "FirstServerNode"
},
@{
NodeName = "Additional"
Role = "AdditionalServerNode"
}
)
}
Not sure why it believes this is nested when it is not at all.
Ah I see now in your initial code in the issue description that you had one node block nested. The line ‘Node $AllNodes.Where{ $.Role -eq 'AdditionalServerNode' -and $.NodeName -ne 'Contoso-SVR-000000' }’. I did not look so far in the code to be honest. :/
I'm having exactly the same issue. @cdeli did you solve the problem by any chance?
I have no idea what is even going on at this point. I have done everything to make this work but apparently nodename is not accepted. I am running version 1.10.0.0 of xFailOverCluster in Azure Automation and no matter what I do I get the error in the title.