Skip to content
This repository has been archived by the owner on May 30, 2022. It is now read-only.

Trento runner reports all checks in green if the ssh command is not available #277

Closed
arbulu89 opened this issue Sep 29, 2021 · 1 comment · Fixed by #534
Closed

Trento runner reports all checks in green if the ssh command is not available #277

arbulu89 opened this issue Sep 29, 2021 · 1 comment · Fixed by #534
Assignees
Labels
bug Something isn't working prio low runner Related to the Trento Runner component

Comments

@arbulu89
Copy link
Contributor

During the usage of the initial version of the K3S and trento container (distroless), we had the scenario where the runner was reporting all checks as green (even when they fail), as it was not finding the ssh command within the container:

Unable to execute ssh command line on a controller due to: [Errno 2] No such file or directory: b'ssh'

This is pretty strange scenario, but it might happen.
There are different potential fixes:

  • Do some ansible code to set as unresolved if this scenario happens, and besides this report the exact cause of the issue
  • Check in the golang runner code if ssh tool is available
  • Etc

How to reproduce
Reproducing the issue is not that simple using plain Trento binaries. I have done the next:

  • Update the runner/consultemplate.go file the line 45, and add the ansible_connection=ssh value. It would look like this: {{ $nodename }} %[1]s={{ keyOrDefault (printf "%[4]s" $clusterId) "" }} ansible_connection=ssh ansible_host={{ $host }} ansible_user={{ $user }}
  • Build the the image
  • Enable some check that you know that it should fail
  • In the machine where the runner is being executed, rename the ssh tool -> mv /usr/bin/ssh /usr/bin/ssh.backup

Following these steps the same output should be there

@arbulu89 arbulu89 added the bug Something isn't working label Sep 29, 2021
@stefanotorresi stefanotorresi changed the title Trento runner reports all checks in green is ssh command is not available Trento runner reports all checks in green if the ssh command is not available Sep 29, 2021
@stefanotorresi stefanotorresi self-assigned this Sep 29, 2021
@arbulu89 arbulu89 added the runner Related to the Trento Runner component label Nov 30, 2021
@arbulu89
Copy link
Contributor Author

Issue still happening. It doesn't have an easy solution as it is somehow an ansible internal error. When ssh is not available the task is set as ignored but it doesn't really return any value.
In any case, as we now already install ssh correctly in the docker container, the issue is not likely to happen.
I would consider the issue a low priority.

@arbulu89 arbulu89 linked a pull request Dec 3, 2021 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working prio low runner Related to the Trento Runner component
Development

Successfully merging a pull request may close this issue.

3 participants