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

Azure DevOps Automation breaks on MOF Upload if server name contains hyphen #111

Open
danielniccoli opened this issue Sep 1, 2021 · 0 comments

Comments

@danielniccoli
Copy link
Contributor

Our server names contain hyphens. This breaks the Azure DevOps automation in a specific way. When the release pipeline script is triggered, that uploads the MOF files to Azure, then you'll run into an error (that doesn't stop execution).

2021-09-01T12:12:35.2831940Z VERBOSE: Performing the operation "Import" on target "D:\a\r1\a\_Windows Server DSC-CI\MOF\server-xyz-123.mof".
2021-09-01T12:13:06.5410128Z Import-AzureRmAutomationDscNodeConfiguration : Long running operation failed with status 'NotFound'.

The error message is misleading. What actually causes the error can only be found out when uploading the mof file in the Azure portal:

image

I haven't found an easy workaround for this, because the configuration name is derived from the mof's filename exactly at this line of the automation script:

# […]
Import-AzureRmAutomationDscNodeConfiguration -ResourceGroupName $env:ResourceGroupName -AutomationAccountName $env:AutomationAccountName -Path $config.FullName -ConfigurationName $config.BaseName -Verbose -Force
# […]

So changing the ConfigurationNames in the node's YAML doesn't actually fix the problem.

NodeName: server-xyz-123
Environment: Prod
Location: Frankfurt

# […]

LcmConfig:
  ConfigurationRepositoryWeb:
    Server:
      # ConfigurationNames: server-xyz-123.server-xyz-123 # BEFORE
      ConfigurationNames: serverxyz123.server-xyz-123 # AFTER, no fix

Is there a fix for this that I do not see?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant