Skip to content

fix: properly support oci image list pagination#21644

Merged
jujubot merged 5 commits intojuju:2.9from
wallyworld:fix-ociimage-pagination
Jan 27, 2026
Merged

fix: properly support oci image list pagination#21644
jujubot merged 5 commits intojuju:2.9from
wallyworld:fix-ociimage-pagination

Conversation

@wallyworld
Copy link
Copy Markdown
Member

@wallyworld wallyworld commented Jan 23, 2026

Commit 1:
When calling GET in the http endpoint of the oci image registry to list available images, we weren't properly handling pagination. The link reference was being interpreted an an absolute link instead of a relative path. The result is that as the number of jujud operator oci images gets too large, things like upgrades start to fail.

Includes a drive by tweak to lxd smoke tests to force focal for the test deploy due to a snap seed issue on jammy.

Commit 2:
Backports work done in 3.x to support multi-platform OCI image manifests.

QA steps

upgrade smoke tests on k8s still fail due to the 2.9.53 release used to test having the issue fixed in this PR.

To test image selection during upgrade, edit version.go and set the version to 2.9.52
make microk8s-operator-update
bootstrap with
caas-image-repo=ghcr.io/juju (so we hit a repository that does pagination)
logging-config=juju.docker.registry.internal=TRACE (so we can see the pagination is handled)

upgrade-controller --dry-run
should show 2.9.53

Links

Fixes: #21979
Jira card: JUJU-9310

@jujubot jujubot added the 2.9 label Jan 23, 2026
@wallyworld wallyworld force-pushed the fix-ociimage-pagination branch 6 times, most recently from 3c5d6d4 to 5a2f26c Compare January 23, 2026 12:22
@wallyworld wallyworld force-pushed the fix-ociimage-pagination branch 14 times, most recently from 2d90608 to e2903a3 Compare January 27, 2026 00:38
@wallyworld wallyworld force-pushed the fix-ociimage-pagination branch 2 times, most recently from fda7c78 to 620a558 Compare January 27, 2026 00:41
@wallyworld wallyworld force-pushed the fix-ociimage-pagination branch from 620a558 to 3a6362c Compare January 27, 2026 01:15
@wallyworld
Copy link
Copy Markdown
Member Author

/merge

@jujubot jujubot merged commit facb908 into juju:2.9 Jan 27, 2026
17 of 23 checks passed
@wallyworld wallyworld mentioned this pull request Jan 28, 2026
jujubot added a commit that referenced this pull request Feb 5, 2026
#21675

Merge 2.9

Brings in several dependabot updates, plus:

#21644 [from wallyworld/fix-ociimage-pagination](facb908)
#21563 [from wallyworld/add-mongo-4.4.30-support](fd845a0)

Drops 2.9 only fixes:

#21570 [from wallyworld/fix-noble-support](f4c0be5)
#21494 [from wallyworld/fix-charmci-tests](589b0ac)

We also use podman to build and push test images for the k8s upgrade smoke test. We need to be able to force these images to use the docker v2 format. Sadly juju can't handle the oci format and that's what we now get using docker cli. This PR adds support for the oci format so we're ok moving forward. We also drop the use of skopeo to push the test images since podman does the job.

Most conflicts due to dropped commits.
```
# Conflicts:
# .github/workflows/update-brew-formulae.yml
# .github/workflows/upgrade.yml
# CONTRIBUTING.md
# agent/agent_test.go
# agent/agentbootstrap/bootstrap_test.go
# apiserver/facades/client/application/application.go
# apiserver/facades/client/client/client.go
# apiserver/facades/client/client/client_test.go
# apiserver/facades/client/modelupgrader/findtools.go
# apiserver/facades/client/modelupgrader/upgrader_test.go
# cloudconfig/podcfg/image.go
# cloudconfig/podcfg/podcfg_test.go
# cmd/containeragent/initialize/package_test.go
# cmd/juju/application/deploy_test.go
# cmd/juju/application/deployer/bundlehandler.go
# cmd/juju/application/deployer/charm.go
# cmd/juju/application/deployer/charm_test.go
# cmd/juju/application/deployer/deployer.go
# cmd/juju/application/deployer/deployer_test.go
# cmd/juju/application/unexpose_test.go
# cmd/juju/commands/bootstrap.go
# cmd/juju/commands/bootstrap_test.go
# cmd/juju/machine/upgrademachine.go
# cmd/jujud/agent/bootstrap_test.go
# cmd/jujud/agent/machine.go
# controller/config.go
# core/arch/arches.go
# core/series/supportedseries.go
# core/series/supportedseries_test.go
# docker/registry/internal/acr_test.go
# docker/registry/internal/base_client.go
# docker/registry/internal/base_manifests_test.go
# docker/registry/internal/ecr_test.go
# docker/registry/mocks/registry_mock.go
# go.mod
# go.sum
# internal/provider/kubernetes/bootstrap.go
# internal/provider/kubernetes/bootstrap_test.go
# mongo/mongo.go
# mongo/mongodfinder_test.go
# mongo/service.go
# mongo/service_test.go
# service/snap/snap_test.go
# snap/local/wrappers/fetch-oci
# state/backups/restore.go
# state/backups/restore_test.go
# upgrades/upgradevalidation/upgrade_test.go
```
@wallyworld wallyworld mentioned this pull request Feb 6, 2026
jujubot added a commit that referenced this pull request Feb 9, 2026
#21734

Merge 3.6

Include various dependabot updates.

#21644 [from wallyworld/fix-ociimage-pagination](facb908)
#21697 [from tmihoc/3.6-fix-menu-etc](8cc1409)
#21617 [from CodingCookieRookie/JUJU-8879-fix-azure…](7745f80)
#21656 [from SimonRichardson/update-dqite-1.18.5](002e3aa)
#21658 [from SimonRichardson/update-dqlite-1.18.5-deps](9d5c2a5)

Dropped upgrade commit:
4.0 doesn't yet query oci image repo for tagged juju versions
#21733 [from wallyworld/optimise-manifest-queries](1335ef8)

Dropped 2.9 commits:
ci fix #21494 [from wallyworld/fix-charmci-tests](589b0ac)
series fix #21570 [from wallyworld/fix-noble-support](f4c0be5)


```
# Conflicts:
# .github/workflows/migrate.yml
# Makefile
# agent/agent.go
# agent/agent_test.go
# agent/agentbootstrap/bootstrap_test.go
# apiserver/facades/client/modelupgrader/findagents.go
# apiserver/facades/client/modelupgrader/package_test.go
# apiserver/facades/client/modelupgrader/upgrader_test.go
# apiserver/facades/controller/firewaller/firewaller.go
# apiserver/facades/controller/firewaller/firewaller_unit_test.go
# cmd/juju/commands/upgrademodel.go
# cmd/juju/storage/add.go
# cmd/jujud/agent/bootstrap.go
# cmd/jujud/agent/bootstrap_test.go
# cmd/jujud/agent/controllercharm.go
# cmd/jujud/agent/machine.go
# cmd/jujud/agent/mongo_test.go
# cmd/jujud/util/util.go
# controller/config.go
# core/version/version.go
# database/app/dqlite_linux.go
# database/client/dqlite_linux.go
# database/driver/dqlite_linux.go
# docs/reference/juju-cli/list-of-juju-cli-commands/add-storage.md
# environs/jujutest/livetests.go
# go.mod
# go.sum
# internal/cloudconfig/podcfg/image.go
# internal/database/dqlite/dqlite_linux.go
# internal/docker/registry/internal/acr_test.go
# internal/docker/registry/internal/base_client.go
# internal/docker/registry/internal/base_manifests_test.go
# internal/docker/registry/internal/ecr_test.go
# internal/pki/request_test.go
# internal/provider/azure/environ_test.go
# internal/provider/common/bootstrap.go
# internal/provider/dummy/environs.go
# internal/provider/ec2/local_test.go
# internal/provider/kubernetes/bootstrap.go
# internal/provider/kubernetes/bootstrap_test.go
# internal/testing/cert.go
# internal/worker/dbaccessor/tracker.go
# make_functions.sh
# mongo/mongo.go
# mongo/mongo_test.go
# mongo/open.go
# mongo/service.go
# mongo/service_test.go
# pki/authority_test.go
# scripts/dqlite/scripts/dqlite/dqlite-install.sh
# scripts/dqlite/scripts/env.sh
# scripts/win-installer/setup.iss
# snap/local/wrappers/fetch-oci
# snap/snapcraft.yaml
# state/testing/conn.go
# tests/suites/controller/enable_ha.sh
# tests/suites/controller/task.sh
# tests/suites/smoke/deploy.sh
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants