Skip to content

Update Start-AzAutomationDscNodeConfigurationDeployment to create a new JobId on each execution #9184

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

Merged
merged 4 commits into from
May 25, 2019

Conversation

lwajswaj
Copy link
Contributor

Description

This PR fixes initially error shown in issue #8921; the error was related to a wrong Guid generation for the job. Last error is given because, it seems, runbook "Deploy-NodeConfigurationToAutomationDscNodesV1" has some underlying error.

The cmdlet now works but the runbook is erroring out; somebody with access to the runbook should continue debugging. This is what my tests show:

PS C:\Users\Leandro> Start-AzAutomationDscNodeConfigurationDeployment -NodeConfigurationName "LinuxConfig.localhost" -NodeName LinuxVM01 -ResourceGroupName TestAutomation -AutomationAccountName TestAutomation -Force

ResourceGroupName     : TestAutomation
AutomationAccountName : TestAutomation
JobId                 : c63d82ba-c449-4cfa-a6f0-ec9f00697a00
Job                   : Microsoft.Azure.Commands.Automation.Model.Job
JobStatus             : New
NodeStatus            :
NodeConfigurationName : LinuxConfig.localhost
JobSchedule           :
JobScheduleId         : 00000000-0000-0000-0000-000000000000


PS C:\Users\Leandro> $Job = Get-AzAutomationDscNodeConfigurationDeployment -JobId c63d82ba-c449-4cfa-a6f0-ec9f00697a00 -ResourceGroupName TestAutomation -AutomationAccountName TestAutomation
PS C:\Users\Leandro> $Job

ResourceGroupName     : TestAutomation
AutomationAccountName : TestAutomation
JobId                 : c63d82ba-c449-4cfa-a6f0-ec9f00697a00
Job                   : Microsoft.Azure.Commands.Automation.Model.Job
JobStatus             : Failed
NodeStatus            : {System.Collections.Generic.Dictionary`2[System.String,System.String]}
NodeConfigurationName : LinuxConfig.localhost
JobSchedule           :
JobScheduleId         : 00000000-0000-0000-0000-000000000000


PS C:\Users\Leandro> $Job.Job

ResourceGroupName      : TestAutomation
AutomationAccountName  : TestAutomation
JobId                  : c63d82ba-c449-4cfa-a6f0-ec9f00697a00
CreationTime           : 11/05/2019 22:17:25 -03:00
Status                 : Failed
StatusDetails          : None
StartTime              : 11/05/2019 22:17:44 -03:00
EndTime                : 11/05/2019 22:17:44 -03:00
Exception              : Could not finish the NodeConfiguration Deployment. Following exception occurred : Cannot bind parameter 'Id'. Cannot convert value "/subscript
                         ions/<subscriptionId>/resourceGroups/TestAutomation/providers/Microsoft.Automation/automationAccounts/TestAutomation/nodes
                         /a1e2e575-e547-41af-8c70-360f92eb12ba" to type "System.Guid". Error: "Guid should contain 32 digits with 4 dashes
                         (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).".Exception.Message (Could not finish the NodeConfiguration Deployment. Following exception occurred :
                         Cannot bind parameter 'Id'. Cannot convert value "/subscriptions/<subscriptionId>/resourceGroups/TestAutomation/providers/
                         Microsoft.Automation/automationAccounts/TestAutomation/nodes/a1e2e575-e547-41af-8c70-360f92eb12ba" to type "System.Guid". Error: "Guid should
                         contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).".Exception.Message)
LastModifiedTime       : 11/05/2019 22:17:44 -03:00
LastStatusModifiedTime : 11/05/2019 22:17:44 -03:00
JobParameters          : {NodeConfigurationName, AutomationAccountName, ListOfNodeNames, ResourceGroupName…}
RunbookName            : Deploy-NodeConfigurationToAutomationDscNodesV1
HybridWorker           :
StartedBy              : {scrubbed}


PS C:\Users\Leandro>

Checklist

@MiYanni
Copy link
Contributor

MiYanni commented May 14, 2019

@avkaur Please review this PR when you have time available.

@MiYanni
Copy link
Contributor

MiYanni commented May 14, 2019

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@lwajswaj
Copy link
Contributor Author

Any update on this PR?

@cormacpayne
Copy link
Member

/azp run

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 3 pipeline(s).

@markcowl markcowl merged commit b2dc7c1 into Azure:master May 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants