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

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

Open
MikeCantCode opened this issue Aug 11, 2022 · 0 comments

Comments

@MikeCantCode
Copy link

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.

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