Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(upgrade): fix broken upgrade on k8s #17762

Merged
merged 1 commit into from
Jul 18, 2024
Merged

Conversation

wallyworld
Copy link
Member

@wallyworld wallyworld commented Jul 18, 2024

Upgrades on k8s were broken due to the oci image fat manifest format not being supported by Juju.

The fix is to add this format to what Juju can ingest. The manifest contains multiple architectures, so the GetArchitecture() method is changed to GetArchitectures() and the clients that call it are adapted to suit. The clients are looking for a single arch, so the check becomes does the wanted arch exist in the set.

Also, the arches were not being normalised. The registry returns ppc64le but juju uses ppc64el. We hadn't noticed since only amd64 or arm64 was in common use.

QA steps

Check bootstrap

juju bootstrap microk8s --agent-version=3.4.2 --config caas-image-repo=public.ecr.aws/juju

Change version.go to 3.4.3 and compile and push image to microk8s.
bootstrap a 3.4.3 controller

juju upgrade-controller --dry-run
juju upgrade-controller

Should pick 3.4.4

Links

https://bugs.launchpad.net/bugs/2073301

Jira card: JUJU-6391

Upgrades on k8s were broken duue to the oci image fat manifest format not being supported by Juju.
@hpidcock hpidcock self-requested a review July 18, 2024 05:49
Copy link
Member

@hpidcock hpidcock left a comment

Choose a reason for hiding this comment

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

Would have preferred a full rewrite, but hey, this is a bug fix. Thank-you. QA passed.

@wallyworld
Copy link
Member Author

Would have preferred a full rewrite, but hey, this is a bug fix. Thank-you. QA passed.

Yeah, full rewrite totally out of scope here :-)

@wallyworld
Copy link
Member Author

/merge

@jujubot jujubot merged commit 69abb5b into juju:3.4 Jul 18, 2024
24 of 26 checks passed
@wallyworld wallyworld mentioned this pull request Jul 18, 2024
jujubot added a commit that referenced this pull request Jul 18, 2024
#17763

Merge 3.4 no conflicts

#17486 [from ycliuhw/cmd-docstring-fix](b6ba452)

#17762 [from wallyworld/fix-k8s-upgrade](69abb5b)
@wallyworld wallyworld mentioned this pull request Jul 18, 2024
jujubot added a commit that referenced this pull request Jul 18, 2024
#17764

Merge 3.5 - no conflicts

#17486 [from ycliuhw/cmd-docstring-fix](b6ba452)
#17745 [from gfouillet/docfix/short_flag_with_two_d…](0b318e9)
#17762 [from wallyworld/fix-k8s-upgrade](69abb5b)
jujubot added a commit that referenced this pull request Jul 22, 2024
#17783

Merges the following patches:
- #17761
- #17768
- #17578
- #17764
- #17763
- #17762
- #17760
- #17745
- #17486

### Conflicts
- apiserver/facades/client/client/client.go
- apiserver/facades/client/client/client_test.go
- apiserver/facades/client/controller/controller.go
- apiserver/facades/client/controller/controller_test.go
- apiserver/facades/client/controller/destroy_test.go
- apiserver/facades/client/controller/register.go
- apiserver/facades/client/modelupgrader/upgrader_test.go
- caas/kubernetes/provider/application/application_test.go
- cmd/containeragent/initialize/command.go
- cmd/containeragent/initialize/package_test.go
- cmd/juju/metricsdebug/collectmetrics.go
- cmd/juju/metricsdebug/metrics.go
- cmd/juju/waitfor/waitfor.go
- docker/registry/mocks/registry_mock.go
- go.mod
- go.sum
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.

3 participants