Skip to content

cTentacleAgent: Set-TargetResource doesn't create an agent certificate after the initial install #299

@MikeCantCode

Description

@MikeCantCode

cTentacleAgent: Set-TargetResource doesn't create an agent certificate after the initial install

Error:

Registration fails if a certificate wasn't generated during the initial installation.

- LCM:  [ Start  Set      ]  [[cTentacleAgent]DirectResourceAccess]'
-                            [[cTentacleAgent]DirectResourceAccess] Checking if Tentacle is installed'
-                            [[cTentacleAgent]DirectResourceAccess] Tentacle present: True'
-                            [[cTentacleAgent]DirectResourceAccess] Checking for Windows Service: OctopusDeploy Tentacle'
-                            [[cTentacleAgent]DirectResourceAccess] Windows service: Stopped'
-                            [[cTentacleAgent]DirectResourceAccess] Configuring Tentacle...'
-                            [[cTentacleAgent]DirectResourceAccess] Upgrading/modifying Tentacle...'
-                            [[cTentacleAgent]DirectResourceAccess] Public host name: SomeComputer'
-                            [[cTentacleAgent]DirectResourceAccess] Executing command ''C:\Program Files\Octopus Deploy\Tentacle\\Tentacle.exe register-with --instance Tentacle --server https://OctoServerURL --name SomeName --apiKey ********** --force --console --comms-style TentaclePassive --publicHostName SomeComputer --environment SomeEnvironment --role SomeRole --tenant SomeTenant --tenanted-deployment-participation TenantedOrUntenanted'''
-                            [[cTentacleAgent]DirectResourceAccess] No certificate has been generated for this Tentacle. Please run the new-certificate command first.'
-                            [[cTentacleAgent]DirectResourceAccess] done.'
-                            [[cTentacleAgent]DirectResourceAccess] Starting OctopusDeploy Tentacle'
-                            [[cTentacleAgent]DirectResourceAccess] Finished'
- LCM:  [ End    Set      ]  [[cTentacleAgent]DirectResourceAccess]  in 1.9050 seconds.'
- LCM:  [ End    Set      ]    in  1.9600 seconds.'
- Operation 'Invoke CimMethod' complete.
- Time taken for configuration job to complete is 2.067 seconds

Issue:

Set-TargetResource should create an agent certificate if necessary in the Register-Tentacle and Add-TentacleToWorkerPool functions when $RegisterWithServer evaluates to True. Creating an agent certificate is currently only handled in the New-Tentacle function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions