Hi,
I am trying to use Azure Automation to install and configure a polling tentacle with OctopusDSC. In my scenario the steps as as follows
- Azure ARM resource group is deployed from a template. Each VM in the template is configured with DSC extension to enroll Azure automation account.
- Azure Automation DSC kicsoff in (0-30 minutes) and runs cTentacleAgent OctopusTentacle
What I am seeing is that the DSc from step2 fails with error
"InnerException": {
"ErrorRecord": "Command returned exit code 100",
"Message": "Command returned exit code 100",
"InnerException": "System.Management.Automation.RuntimeException: Command returned exit code 100",
"TargetSite": "System.Collections.ObjectModel.Collection`1[System.Management.Automation.PSObject] Invoke(System.Collections.IEnumerable)",
"StackTrace": " at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings settings)
at Microsoft.PowerShell.DesiredStateConfiguration.Internal.ResourceProviderAdapter.ExecuteCommand(PowerShell powerShell, ResourceModuleInfo resInfo, String operationCmd, List`1 acceptedProperties, CimInstance nonResourcePropeties, CimInstance resourceConfiguration, LCMDebugMode debugMode, PSInvocationSettings pSInvocationSettings, UInt32u0026 resultStatusHandle, Collection`1u0026 result, ErrorRecordu0026 errorRecord, PSModuleInfo localRunSpaceModuleInfo)",
"Source": "System.Management.Automation",
},
Interstingly the subsequent cycles of DSC think the VM is compliant. When I looked into the VM I can see that the tentacle is installed but not configured. If I remove the tentacle instance and run the DSC configuration from the server it works fine and tentacle is added to Octopus server.
Following are two item I can suggest as improvements for this module
- I found this is related to http://help.octopusdeploy.com/discussions/problems/13114-tentacle-new-certificate-throwing-unauthorisedaccessexception. The server does not have profile loaded and so tentacle configuration fails, It would have been nice if the error message was in DSC logs shows what tentacle.exe returned rather than “Command returned exit code 100”.
- The reason why subsequent DSC run shows the machine is complaint is that cTentacleAgent module doesn’t truly check if tentacle is configured it checks if tentacle is installed and configuration was started. A placeholder file is placed when configuration is started which is checked in subsequent runs. Probably it would be better if this file is placed when all tentacle.exe steps run without error.
Kamal