Skip to content

Conversation

@ipspace
Copy link
Owner

@ipspace ipspace commented Jan 23, 2026

No description provided.

@ipspace
Copy link
Owner Author

ipspace commented Jan 23, 2026

It turns out that it's unsafe to configure cEOS container before its SSH server is ready. As I wanted to be able to configure them without Ansible, I had to implement the "SSH readiness" check in Python (in netlab initial). This PR implements the core functionality; there are still a few rough edges that will get polished after merging this one. For example, there's no need to repeat the test in the Ansible playbook.

Comments (including the usability of the feature) are highly recommended.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an SSH-based device readiness check that runs as part of netlab initial configuration deployment.

Changes:

  • Extends netlab initial --debug options to include an ssh debug flag.
  • Introduces a new SSH readiness implementation (netsim/cli/initial/ready.py) and a dispatcher for readiness steps based on netlab_ready.
  • Invokes readiness checks from netlab initial deployment flow before configuration deployment.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
netsim/cli/initial/utils.py Adds ssh to the hidden debug choices so SSH readiness diagnostics can be enabled.
netsim/cli/initial/ready.py Implements the SSH readiness check and a device_ready() dispatcher keyed off netlab_ready.
netsim/cli/initial/deploy.py Calls ready.device_ready() before pushing configurations to devices.

@ipspace
Copy link
Owner Author

ipspace commented Jan 23, 2026

there are still a few rough edges

Speaking of rough edges: interrupting "netlab up" (which calls "netlab initial") with ctrl/c while we're waiting for SSH servers works (as in "kills everything and gets back to bash prompt") but does not generate the "user interrupted.." message even though the code is already wrapped into try/except KeyboardInterrupt block in the netlab/initial run function.

Any potential solution would be highly appreciated ;) /cc @Muddyblack

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.

Move the CLAB/SSH readiness check into "netlab initial"

2 participants