Skip to content

Containerized controller#434

Merged
olichtne merged 7 commits into
LNST-project:masterfrom
enhaut:nv
Jun 18, 2026
Merged

Containerized controller#434
olichtne merged 7 commits into
LNST-project:masterfrom
enhaut:nv

Conversation

@enhaut

@enhaut enhaut commented Mar 30, 2026

Copy link
Copy Markdown
Member

Description

Better support for controller containerization. Now, it suports agent auto setup by test_environment.json file and also tests db defined in test_db.json file. Container is build and after merging its pushed to quay https://quay.io/repository/lnst/lnst-controller repository (takes ~5minutes). Both :latest and :commit sha manifests are created, commit sha manifest refers to build based on specific LNST version on both controller and agents.

Tests

Ran locally against agents without LNST. It installed LNST and ran tests defined in test db:

podman run -v $(pwd)/results/:/root/.lnst/results:z -v machine_keys:/root/.ssh:ro -v machines.json:/lnst/container_files/controller/pool/test_environment.json:z --rm -it quay.io/sdobron/lnst-test

Resolves #433

Call `machine_cleanup()` before `accept_connection()` to destroy
the old `InterfaceManager` and its netlink socket. Without this,
stale netlink events accumulate in the buffer and get forwarded
to the new controller eventhough message is irrelevant for current
controller session.

Resolves: LNST-project#433
@enhaut enhaut force-pushed the nv branch 2 times, most recently from e5f004b to ba2090e Compare June 2, 2026 10:14

@jtluka jtluka left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall OK, just minor issues and suggestions.

Comment thread container_files/controller/container_runner.py Outdated
Comment thread container_files/controller/container_runner.py Outdated
Comment thread container_files/controller/create_pool.py Outdated
Comment thread container_files/controller/create_pool.py
Comment thread container_files/controller/Dockerfile
Comment thread container_files/controller/setup_agent.sh
Comment thread docs/source/extensions.rst Outdated
Comment thread docs/source/extensions.rst Outdated

@Axonis Axonis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overall looks good, just nits.

Comment thread container_files/controller/entrypoint.sh Outdated
Comment thread container_files/controller/container_runner.py Outdated
Comment thread container_files/controller/create_pool.py Outdated
Comment thread container_files/controller/container_runner.py Outdated
Comment thread container_files/controller/container_runner.py Outdated
@enhaut enhaut force-pushed the nv branch 2 times, most recently from a84ca74 to b0351ed Compare June 9, 2026 07:38
@enhaut enhaut requested review from Axonis and jtluka June 9, 2026 07:39
jtluka
jtluka previously approved these changes Jun 9, 2026
Axonis
Axonis previously approved these changes Jun 10, 2026
Comment thread container_files/controller/container_runner.py Outdated
Comment thread container_files/controller/container_runner.py Outdated
Comment thread container_files/controller/container_runner.py
Comment thread lnst/Controller/MachineMapper.py Outdated
Comment thread .github/workflows/container-build.yml
@enhaut enhaut dismissed stale reviews from Axonis and jtluka via af8813e June 15, 2026 11:18
@enhaut enhaut requested a review from olichtne June 15, 2026 11:19
This should be integrated into the Controller container to automatically
create a temporary pool from a single input file that will be used by
the controller runner.

Signed-off-by: Ondrej Lichtner <olichtne@redhat.com>
enhaut and others added 5 commits June 15, 2026 15:51
Added support for controller to pick up tests from `test_db.py`
file.
Containerized controller now parses `test_environment.json` file with
list of hosts that are supposed to be used in test.
Controller tries to ssh into that machines with
either ssh keys (these needs to be mounted in
contianer's `~/.ssh/`) or password provided in
plaintext in `test_environment.json` file.

If LNST is already installed on remote agents,
nothing happens. It just checks whether it's
running.
@olichtne olichtne merged commit 8c14299 into LNST-project:master Jun 18, 2026
6 checks passed
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.

Incomplete cleanup of LNST managed interfaces

4 participants