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

Connection Test Only Health Check Runs Scripts #9142

Open
droyad opened this issue Nov 25, 2024 · 0 comments
Open

Connection Test Only Health Check Runs Scripts #9142

droyad opened this issue Nov 25, 2024 · 0 comments
Labels
kind/bug This issue represents a verified problem we are committed to solving

Comments

@droyad
Copy link
Contributor

droyad commented Nov 25, 2024

Severity

Fails health check for targets without Bash

Version

Introduced in 2024.2.5864 via this PR, toggled on by default in 2024.3.5805

Latest Version

I could reproduce the problem in the latest build

What happened?

When health checking a target where the machine policy is set to "Only perform connection test (useful for raw scripting)" it fails if bash is not available. This is unexpected as it should not be trying to run any scripts on the target.

This is for a SSH target. I have not checked if it applies to tentacle targets (or whether it should).

Reproduction

  • Create a VM that does not have bash
  • Enable SSH to that VM
  • Configure a machine policy with Only perform connection test (useful for raw scripting)
  • Create a SSH target for that machine with that machine policy
  • Perform a health check

Error and Stacktrace

/bin/bash shell missing.
SSH connection disposed.
Exit code: 127
The remote script failed with exit code 127 Octopus.Server.Orchestration.Targets.Tasks.ActionHandlerFailedException: The remote script failed with exit code 127
   at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.SuccessArbitrator.ThrowIfNotSuccessful(IActionHandlerResult result) in ./source/Octopus.Server/Orchestration/ServerTasks/Deploy/ActionDispatch/SuccessArbitrator.cs:line 25
   at Octopus.Server.Orchestration.ServerTasks.Deploy.ActionDispatch.AdHocActionDispatcher.Dispatch(ExecutionsMachine machine, ActionHandlerInvocation actionHandler, ITaskLog taskLog, CancellationToken cancellationToken, VariableCollection variables) in ./source/Octopus.Server/Orchestration/ServerTasks/Deploy/ActionDispatch/AdHocActionDispatcher.cs:line 80
   at Octopus.Server.Orchestration.ServerTasks.HealthCheck.Providers.SshEndpointHealthProvider.ExecutePreCheckScript(Machine machine, TimeSpan cancellationTimeout, CancellationToken cancellationToken) in ./source/Octopus.Server/Orchestration/ServerTasks/HealthCheck/Providers/SshEndpointHealthProvider.cs:line 50
   at Octopus.Server.Orchestration.ServerTasks.HealthCheck.Providers.MachineHealthProvider.PerformHealthCheckAndSaveResult(Machine machine, CancellationToken cancellationToken, ExceptionHandling exceptionHandling) in ./source/Octopus.Server/Orchestration/ServerTasks/HealthCheck/Providers/MachineHealthProvider.cs:line 92
Octopus.Server version 2025.1.1477 (2025.1.1477)

More Information

Health Check task log

Workaround

None available

@droyad droyad added the kind/bug This issue represents a verified problem we are committed to solving label Nov 25, 2024
@droyad droyad changed the title Connection Test Only health check runs bash scripts Connection Test Only Health Check Runs Scripts Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug This issue represents a verified problem we are committed to solving
Projects
None yet
Development

No branches or pull requests

1 participant