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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic smoke test for SSH management connectivity #342

Merged
merged 3 commits into from Mar 12, 2024
Merged

Basic smoke test for SSH management connectivity #342

merged 3 commits into from Mar 12, 2024

Conversation

mzagozen
Copy link
Collaborator

@mzagozen mzagozen commented Mar 5, 2024

Just make sure at least something is listening on the management interface. Not the full implementation as proposed in #53, but it's better than nothing 馃槃

I will update the vrnetlab/ci-builder image in docker hub too.

@mzagozen
Copy link
Collaborator Author

mzagozen commented Mar 6, 2024

These tests do not work in GitHub Actions because the test job runs in a container provided by https://github.com/actions/runner-container-hooks. This container has access to the hosts /var/run/docker.sock so it can build images and start sibling test device containers. It is attached to an isolated job-specific network. named github_network_<uuid>. The sibling test containers are attached to the default bridge network so of course the two cannot communicate. I need to figure out how to grab the name of the job-specific network, push it into the test job container and attach the test device container to it.

@plajjan
Copy link
Collaborator

plajjan commented Mar 6, 2024

@mzagozen should the test be run in a "test" container that we start from the main job container? That way it'll get attached to the same network as the other containers!? It also means if we need / want more tooling, that can end up in the test container image rather than need to be installed in the main job container?!

Blaz Dolenc and others added 2 commits March 6, 2024 10:32
On cat8000v often something goes wrong during install and the
consequence is that we are unable to SSH to the management interface.
This test detects this and prevents push of such broken image to the
registry.
@mzagozen mzagozen force-pushed the test-ssh branch 4 times, most recently from 016233f to a0fae10 Compare March 6, 2024 10:36
@mzagozen
Copy link
Collaborator Author

mzagozen commented Mar 6, 2024

Good suggestion, I actually had a draft version where I just ran sshpass in a container. To run the full test script I had to add the extra step of copying the test script to the container because we can't bind mount a path from within the sibling job script container.

It works and is future proof enough that we can extend the test suite in future. The failures we're seeing now are a result of actual csr and xrv9k build and/or startup failures.

@mzagozen
Copy link
Collaborator Author

Will investigate and address the specific platform version failures separately.

@mzagozen mzagozen merged commit 01b3a3f into master Mar 12, 2024
11 of 13 checks passed
@mzagozen mzagozen deleted the test-ssh branch March 12, 2024 10:43
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

Successfully merging this pull request may close these issues.

None yet

2 participants