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

Ensure k8s juju upgrades select correct agent version. #11306

Merged
merged 1 commit into from Mar 12, 2020

Conversation

@wallyworld
Copy link
Member

wallyworld commented Mar 11, 2020

Description of change

Running upgrade-controller would select the most recent version, even if it were a devel release.
It queries the docker images, but there's no metadata describing the version. So we query simplestreams agent metadata and use that to guide the version selection. This leads to common code with iaas so a bunch of refactoring was done. It includes deleting a bunch of k8s specific code and tweaking logic for version selection to better organise the workflow. Also, the streams metadata is not mandatory for k8s (there is a fallback) so to allow for installs where streams data is not available, the fetch tools method is used with a timeout.

Tests are unchanged except for better (more generic error messages) and additional tests for the k8s version selection.

QA steps

bootstrap a k8s 2.7.2 controller
run a juju upgrade-controller --dry-run to see that 2.7.3 is offered but 2.8-beta1 is not
run an upgrade-controller and ensure upgrade works
do the same for a k8s model

rinse and repeat with a lxd controller

Bug reference

https://bugs.launchpad.net/juju/+bug/1865416

@wallyworld

This comment has been minimized.

@wallyworld wallyworld requested a review from ycliuhw Mar 11, 2020
@hpidcock hpidcock changed the base branch from 2.7-current to 2.7 Mar 12, 2020
cmd/juju/commands/upgrademodel.go Show resolved Hide resolved
cmd/juju/commands/upgradecontroller.go Show resolved Hide resolved
cmd/juju/commands/upgradecontroller.go Outdated Show resolved Hide resolved
Previously, the most recent version was chosen even if it was a devel release.
Also refactor code to use common logic for k8s and iaas.
@wallyworld wallyworld force-pushed the wallyworld:better-caas-upgrade-checks branch from 79d7bd0 to 358d9a5 Mar 12, 2020
@wallyworld

This comment has been minimized.

Copy link
Member Author

wallyworld commented Mar 12, 2020

$$merge$$

@jujubot jujubot merged commit d5e07e8 into juju:2.7 Mar 12, 2020
3 of 5 checks passed
3 of 5 checks passed
Client Tests (ubuntu-latest) Client Tests (ubuntu-latest)
Details
Lint
Details
Schema
Details
check-multi-juju Build started for merge commit.
Details
merge-multi-juju Build started for merge commit.
Details
jujubot added a commit that referenced this pull request Mar 13, 2020
#11314

## Description of change

Merge 2.7 bringing in these PRs:

#11286 speed up juju status by handling units better
#11296 fix LP:1860083 machine availability zone
#11291 various refactorings (method renames, tools finder/getter handle k8s broker)
#11297 juju show-action-status not listing all
#11300 k8s controllers can start lxd containers
#11304 protect against nil profile from the charm
#11310 speed up processing of machines in juju status
#11306 ensure k8s juju upgrades select correct agent version
#11313 fix watcher race in ControllerAddressSuite
#11302 fix LP:1866658 jujud called in makefile before it is built

## QA steps

Run unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.