Repository navigation
fix(tmachine): restore package-installed Podman qualification - #4289
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
Label |
|
/ok-to-test 221cf8a |
|
/ok-to-test 860aa53 |
|
/ok-to-test 135ce70 |
ba4b773 to
a74a797
Compare
|
This pull request has had no activity for 14 days and is now marked stale. |
|
#5137 ( What changes
Plan for this PR
One thing to carry over: the reference container in #5137's test runs through |
a74a797 to
0f95bee
Compare
…ateway An environment overrides gateway settings by writing the tables to change to /etc/openshell-test/gateway-overrides.toml. Every installer applies the file with merge-gateway-toml.py: the binaries installer to the configuration it generates, and the deb and rpm installers to the service user's gateway.toml, which starts from the package's default configuration instead of replacing it. Each key replaces the same key in the base file or is added to its table, comments are kept, and a result that is not valid TOML fails the setup. Run the Podman user-namespace driver suites with the rpm installer. Signed-off-by: Evan Lezar <elezar@nvidia.com>
Detect the installer in the e2e-podman playbook: the binaries installer keeps its HTTP gateway, and the package installers use /usr/bin/openshell and the registered openshell gateway. Run the lane on rpm in CI. Signed-off-by: Evan Lezar <elezar@nvidia.com>
0f95bee to
da7472e
Compare
SDAChess
left a comment
There was a problem hiding this comment.
Two issues in the new TOML merger below. I reproduced both locally; the current namespace fragments do not trigger them. The normal private-mode merge preserves the RPM defaults and is idempotent.
…ents Treat array-of-tables headers as table boundaries so replacing a value before one no longer consumes its header. Require the overrides to be valid TOML, accept single- and double-quoted keys, and fail when any override value is missing from the merged result instead of silently dropping it. Add regression tests and a mise task for them. Signed-off-by: Evan Lezar <elezar@nvidia.com>
|
🌿 Preview your docs: https://nvidia-preview-pr-4289.docs.buildwithfern.com/openshell |
Thanks @SDAChess. I have addressed the immediate issues, but I want to be careful about writing a general-purpose TOML-merger in python here. We should be covering the immediate use cases that we have in testing. The follow-up in #5446 which adds "merged config support" would allow us to do away with this entirely once we have first-class merge support. |
…#4289) * test(tmachine): apply environment gateway overrides to the packaged gateway An environment overrides gateway settings by writing the tables to change to /etc/openshell-test/gateway-overrides.toml. Every installer applies the file with merge-gateway-toml.py: the binaries installer to the configuration it generates, and the deb and rpm installers to the service user's gateway.toml, which starts from the package's default configuration instead of replacing it. Each key replaces the same key in the base file or is added to its table, comments are kept, and a result that is not valid TOML fails the setup. Run the Podman user-namespace driver suites with the rpm installer. Signed-off-by: Evan Lezar <elezar@nvidia.com> * test(tmachine): run e2e-podman against the packaged gateway Detect the installer in the e2e-podman playbook: the binaries installer keeps its HTTP gateway, and the package installers use /usr/bin/openshell and the registered openshell gateway. Run the lane on rpm in CI. Signed-off-by: Evan Lezar <elezar@nvidia.com> * fix(tmachine): harden the gateway TOML merge against unhandled statements Treat array-of-tables headers as table boundaries so replacing a value before one no longer consumes its header. Require the overrides to be valid TOML, accept single- and double-quoted keys, and fail when any override value is missing from the merged result instead of silently dropping it. Add regression tests and a mise task for them. Signed-off-by: Evan Lezar <elezar@nvidia.com> --------- Signed-off-by: Evan Lezar <elezar@nvidia.com>
Summary
Restore package-installed Podman driver qualification from #4107, which was reverted in #4206, on the current tmachine layout. The Podman user-namespace driver suites and the
e2e-podmanlane now run against the packaged gateway (RPM installer) instead of thebinariesinstaller.Related Issue
Follow-up to #3454 (already closed by #4107). No new feature scope.
Original changes: #4107,
test(tmachine): support package-installed Podman driver suites. Revert: #4206. Product-side follow-up for gateway configuration drop-ins: #5446.Changes
/etc/openshell-test/gateway-overrides.toml, and every installer merges that file into the gateway configuration it uses. The merge (merge-gateway-toml.py) replaces keys the file sets, adds missing keys and tables, keeps everything else (including the installed default and its comments), creates a minimal[openshell] version = 2file when none exists, and refuses to write invalid TOML. The overrides must be valid TOML, and the script fails if any override value is missing from the result instead of silently dropping it. It is idempotent and does not remove keys. Regression tests live next to the script (mise run test:merge-gateway-toml).binaries: merged into the generated/etc/openshell/gateway.toml.deb/rpm: merged into~/.config/openshell/gateway.tomlof the service owner before the service starts. The RPM seeds from/usr/share/openshell-gateway/gateway.toml.default; the deb gets a minimal file. An environment with no overrides leaves the package configuration untouched.k3s: ignores the file.usernsenvironments use that file ([openshell.drivers.podman]withuserns,uidmap,gidmap), replacing the driver-onlypodman-driver.tomlchannel, and run with therpminstaller in CI.e2e-podmandetects the installer:binarieskeeps its HTTPtmachinegateway; package installers use/usr/bin/openshelland the registeredopenshellgateway. It runs onrpmin Branch E2E, Integration Tests and the integration runner.TESTING.md, and updateCI.md.Not included: the old gateway-metadata publishing, service restart and rootful socket-group changes, which the current layout does not need. The
binariesinstaller and its templates remain; they are no longer used by CI lanes.Testing
Local Fedora tmachine guests (QEMU/HVF, SELinux enforcing), RPM installer, before the final rebase onto
mainand the merge-script hardening (the lanes use simple keys that the script handles the same way):mise run test:merge-gateway-toml(11 cases, including array-of-tables boundaries, quoted keys and malformed overrides).keep-idand rootfuldefault(no overrides) userns lanes passed.privateuserns lane passed, including a temporary override of a key the RPM default already sets to confirm override semantics (reverted).autouserns lane passed on thebinariesinstaller.e2e-podmanon rootless Podman withrpmpassed.debinstaller, the remaining userns modes, rootfule2e-podmanandmise run ciwere not run locally.test:e2estays enabled; the integration jobs must run and pass before merging. A green workflow with skipped jobs is insufficient.Checklist