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

2.9 into develop #14425

Merged
merged 12 commits into from
Aug 4, 2022
Merged

2.9 into develop #14425

merged 12 commits into from
Aug 4, 2022

Conversation

ycliuhw
Copy link
Member

@ycliuhw ycliuhw commented Aug 4, 2022

Merge 2.9 into develop branch.

Conflicts:
    upgrades/upgradevalidation/validation.go

ycliuhw and others added 12 commits August 2, 2022 18:21
juju#14410

This PR checks if LXD version >= 5.2(if the model's cloud is LXD) when we upgrade a controller/model to 3.0.0+ or migrate a model to a 3.0.0+ controller.

## Checklist

- [x] Code style: imports ordered, good names, simple structure, etc
- [ ] ~Comments saying why design decisions were made~
- [x] Go unit tests, with comments saying what you're testing
- [ ] ~[Integration tests](https://github.com/juju/juju/tree/develop/tests), with comments saying what you're testing~
- [ ] ~[doc.go](https://discourse.charmhub.io/t/readme-in-packages/451) added or updated in changed packages~

## QA steps

```console
# upgrade

$ lxd --version
5.0.0

$ juju models -c k1 --format json | jq '.models[] | {name,"agent-version"}'
{
 "name": "admin/controller",
 "agent-version": "2.9.33.1"
}
{
 "name": "admin/default",
 "agent-version": "2.9.33.1"
}

$ juju version --all
version: 3.0.0-ubuntu-amd64
git-commit: d159efa
git-tree-state: dirty
compiler: gc

$ juju upgrade-controller --build-agent
no prepackaged agent binaries available, using local agent binary 3.0.0.2 (built from source)
ERROR cannot upgrade to "3.0.0.2" due to issues with these models:
"admin/controller":
- LXD version has to be "5.2.0" at least, but current version is "5.0.0"
"admin/default":
- LXD version has to be "5.2.0" at least, but current version is "5.0.0"

# migrate

$ juju add-model m1 -c k1
Added 'm1' model on localhost/localhost with credential 'localhost' for user 'admin'

$ juju models -c k1 --format json | jq '.models[] | {name,"agent-version"}'
{
 "name": "admin/controller",
 "agent-version": "2.9.33.2"
}
{
 "name": "admin/default",
 "agent-version": "2.9.33.1"
}
{
 "name": "admin/m1",
 "agent-version": "2.9.33.2"
}

$ juju models -c target --format json | jq '.models[] | {name,"agent-version"}'
{
 "name": "admin/controller",
 "agent-version": "3.0.0.1"
}
{
 "name": "admin/default",
 "agent-version": "3.0.0.1"
}

$ juju migrate k1:m1 target
ERROR source prechecks failed: cannot migrate to controller ("3.0.0.1") due to issues:
"admin/m1":
- LXD version has to be "5.2.0" at least, but current version is "5.0.0"

```

## Documentation changes

No

## Bug reference

https://bugs.launchpad.net/juju/+bug/1981955
Correct "snap install juju-db" channel to get Mongo 4.4
@wallyworld
Copy link
Member

/merge

2 similar comments
@ycliuhw
Copy link
Member Author

ycliuhw commented Aug 4, 2022

/merge

@ycliuhw
Copy link
Member Author

ycliuhw commented Aug 4, 2022

/merge

@jujubot jujubot merged commit 3e87a8f into juju:develop Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants