-
Notifications
You must be signed in to change notification settings - Fork 500
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 #14394
2.9 into develop #14394
Conversation
ycliuhw
commented
Jul 29, 2022
•
edited
Loading
edited
- Clean up remaining doc.go issues with "generated GoMock package" #14384
- Drop use of mgo testing from juju/testing instead use mgo/v2/testing. #14365
- [JUJU-1519] Lazy LXD activation #14381
- [JUJU-1401] Move find tools logic from command side to controller; #14344
- Backport: Upgrade golint to 1.4.6 #14386
- [JUJU-1492] Ensure AddCharm has a series #14392
- [JUJU-1513] migrate assess_upgrade_series.py to bash #14362
- Update Pebble to latest version #14393
manager is first used. Although we only invoke `lxd init` upon the creation of the first container, creating the container manager was activating LXD.
addCharm is too long, make more readable by pulling out a different code path.
This removes the "Package X is a generated GoMock package." from the package comments. For the most part I've done this by moving the mocks to their own mocks/ directory. For the testing/ packages where the mocks need to be in the package I've added -write_package_comment=false to the mockgen command line.
juju#14384 This removes the "Package X is a generated GoMock package." from the package comments. For the most part I've done this by moving the mocks to their own mocks/ directory. For the testing/ packages where the mocks need to be in the package I've added -write_package_comment=false to the mockgen command line. Also updates the doc.go static check script I just added, removing the need to skip "generated GoMock package" comments. ## Checklist - [x] Code style: imports ordered, good names, simple structure, etc - [ ] ~Comments saying why design decisions were made~ - [ ] ~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~ - [x] [doc.go](https://discourse.charmhub.io/t/readme-in-packages/451) added or updated in changed packages ## QA steps ```sh $ cd tests $ ./main.sh static_analysis test_doc_go ```
juju#14365 Moves away from the mgo testing infrastructure in juju/testing to instead use the versioned testing in juju/mgo/v2/testing ## QA steps Unit tests ## Documentation changes N/A ## Bug reference N/A
juju#14381 Although we only invoke `lxd init` upon the first creation of a container, we create a LXD server to pass to the container manager when we first set up the machine agent. This means that LXD services are always activated, even if we never provision any LXD containers. Here we ensure that the server itself is created lazily, by passing a factory function instead of an already-instantiated server. We ensure this has been called before executing any logic that depends on the server. ## QA steps - Add a machine. - SSH to the machine and check that `systemctl is-active snap.lxd.daemon.service` reports the service as inactive. - Check that we can provision and remove container-in-machine for LXD. ## Documentation changes None. ## Bug reference https://bugs.launchpad.net/juju/+bug/1934176
juju#14344 This PR mainly focuses on moving find tools logic from the command side to the controller and also bump ModelUpgrader facade to v2 and removed v1; It also includes some drive-by: * refactored the sync tool command; ## Checklist - [ ] ~Requires a [pylibjuju](https://github.com/juju/python-libjuju) change~ - [ ] ~Added [integration tests](https://github.com/juju/juju/tree/develop/tests) for the PR~ - [ ] ~Added or updated [doc.go](https://discourse.charmhub.io/t/readme-in-packages/451) related to packages changed~ - [x] Comments answer the question of why design decisions were made ## QA steps ```console $ juju version --all version: 2.9.31-ubuntu-amd64 git-commit: 315d242 git-tree-state: dirty compiler: gc $ juju bootstrap lxd k1 --config test-mode=true --build-agent $ juju models -c k1 --format json | jq '.models[] | {name,"agent-version"}' { "name": "admin/controller", "agent-version": "2.9.31.1" } { "name": "admin/default", "agent-version": "2.9.31.1" } # upgrade to the latest stable -> 2.9.32 $ juju upgrade-controller best version: 2.9.32 started upgrade to 2.9.32 $ juju models -c k1 --format json | jq '.models[] | {name,"agent-version"}' { "name": "admin/controller", "agent-version": "2.9.32" } { "name": "admin/default", "agent-version": "2.9.31.1" } # ensure the new controler has the new modelUpgrader $ juju scp --debug -m k1:controller $GOPATH/bin/jujud 0:~/ $ juju exec -m controller --machine 0 sudo mv /home/ubuntu/jujud /var/lib/juju/tools/2.9.32-ubuntu-amd64/jujud $ juju exec -m controller --machine 0 sudo systemctl restart jujud-machine-0.service $ juju exec -m controller --machine 0 'sudo /var/lib/juju/tools/2.9.32-ubuntu-amd64/jujud version --all' version: 2.9.32-ubuntu-amd64 git-commit: 315d242 git-tree-state: dirty compiler: gc $ juju upgrade-model -m default best version: 2.9.32 started upgrade to 2.9.32 $ juju models -c k1 --format json | jq '.models[] | {name,"agent-version"}' { "name": "admin/controller", "agent-version": "2.9.32" } { "name": "admin/default", "agent-version": "2.9.32" } $ juju upgrade-controller --build-agent no prepackaged agent binaries available, using local agent binary 2.9.32.1 (built from source) best version: 2.9.32.1 started upgrade to 2.9.32.1 ``` ```console $ juju version --all version: 2.9.31-ubuntu-amd64 git-commit: 315d242 git-tree-state: dirty compiler: gc $ juju bootstrap lxd k1 --config test-mode=true --build-agent $ juju models -c k1 --format json | jq '.models[] | {name,"agent-version"}' { "name": "admin/controller", "agent-version": "2.9.31.1" } { "name": "admin/default", "agent-version": "2.9.31.1" } $ juju upgrade-controller --agent-version 2.9.55 ERROR no matching agent versions available $ juju upgrade-controller --agent-version 2.9.32 best version: 2.9.32 started upgrade to 2.9.32 $ juju models -c k1 --format json | jq '.models[] | {name,"agent-version"}' { "name": "admin/controller", "agent-version": "2.9.32" } { "name": "admin/default", "agent-version": "2.9.31.1" } ``` ```console $ sudo snap install juju_2.9.31_amd64.snap --dangerous --classic juju 2.9.31 installed $ juju version --all version: 2.9.31-ubuntu-amd64 compiler: gc $ juju bootstrap lxd k1 --config test-mode=true $ juju models -c k1 --format json | jq '.models[] | {name,"agent-version"}' { "name": "admin/controller", "agent-version": "2.9.31" } { "name": "admin/default", "agent-version": "2.9.31" } # upgrade to the latest stable -> 2.9.32 $ juju upgrade-controller best version: 2.9.32 started upgrade to 2.9.32 $ juju models -c k1 --format json | jq '.models[] | {name,"agent-version"}' { "name": "admin/controller", "agent-version": "2.9.32" } { "name": "admin/default", "agent-version": "2.9.31" } $ juju upgrade-controller no upgrades available $ sudo snap install juju_2.9.33_amd64.snap --dangerous --classic juju 2.9.33 installed $ juju upgrade-controller no prepackaged agent binaries available, using local agent binary 2.9.33.1 best version: 2.9.33.1 started upgrade to 2.9.33.1 $ juju upgrade-controller no upgrades available $ juju upgrade-controller --agent-version 2.9.35 WARNING try again with --agent-version=2.9.33 if you want to upload the local binary no upgrades available $ juju upgrade-controller --agent-version 2.9.33 no prepackaged agent binaries available, using local agent binary 2.9.33.2 best version: 2.9.33.2 started upgrade to 2.9.33.2 ```
juju#14392 Before calling AddCharm, ensure we have a series selected after calling ResolveCharm. A little refactoring around requirements for using the series selector and pulling out deploy a local charm to its own method. ## QA steps Deploy the simple charm in the bug: https://bugs.launchpad.net/juju/+bug/1982921/comments/3 to a microk8s model With a machine controller, deploy the following bundle ``` series: focal applications: oneubuntu: charm: ubuntu twoubuntu: charm: ubuntu threeubuntu: charm: ubuntu revision: 19 channel: stable fourubuntu: charm: ubuntu fiveubuntu: charm: ubuntu revision: 18 channel: stable ``` ## Bug reference https://bugs.launchpad.net/juju/+bug/1982921
This picks up three recent changes: * Explicitly set HOME and USER env vars if service user+group set: canonical/pebble#129: * Make write/push and make-dir chown intermediate dirs when setting user: canonical/pebble#130 * Make exec checks consistently not inherit parent environment variables: canonical/pebble#131
juju#14362 The `nw-upgradeseries-amd64-lxd` is constantly failing. Hence, now's a good time to migrate it into the bash test suites. ## QA steps ```console cd tests ./main.sh -v upgrade_series ``` ## TODO - [x] rebase to target 2.9 instead, `nw-upgradeseries-amd64-lxd` is failing there as well - [x] `dummy-sink` gets stuck in maintenance status after upgrade - fix this - [x] test on 2.9 - [x] test on 3.0 - [ ] make some corresponding changes to `juju-qa-jenkins`
f1e8063
to
7e31bc2
Compare
juju#14393 This picks up three recent bug fixes (the first two were reported by users): * canonical/pebble#129: * canonical/pebble#130 * canonical/pebble#131 ## Checklist - [ ] ~Code style: imports ordered, good names, simple structure, etc~ - [ ] ~Comments saying why design decisions were made~ - [ ] ~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 ```sh $ juju bootstrap microk8s $ juju deploy snappass-test $ juju status # browse to http://<ip address>:5000 to ensure it's working ```
4477315
to
2c92654
Compare
2c92654
to
c3935e5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a typo in UpgradeModelParams that needs fixing
ModelTag string `json:"model-tag"` | ||
ToVersion version.Number `json:"to-version"` | ||
TargetVersion version.Number `json:"targert-version"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
targert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ops, thanks for fixing this!
/merge |