Repository navigation
drift: flag release pins no transport reads - #2837
Merged
Merged
Conversation
image_orphan starts from the aliases that the generics manager render emits. A pin in latest/base.yml that the render never carried is therefore invisible to it. The memcached pin, left behind when the patchman roles were removed, went unnoticed for three years because of this (#2835). Add an image-group plugin, release_pin_orphan, that starts from base.yml instead. It flags every docker_images key that neither of the two release transports reads: - generics environments/manager/images.yml, for the manager environment, and - container-image-osism-ansible files/src/templates/versions.yml.j2, for the services osism-ansible deploys. Any versions['<key>'] reference counts as a read, including one that only appears in a Jinja condition (osism, osism_ansible). Removing the pin is one possible fix, so the plugin errs towards keeping pins. The other runner images are not readers. container-image-kolla-ansible's versions.yml.j2 takes its versions from the Kolla image SBOM, and container-image-ceph-ansible reads only manager_version from base.yml. A mirror that copies a pinned image, such as metalbox's registry tarballs, is not a reader either: mirroring a tag does not deploy it. A finding has three possible fixes: wire the pin into versions.yml.j2 if a role deploys the image, remove it if its consumer is gone, or allowlist it if it waits for a planned role or is used outside the transports. Four pins are allowlisted: - pushgateway (osism/issues#1446) and openstack_database_exporter (osism/issues#1443), pinned ahead of roles still planned for Tally. - syft, the SBOM tool the image builds run, and sonic_vs, the SONiC virtual switch that testbed's containerlab topology runs. Both are used outside the two transports. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Roger Luethi <luethi@osism.tech>
ideaship
force-pushed
the
drift-release-pin-orphan
branch
from
October 16, 2026 03:35
652479a to
b8bb579
Compare
ideaship
marked this pull request as ready for review
October 16, 2026 03:35
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.
Adds an image-group drift plugin,
release_pin_orphan, that flags everydocker_imagespin inlatest/base.ymlthat no deployment reads.A pin reaches a running container only through one of two templates, which the plugin calls the release transports:
environments/manager/images.yml).render-images.pyturns the pins into<alias>_tag/<alias>_imagevariables for the services on the manager node (ara-server, netbox, the manager's redis and postgres, osism, osism-ansible, ...).versions.yml.j2. When the osism-ansible image is built,render-versions.pybakes the pins intogroup_vars/all/versions.ymlas<alias>_tagoverrides for the servicesosism applydeploys (step-ca, homer, dnsmasq, squid, ...). A pin the template does not list never reaches the role, which then runs its default tag.A pin that neither template references as
versions['<key>']influences no deployment; Renovate keeps bumping it, but nothing runs that tag. Kolla and Ceph images are not affected: their tags come from the Kolla image SBOM andlatest/ceph-<series>.yml, not fromdocker_images.The existing
image_orphanplugin starts from the aliases the manager render emits, so it never sees a pin the render does not carry. The memcached pin went unnoticed for three years this way:Four pins are allowlisted:
The three other pins it flagged when written (alerta, fleet, nexus) have been removed:
The drift job runs only in
periodic-daily, so its findings never block a PR.Tests:
tox -e drift-testpasses (1067 passed, 2 skipped). Run against main on 2026-10-16 with--plugin release_pin_orphan, it reports no findings, with 4 allowlisted and 0 stale entries.🤖 Generated with Claude Code