{jmaple} LTS Vault and CIQ pinning#79
Open
PlaidCat wants to merge 7 commits into
Open
Conversation
Adds optional vm_image_url field to KernelInfo so each kernel entry in kernels.yaml can pin to a specific Rocky Linux qcow2 image. The cache filename is derived from the pinned URL basename, so changing a pin automatically triggers a re-download instead of serving a stale image. Pins lts-8.6, lts-9.2, and lts-9.6 to date-stamped vault images. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds support for pinning LTS VMs to specific Rocky vault images and CIQ Depot channels to avoid minor-version drift during provisioning, along with a CLI escape hatch to skip Depot setup.
Changes:
- Introduces per-kernel
vm_image_urlanddepot_channelsconfiguration and wires it into VM creation. - Updates cloud-init generation to support vault pinning and optional Depot installation/channel enablement (
--no-depot). - Switches YAML handling to
ruamel.yaml/pyyaml, updates cloud-init base YAML structure, and adds tests around pinning behavior.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/kt/ktlib/test_vm.py | Adds tests for pinned VM URLs and cloud-init runcmd ordering/pinning behavior. |
| tests/kt/ktlib/test_kernels.py | Adds tests for vm_image_url parsing/defaulting in KernelsInfo. |
| pyproject.toml | Replaces oyaml with ruamel.yaml and pyyaml dependencies. |
| kt/ktlib/vm.py | Adds pinned-image URL handling, vault pinning logic, Depot enablement, and --no-depot plumbing. |
| kt/ktlib/kernels.py | Extends KernelInfo to include vm_image_url and depot_channels. |
| kt/data/kernels.yaml | Adds pinned image URLs and Depot channels for selected LTS kernels. |
| kt/data/cloud_init.yaml | Adjusts YAML sequence formatting and adds additional boot actions (e.g., dnf clean all, power_state). |
| kt/commands/vm/impl.py | Threads no_depot through to VM creation. |
| kt/commands/vm/command.py | Adds --no-depot CLI option. |
| kernel_install_dep.sh | Adjusts dependency installation to better cope with pinned minor versions and adds update/restart steps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
kt/ktlib/vm.py:233
- The awk rewrite used to un-comment the next line after a
mirrorlist=entry usessubstr($0,2,length($0)-1), which always drops the last character of the line. If the next line is#baseurl=..., this truncates the URL and can produce an invalid repo baseurl (and break dnf). Usesubstr($0,2)to only strip the leading#.
'print substr($0,2,length($0)-1)}else{print$0}}\' "$line"; done'
Pin dnf to the Rocky Linux vault during cloud-init so package installs resolve against the correct minor version instead of rolling to latest. Also install the depot client and login/enable channels when DEPOT_USER and DEPOT_TOKEN are set on the host. Ordering: chown → vault-pin → depot → kernel_install_dep.sh Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rocky 8.6 GenericCloud images lack python3 (only platform-python) and openssl, both needed for kernel builds. Also enable the powertools repo which provides dwarves/pahole required for BTF generation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix EPEL $releasever resolution on vault-pinned VMs, move packages unavailable on all 9.x minors to a soft-fail install, add dnf update and sshd restart post-install, and auto-reboot after cloud-init. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Without this, dnf resolves packages from the latest minor release instead of the one the image was built with. - Disable mirrorlist to stop dnf from redirecting to the latest minor version - Point baseurl to the Rocky vault where old minor versions are permanently hosted - Replace $releasever with the actual VERSION_ID from /etc/os-release to pin to the exact minor version - Clear dnf cache to force metadata refresh from the new vault URLs All of these were added in kt/data/cloud-init.yaml that is the base for all vms. When kt vm is run the first time for a kernel workspace, a copy of cloud-init.yaml is created. Use ruamel instead so that comments and the original formatting stays the same when the yaml file is read and then dump in python. Signed-off-by: Roxana Nicolescu <rnicolescu@ciq.com> add to a8edde3
For those with Depot access defined in their OS environment there is no way to get a true vault pin of a VM. This is an unusual use case so add a negative flag to prevent installation of depot and setting the parameters.
PlaidCat
force-pushed
the
{jmaple}_lts_pinning
branch
from
July 23, 2026 18:41
931c489 to
55c1cff
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I did most of this with Claude over the weekend because I needed CIQ LTS's to test an Embargoed CVE.
While doing this some of the pins even with CIQ repos enabled needed customized installed package list that didn't work for the minor versions but worked with the Major version.
I also integrated the work from Roxana here #71 but it was a bit of parallel work and should have started here but I wasn't thinking about what was in PR while doing the POC testing.
In addition there isn't a way to get a default RESF VAULT pinned Major.Minor so added in a negative flag.
Test with Depot
Test without Depot
Coverage Report