profile
viewpoint
Ben Hoyt benhoyt Canonical Christchurch, New Zealand https://benhoyt.com/ By day I’m a software engineer at Canonical, by night a Go hacker and husband/father.

benhoyt/inih 1291

Simple .INI file parser in C, good for embedded systems

benhoyt/goawk 963

A POSIX-compliant AWK interpreter written in Go

benhoyt/dhash 197

Python library to calculate the difference hash (perceptual hash) for a given image, useful for detecting duplicates

benhoyt/graphyte 57

Python 3 compatible library to send data to a Graphite metrics server (Carbon)

benhoyt/cdnupload 23

Upload your site's static files to a directory or CDN, using content-based hashing

benhoyt/gosnip 20

Run small snippets of Go code from the command line

benhoyt/betterwalk 17

BetterWalk, a better and faster os.walk() for Python -- DEPRECATED, see my "scandir" project

benhoyt/go-routing 17

Different approaches to HTTP routing in Go

benhoyt/benhoyt.github.com 8

Source code for my website

benhoyt/false-forth 3

A False compiler and interpreter written in ANS Forth

issue commentgolang/go

strconv: add release note that ParseFloat now requires bit-size of either 32 or 64

Hmm, actually ... I've done some searching to see how common this is, and it seems like a fairly common mistake to use 10 (presumably because the second argument to ParseInt is often 10 for decimal) and, less commonly, 0. This is still invalid according to the documentation, but maybe we don't want to break that many usages for the sake of purity. Here are several usages of it from just a quick scan of code on my computer and then using Sourcegraph:

  • Juju (my current work project) passes 10 here: https://github.com/juju/juju/blob/210f66c6baecd5bc9876507d0eac313d0f59a0de/core/series/supported.go#L103
  • The Go protobuf decoder passes 0 here: https://github.com/golang/protobuf/blob/00998c7dd9d789e353c9518d13864b75cd23c55d/jsonpb/decode.go#L267
  • Lots more instances of 10 (and that's not exhaustive -- last I checked Sourcegraph public search only indexed a subset of GitHub repos): https://sourcegraph.com/search?q=ParseFloat%28:%5Bfirst%5D%2C+10%29+lang:go+count:1000&patternType=structural
  • Lots more instances of 0 (though most of these are protobuf): https://sourcegraph.com/search?q=ParseFloat%28:%5Bfirst%5D%2C+0%29+lang:go+count:1000&patternType=structural

It would be a bit different if ParseFloat panicked in these cases, but they return an error, meaning some programs will silently work incorrectly. Some programs may choose to fail hard on error, but others will assume the error means a parse error in the user input and fall back to a default value in the error case (see the Juju example), meaning program behavior will silently change. I don't think it's worth the risk.

I think there are two possibilities here:

  1. Just revert the behavior of ParseFloat/ParseComplex to what they were before, so for example ParseFloat bitSize becomes 64 if it's anything other than 32. This is safe and non-invasive.
  2. Change them to panic in this case instead. I think this would be reasonable, as it's almost always a programmer error to pass in a bitSize other than 32 or 64 (it's only if the bitSize were to come from user input that it wouldn't be). The string you're parsing likely comes from user input, so obviously errors in parsing would still return error.

I guess I lean towards option 1, as it's "safest". The Go 1 Compatibility Promise is strong with that one. Thoughts?

P. S. Vaguely relevant: https://xkcd.com/1172/

mark-rushakoff

comment created time in 16 hours

issue commentgolang/go

strconv: add release note that ParseFloat now requires bit-size of either 32 or 64

@ianlancetaylor I agree, this just makes incorrect code panic (did you mean 32 or 64?) and is already documented, so just a release notes change seems fine. I can create a CL with a small addition to https://github.com/golang/go/blob/master/doc/go1.16.html in the next few days.

mark-rushakoff

comment created time in a day

delete branch benhoyt/juju

delete branch : fix-k8sagent-race

delete time in 2 days

PR opened juju/juju

Fix race in k8sagent/initialize tests

The cmdtesting version of Context.Stderr is not concurrency-safe because it's a plain old bytes.Buffer, so ctx.Infof (at least in testing) is not concurrency-safe, and this was causing a data race in bytes.Buffer.Write.

Per discussion, just "fix" by avoiding the log here (we didn't have it before anyway).

Drive-by is updating the tests to use different byte strings for the three different files. Initially I thought this may have been causing it, but it's not. Seems safer/better anyway.

+9 -8

0 comment

2 changed files

pr created time in 2 days

create barnchbenhoyt/juju

branch : fix-k8sagent-race

created branch time in 2 days

PullRequestReviewEvent

push eventbenhoyt/juju

Kelvin Liu

commit sha 73a9e8a69f16b292b6d8fcf7fd62fa6b9759eae7

Raise timeout error together in register_user_interactively for better debugging;

view details

Ian Booth

commit sha ded37e7383cadf7a0061b58857804b82c3e64a8c

Merge pull request #12213 from ycliuhw/include-error-in-exceptiopn-for-register_user_interactively Raise timeout error together in register_user_interactively for easier debugging

view details

Joseph Phillips

commit sha c82b40740b6ca4e1128934e790fd406d4aa8014a

Adds a little extra detail to output of Raft trace logging.

view details

Juju bot

commit sha df42aec15a668d9bd11dfb27374d7056ceac1ca7

Merge pull request #12214 from manadart/2.8-raft-traces https://github.com/juju/juju/pull/12214 Adds some detail to the trace log output, in order to enhance Raft diagnostics. ## QA steps - `juju bootstrap lxd test-lease --debug --config logging-config="<root>=DEBUG;juju.worker.lease.raft=TRACE;juju.core.raftlease=TRACE"` - See the output with `juju debug-log -m controller --include-module juju.core.raftlease --include-module juju.worker.lease.raft` ## Documentation changes None. ## Bug reference Relevant to https://bugs.launchpad.net/juju/+bug/1900724, though not a fix.

view details

Jujubot

commit sha 9cbf88549973c4a37200f8717bca7182be2a4db7

Increment juju to 2.8.7

view details

Simon Richardson

commit sha c364c892cd10380925577c5d1731da9a22da8aa2

Strict mode validation Strict mode integration tests hadn't been updated when changed from csv to a schema.List(schema.String()). This fixed this, but also spotted that the validation was a bit wonky.

view details

Simon Richardson

commit sha 69bd9489f244e4861ec91e5c498afe4710a39aae

Update os series The following commit updates the default series to include groovy, it drops support for all other series that are no longer supported (eoan) and additionally brings the supported code inline with the juju/os package.

view details

Simon Richardson

commit sha a6a8831e211d04c54f2e762ee9da1ae50161ff58

bump go.mod and go.sum file

view details

Simon Richardson

commit sha 3dd5391c510920f88b92d0476163b67f2514071d

Check for type Ensure we never panic at runtime, even though we've validated before hand.

view details

Ian Booth

commit sha 32f190b856498c1a8deda7abc51e004e8ddd4c1f

Patch arch in TestTargetSeriesAndArchOverridePriority test

view details

Ian Booth

commit sha 38b6ddae23c6038190d28dbfbe10ced6e5a77320

Merge pull request #12220 from wallyworld/fix-arch-override-test Patch arch in TestTargetSeriesAndArchOverridePriority test

view details

Ian Booth

commit sha 85dca792a9970edf673fa3e1e66661bad851e1cf

Merge pull request #12216 from jujubot/increment-to-2.8.7 Increment juju to 2.8.7

view details

Juju bot

commit sha ef2c969cdc084b6fe784148d130d130ab56f5126

Merge pull request #12218 from SimonRichardson/bump-os-series https://github.com/juju/juju/pull/12218 The following commit updates the default series to include groovy, it drops support for all other series that are no longer supported (eoan) and additionally brings the supported code inline with the juju/os package. ## QA steps The tests pass, we're interested in ensuring that we correctly handle the series correctly when bootstrapping with in the tests.

view details

Ben Hoyt

commit sha 4ff4944c0fe7b828deef7daf0afdf6631c5f8447

Fix test_mongo_memory_profile on focal (Mongo is installed via snap) Side note: IMO this test isn't great, because it just tests that the config file is updated, not that Mongo actually reloaded it and picked up the change. Ideally we'd query Mongo to determine whether the change had gone through. But leave that as is for now.

view details

Ian Booth

commit sha 1d1e42b8cbefd00b2167121208b581e19d1ebbd2

Merge pull request #12221 from benhoyt/fix-mongo-memory-profile-test Fix test_mongo_memory_profile on focal (Mongo is installed via snap)

view details

Ben Hoyt

commit sha 9a9cda473b5e9bc2789b334fc5c04808479b8b4f

Merge branch '2.8' into merge-28-develop-3

view details

Kelvin Liu

commit sha ce2e11da859682037f1caeb9155d6590de3756e1

Ignore i/o timeout error in WaitForAgentInitialisation;

view details

Ian Booth

commit sha f6c2dbdaf3b59ad0764673ce699aa745ff1fe6cc

Merge pull request #12223 from ycliuhw/fix/WaitForAgentInitialisation-ingore-IOTimeout Ignore i/o timeout error in WaitForAgentInitialisation;

view details

Kelvin Liu

commit sha 21d7b38b640f177984338694a4552c3dda5f0550

Merge branch '2.8' into dev-merge-2.8

view details

Juju bot

commit sha ca72921dca069db22d1784183949d05dd21e624f

Merge pull request #12222 from benhoyt/merge-28-develop-3 https://github.com/juju/juju/pull/12222 prdesc #12213 Raise timeout error together in register_user_interactively for easier debugging * #12214 Raft trace log detail * #12220 Patch arch in TestTargetSeriesAndArchOverridePriority test * #12221 Fix test_mongo_memory_profile on focal (Mongo is installed via snap) -- **this PR is primarily to pick up this change**

view details

push time in 2 days

PullRequestReviewEvent

push eventbenhoyt/benhoyt.github.com

Ben Hoyt

commit sha 3a86ec949caf72d0c8f03eb07f3784ca20f9a571

Update PDF version of CV

view details

push time in 2 days

push eventbenhoyt/benhoyt.github.com

Ben Hoyt

commit sha f2d66a2f51458cb90170a2950b3004d3f3a6f338

Add a bullet point under Canonical on my CV

view details

push time in 2 days

push eventSimonRichardson/juju

Ben Hoyt

commit sha afc8a0210c39082ef618316b1a84f69b25c6aeb7

Fix inverted type conversion test when converting to string

view details

push time in 2 days

delete branch benhoyt/juju

delete branch : merge-28-develop-3

delete time in 2 days

pull request commentjuju/juju

Merge 2.8 into develop

$$merge$$

benhoyt

comment created time in 2 days

PR opened juju/juju

Merge 2.8 into develop
  • #12213 Raise timeout error together in register_user_interactively for easier debugging
  • #12214 Raft trace log detail
  • #12220 Patch arch in TestTargetSeriesAndArchOverridePriority test
  • #12221 Fix test_mongo_memory_profile on focal (Mongo is installed via snap) -- this PR is primarily to pick up this change
+22 -24

0 comment

8 changed files

pr created time in 2 days

create barnchbenhoyt/juju

branch : merge-28-develop-3

created branch time in 2 days

delete branch benhoyt/juju

delete branch : fix-mongo-memory-profile-test

delete time in 2 days

PR opened juju/juju

Fix test_mongo_memory_profile on focal (Mongo is installed via snap)

The test previously looked for the Mongo config change in the service file /etc/systemd/system/juju-db.service, but that doesn't exist on focal (where Mongo is installed via snap). Update to see if that file exists first (bionic), and if not try the snap config file (focal+).

This fixes the test-controller-lxd tests on 2.9 -- this error:

05:08:00 ==> RUN OUTPUT: test_controller
05:08:00     | 
05:08:00     | ====> Reusing bootstrapped juju (2.9:lxd-remote)
05:08:00     | 
05:08:00     | | Added 'mongo-memory-profile' model on lxd-remote/default with credential 'admin' for user 'admin'
05:08:00     | 
05:08:00     | ====> Bootstrapped juju (12s)
05:08:00     | cat: /etc/systemd/system/juju-db.service: No such file or directory
05:08:00     | Success: "wiredTigerCacheSizeGB" not found
05:08:00     | cat: /etc/systemd/system/juju-db.service: No such file or directory
05:08:00     | [+] (attempt 0) polling mongo service
05:08:00     | cat: /etc/systemd/system/juju-db.service: No such file or directory

Side note: IMO this test isn't great, because it just tests that the config file is updated, not that Mongo actually reloaded it and picked up the change. Ideally we'd query Mongo to determine whether the change had gone through. But leave that as is for now.

+8 -2

0 comment

1 changed file

pr created time in 2 days

create barnchbenhoyt/juju

branch : fix-mongo-memory-profile-test

created branch time in 2 days

push eventbenhoyt/juju

Ben Hoyt

commit sha 11e1f168114e87ca83ce549ac3e233c9cde3a5a2

Allow tests provider of "lxd-remote"

view details

Ian Booth

commit sha c6d195b5502ed3064518ae028310443f813e1906

Merge pull request #12212 from benhoyt/tests-lxd-remote-28 Back-port lxd-remote tests provider from develop

view details

Kelvin Liu

commit sha 73a9e8a69f16b292b6d8fcf7fd62fa6b9759eae7

Raise timeout error together in register_user_interactively for better debugging;

view details

Ian Booth

commit sha ded37e7383cadf7a0061b58857804b82c3e64a8c

Merge pull request #12213 from ycliuhw/include-error-in-exceptiopn-for-register_user_interactively Raise timeout error together in register_user_interactively for easier debugging

view details

Joseph Phillips

commit sha c82b40740b6ca4e1128934e790fd406d4aa8014a

Adds a little extra detail to output of Raft trace logging.

view details

Juju bot

commit sha df42aec15a668d9bd11dfb27374d7056ceac1ca7

Merge pull request #12214 from manadart/2.8-raft-traces https://github.com/juju/juju/pull/12214 Adds some detail to the trace log output, in order to enhance Raft diagnostics. ## QA steps - `juju bootstrap lxd test-lease --debug --config logging-config="<root>=DEBUG;juju.worker.lease.raft=TRACE;juju.core.raftlease=TRACE"` - See the output with `juju debug-log -m controller --include-module juju.core.raftlease --include-module juju.worker.lease.raft` ## Documentation changes None. ## Bug reference Relevant to https://bugs.launchpad.net/juju/+bug/1900724, though not a fix.

view details

Jujubot

commit sha 9cbf88549973c4a37200f8717bca7182be2a4db7

Increment juju to 2.8.7

view details

Ian Booth

commit sha 32f190b856498c1a8deda7abc51e004e8ddd4c1f

Patch arch in TestTargetSeriesAndArchOverridePriority test

view details

Ian Booth

commit sha 38b6ddae23c6038190d28dbfbe10ced6e5a77320

Merge pull request #12220 from wallyworld/fix-arch-override-test Patch arch in TestTargetSeriesAndArchOverridePriority test

view details

Ian Booth

commit sha 85dca792a9970edf673fa3e1e66661bad851e1cf

Merge pull request #12216 from jujubot/increment-to-2.8.7 Increment juju to 2.8.7

view details

push time in 2 days

push eventbenhoyt/juju

Kelvin Liu

commit sha 81f6f16af78f968b864f65739c27bf4c533241c3

Close session before return;

view details

Kelvin Liu

commit sha fb903d370038b2dfe4aeea0917d7c7af9daad4bb

Remove un-used 2nd launched mongo server;

view details

Kelvin Liu

commit sha d9991710c111e293e78c92ef49268fe569d846b1

Use IsolatedMgoSuite for ImageSuite;

view details

Juju bot

commit sha c68dc8249e14cc75601dde6ed8c5e77fac7d9393

Merge pull request #12194 from ycliuhw/fix/imagestorage-tests https://github.com/juju/juju/pull/12194 *Close session before return in imageStorage.Image and refactored ImageSuite* ## 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.jujucharms.com/t/readme-in-packages/451) related to packages changed~ - [x] Comments answer the question of why design decisions were made ## QA steps ```console $ go test -race -v ./state/imagestorage/... -test.timeout=60s -check.v -count=1 ``` ## Documentation changes No ## Bug reference No

view details

Kelvin Liu

commit sha 5eafd1ac0072af28d2b08248d9acee407785bd07

Refactor binaryStorageSuite to use IsolatedMgoSuite;

view details

Kelvin Liu

commit sha 8d67e2b71eab0e87dc88f4216b5b81ac6a464490

Ingore only less important errors for destroy-model --force;

view details

Juju bot

commit sha f20ee53f8392e1524570bb91302c7eb16914ac97

Merge pull request #12200 from ycliuhw/fix/destroy-model-hangs-with-force https://github.com/juju/juju/pull/12200 *Only ingore less important errors for destroy-model --force;* ## 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.jujucharms.com/t/readme-in-packages/451) related to packages changed~ - [x] Comments answer the question of why design decisions were made ## QA steps ```console # deploy charm with storage $ juju add-model t1 microk8s && juju deploy cs:~juju/mariadb-k8s-3 && juju deploy cs:~juju/mediawiki-k8s-4 --config kubernetes-service-type=LoadBalancer && juju relate mediawiki-k8s:db mariadb-k8s:server # now destroy-model raise an error and tell to use "--destroy-storage" $ juju destroy-model t1 -y --force Destroying modelERROR cannot destroy model "t1" The model has persistent storage remaining: 1 volume and 1 filesystem To destroy the storage, run the destroy-model command again with the "--destroy-storage" option. To release the storage from Juju's management without destroying it, use the "--release-storage" option instead. The storage can then be imported into another Juju model. ``` ## Documentation changes No ## Bug reference https://bugs.launchpad.net/juju/+bug/1901439

view details

Joseph Phillips

commit sha 55b993b6de06257835c3773c73e19bb85f7cb35f

Checks error for AddMachines client command before attempting to assess result count.

view details

Juju bot

commit sha fc7de7b5d7d82cc09afa9dc78e5c04cccb4c7443

Merge pull request #12203 from manadart/2.8-add-machine-error https://github.com/juju/juju/pull/12203 The return from `juju add-machine` was verifying the result count before checking the error return meaning that a user without model write access got `ERROR expected 1 result, got 0` instead of an indicative message. This patch addresses that ## QA steps - Bootstrap to LXD. - `juju add-user joe` - `juju grant joe read default` - Set the admin password, logout, register with the token, then login as "joe". - `juju add-machine` should return `ERROR permission denied (unauthorized access)` ## Documentation changes None. ## Bug reference https://bugs.launchpad.net/juju/+bug/1896089

view details

Joseph Phillips

commit sha ef6134441bedd5ca664b08f9a54fa82e0c6d6cbe

Removes symlink handling and paths associated with absent juju-updateseries functionality.

view details

Juju bot

commit sha cb95d700e15bb4d4877b2f6c8b0d68bd216629f0

Merge pull request #12199 from ycliuhw/fix/binaryStorageSuite https://github.com/juju/juju/pull/12199 *Refactor binaryStorageSuite to use IsolatedMgoSuite;* ## 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.jujucharms.com/t/readme-in-packages/451) related to packages changed~ - [x] Comments answer the question of why design decisions were made ## QA steps ```console $ go test -race -v ./state/binarystorage/... -test.timeout=60s -check.v -count=1 ``` ## Documentation changes No ## Bug reference No

view details

Kelvin Liu

commit sha 635cafe392708045f9d9bfa85caef019ed6a2443

Update acceptancetests/requirements.txt

view details

Ian Booth

commit sha 9c57c7143ccd2fe666b2b7fe5e9918258206758e

Merge pull request #12206 from ycliuhw/fix/ci-deps Update acceptancetests/requirements.txt

view details

Kelvin Liu

commit sha f231664fa504abb1dc1530b098aa439ad0368d08

Relax juju register controller name promp message regex;

view details

Kelvin Liu

commit sha f74e31c980bca026c33da67a6ced23703a72a16e

Merge branch '2.8' of github.com:juju/juju into fix/nw-cross-model-relations

view details

Simon Richardson

commit sha efc4e5c59bfd5c519ad385753fc92825dedb4964

Lint fixes Cleaning up some linter issues when investigating the best way to implement strict mode for Juju.

view details

Simon Richardson

commit sha ee0bbbe7fcbfe81aa17d87ad4d5ab68ae92c2dbb

Adding mode to the model config The following adds the mode to the model config. The idea is that we can look to see if we should run in strict mode or not depending on if this flag is enabled.

view details

Simon Richardson

commit sha bfb427e2f385e9647c226328ecded7b0f0a7cfcd

Add integration tests for model config

view details

Simon Richardson

commit sha eee9967982c3176d28095bbbf30e78e4baa1500b

Use schema.List instead of a custom list The following uses the new changes from the environschema to supply a mode as a list. The code is simple as the schema abstraction (not the environschema) does all the heavy lifting. The tests are updated to reflect this.

view details

Simon Richardson

commit sha 688a45f0b51c704c90d62b30194d8ffca440fd31

Change the default key Even though we know it's a list of strings, it's actually a list of interfaces.

view details

push time in 2 days

delete branch benhoyt/juju

delete branch : tests-lxd-remote-28

delete time in 3 days

PR opened juju/juju

Back-port lxd-remote tests provider from develop

Cherry-pick of commit https://github.com/juju/juju/pull/12205/commits/49363e9fd285f6cfadd8fd61894cf9b061953a29 from the develop branch, PR https://github.com/juju/juju/pull/12205

This is so that our LXD integration tests work on the 2.8 branch (the tests use the lxd-remote provider now, even though 2.8 doesn't deploy to focal by default).

+5 -2

0 comment

1 changed file

pr created time in 3 days

create barnchbenhoyt/juju

branch : tests-lxd-remote-28

created branch time in 3 days

push eventbenhoyt/juju

Simon Richardson

commit sha b51c3ab2ea4763dadf0133d236283d298c86b802

agent-stream isn't honoured with upgrade-juju This acceptance test expected that you can go from released stream to devel stream using upgrade-juju --agent-stream devel. That isn't the case and so the test is a bad test. There are numerous bugs around this so we should really fix this at some point: - https://bugs.launchpad.net/juju/+bug/1742342 - https://bugs.launchpad.net/juju/+bug/1863179 - https://bugs.launchpad.net/juju/+bug/1875567 - https://bugs.launchpad.net/juju/+bug/1879573

view details

Heather Lanigan

commit sha 69bb16b449c1b3e0a3fb1a731951ae98b3b29468

Value change for container types with container_network test cause the test to fail on incorrect options with the python test. Just take what is provided on the CLI, rather an interpret.

view details

Heather Lanigan

commit sha 11ad07883325a57fe1d20f671d0504dab56ab05f

Make has containers allowed for advanceLifecycle to dying. For cases like destroy-model and destroy-controller, allow for machines to be moved to dying even if they have containers. Containers must be removed for a machine to be marked dead. Use new DestroyWithContainers. cleanupMachinesForDyingModel uses DestroyWithContainers, and not skip containers, they need to be removed as well. Other cases like remove-machine, continue to fail if the machine has containers. In that case force can be used.

view details

Heather Lanigan

commit sha 5df4da81ca0b4b84d2a82d8140122b2743f665e0

Add CodeMachineHasContainers, for use by the machiner.

view details

Heather Lanigan

commit sha 016988a29dc0625fc8ffc1eb64ddbf4dcba5c086

Check for CodeMachineHasContainers if EnsureDead fails. A machine with containers can now be marked dying. However it should not be marked dead until all containers have been removed. Allow the worker to retry EnsureDead as the worker's watcher will not trigger once all the containers have been removed. If restarting while machine is dying or dead, no need to set the addresses. Improve comments. Add TestMachinerMachineHasContainers. And update current tests for changed behavior around EnsureDead failing on having containers.

view details

Heather Lanigan

commit sha 1814844582ba799e4e7529db3946fb46c561780c

Update machine lifecycle and to use juju 2.0 terminology. Include details about machines with containers in a machine's lifecycle description. Terminology: application not service, remove not destroy, etc.

view details

Heather Lanigan

commit sha 7cd859bfba50e26a19f4595343144587b3ae959e

Start doc describing the cleanup process.

view details

Heather Lanigan

commit sha a660859d3ea63de6af8ac28157adb31a423f0c1e

Make advanceLifecycle more readable. Push operation creation into helper methods, which helps make this very long method easier to read and reduces duplication. Ensure that allowDyingContainers can only be true for dying not dead.

view details

Heather Lanigan

commit sha a29eda0362ab652039440b1b8b03101f1678bc39

Split TestCleanupModelMachines into 2, with and without force. Add a container to the test as well.

view details

Heather Lanigan

commit sha 186aa71b93d47e2915f7ec7e61bcc2d573f47f93

Don't return if err is nil, causes destroy container to fail.

view details

Heather Lanigan

commit sha d836421a4f7afd1eecac4200305357f7fea2dd71

Rename evaulateContainersAdvanceLifecycle to advanceLifecycleIfNoContainers

view details

Ian Booth

commit sha cf261d7d4e84043439dd39e513780685ebc077b0

Fix destroy unit short circuit for k8s Make Remove() of a not found unit a no op for the caasoperator worker

view details

Kelvin Liu

commit sha 1fcae8eb968d8daa9f728288ede76f52dbaeece0

Fix remove_machine handling string machine_ids arg;

view details

Ian Booth

commit sha e0f20aa83881b642520eb9081bda610ee77e1adc

Merge pull request #12163 from ycliuhw/fix/nw-network-spaces-aws Fix remove_machine handling string machine_ids arg;

view details

Ian Booth

commit sha a3ce02787ddb3f48458e94d7a1fe3491ee44315f

Fix unit tests and rename common facade helper

view details

Juju bot

commit sha 717fb79cf1bea4acb6a35695ae99c0e9355e8726

Merge pull request #12161 from wallyworld/k8s-leadership-flapping https://github.com/juju/juju/pull/12161 Fix 2 key issues with the k8s operator and uniter workers. The first is the permission check used for the facade authoriser. If the unit was removed, a permission denied error was returned, causing the entire operator worker to bounce and mess up unit leadership. Instead, the tag of the requested unit is checked to see if it matches the authenticated application agent. Any subsequent sate api call will return not found if the unit is accessed. The logic to do the permission checks was duplicated in a few places, so is not extracted to a common method. Also, the Remove() api call is now a no op if the unit has already been removed. Secondly, when a unit goes dying and is destroyed, we check to see if the unit agent had started - if not we can short circuit the cleanup and remove directly. However, if there is contention for the machine execution lock and a lot of k8s unit churn caused by many pod-spec-set calls, the unit agent may not have updated agent status even though it had started. This would lead to juju removing the unit and leaving the unit agent running. This then leads to the issue in item one, where an operation on the unit gets a permission error and the entire operator worker restarts. This causes the leadership tracker worker to flip the unit leader to a minion and messes up leadership tracking. The issue is fixed by adjusting the initial agent state to "installing agent". This is then updated to "initialising agent" when the unit agent starts, allowing juju to know whether to short circuit a unit destroy operation or not. ## QA steps bootstrap k8s deploy kubeflow ## Bug reference https://bugs.launchpad.net/bugs/1898966

view details

Juju bot

commit sha 7e34999c0ffc5496c5d2fee37e21c140ae5897da

Merge pull request #12148 from SimonRichardson/display-upgrade-test-lp1742342 https://github.com/juju/juju/pull/12148 This acceptance test expected that you can go from released stream to devel stream using upgrade-juju --agent-stream devel. That isn't the case and so the test is a bad test. There are numerous bugs around this so we should really fix this at some point: - https://bugs.launchpad.net/juju/+bug/1742342 - https://bugs.launchpad.net/juju/+bug/1863179 - https://bugs.launchpad.net/juju/+bug/1875567 - https://bugs.launchpad.net/juju/+bug/1879573

view details

Juju bot

commit sha a524d25267cd8a45df0329ecfccdda4042b9be11

Merge pull request #12135 from hmlanigan/destroy-containers https://github.com/juju/juju/pull/12135 When destroying a model, don't fail on a machine having containers. Allow a machine to advance to Dying even if there are containers. However the machine cannot advance to dead until the containers have been removed. In this non force scenario EnsureDead called by the machiner to move the machine to Dead. If it fails due to MachineHasContainers, then let the worker fail and restart. The machiner's worker will not notify when the machine's containers have all been removed. When restarting the machiner in a non alive state, there is no need to set its addresses. Side lines: Updated the lifecycle.md doc and started a cleanups.md doc to start unraveling the mystery of cleanup. ## QA steps ```sh # # the acceptance test should not fail on model tear down. # $ ./assess --machine-type=lxd container_networking # # successfully destroy a model with containers on machines. # $ juju bootstrap localhost testme $ juju deploy ubuntu --to lxd,lxd -n 4 # wait for deploy to complete $ juju destroy-controller testme -y --debug --destroy-all-models # # fail to remove a machine with a container on it. # $ juju bootstrap localhost testme $ juju deploy ubuntu --to lxd # wait for deploy to complete $ juju remove-machine 0 removing machine 0 failed: machine 0 is hosting containers "0/lxd/0" # # remove the machine with a container using force. # $ juju remove-machine 0 --force removing machine 0 # # remove a container by itself # $ juju add-machine lxd created container 1/lxd/0 # wait for start $ juju remove-machine 1/lxd/0 $ removing machine 1/lxd/0 ``` ## Bug reference https://bugs.launchpad.net/juju/+bug/1899785

view details

Kelvin Liu

commit sha efcf8147d0948cc093befd005010a3cecbad3663

Add nagios to consume nrpe because nrpe will be blocked forever if there is no consumers;

view details

Ian Booth

commit sha 78e7a5a60ef88bd281835a3dfb3522277474257f

Merge pull request #12169 from ycliuhw/fix/nw-model-migration-amd64 Add nagios to consume nrpe because nrpe will be blocked forever if th…

view details

push time in 3 days

push eventbenhoyt/juju

Ben Hoyt

commit sha 49363e9fd285f6cfadd8fd61894cf9b061953a29

Allow tests provider of "lxd-remote"

view details

Ian Booth

commit sha 7acfe8b7b11f27ac035d887c90e2fd873795d7cd

Merge pull request #12205 from benhoyt/tests-lxd-remote Allow tests provider of "lxd-remote"

view details

Ian Booth

commit sha 9587f13c2a100ea03be738ce1db6d7a292d6f91e

Retry txn watcher on error instead of exiting

view details

Heather Lanigan

commit sha 31754fe21310b6abc57654ed4fecb83f680af5f0

Fix lp:1901752, add detail to error message.

view details

Juju bot

commit sha f12cb6e57cd3fa9ae286fd707abb5273e2ea46f1

Merge pull request #12209 from hmlanigan/improve-add-cloud-msg https://github.com/juju/juju/pull/12209 Add detail to juju add-cloud error message to help user understanding of the problem. ## QA steps ```console # # Create a foo.yaml for adding a cloud, see help. Instead of "clouds:" on the first line, put "louds:" $ juju add-cloud foo foo.yaml ERROR "no clouds found in parsed yaml, please validate yaml keys ``` ## Bug reference https://bugs.launchpad.net/juju/+bug/1901743

view details

Ian Booth

commit sha 979ca53a8d895c91851c0017375bd2de7dec2eba

Add unit tests and introduce a new out of sync error which exists immediately

view details

Juju bot

commit sha b26c9dd85c6f341a901bc56577ecb01a93e4b633

Merge pull request #12201 from wallyworld/txn-watcher-retry https://github.com/juju/juju/pull/12201 This PR attempts to make the txn watcher more robust. There's a suggestion there could be session contamination so the PR does: - creates a separate session just for the txn watcher worker - adds exponential backoff / retry if there's a mgo error; attempt to recover before reporting an error - logs the actual txn watcher error message if the hub watcher does exit It seems under high load, the txn watcher session gets disconnected and/or closed by mistake. So the retry will attempt to refresh the session and start the worker loop again. It will eventally report an error to the hubwatcher, which will restart all workers as occurs now on the very first error. ## QA steps bootstrap deploy mariadb and mediawiki ssh to the controller `echo "sync-error" > /var/lib/juju/wrench/txnwatcher` check the controller logs for txn watcher errors but the workers stay running remove /var/lib/juju/wrench/txnwatcher relate the 2 charms check for normal operations ## Bug reference https://bugs.launchpad.net/juju/+bug/1890167

view details

push time in 3 days

delete branch benhoyt/juju

delete branch : tests-lxd-remote

delete time in 4 days

PR opened juju/juju

Allow tests provider of "lxd-remote"

This is for an upcoming change to the juju-qa-jenkins repo to use an lxd-remote "cloud" for creating the LXD containers on the host in order to avoid nested containers (they don't work on focal).

+5 -2

0 comment

1 changed file

pr created time in 4 days

create barnchbenhoyt/juju

branch : tests-lxd-remote

created branch time in 4 days

push eventbenhoyt/juju

Heather Lanigan

commit sha bff681848e73daf353fbe9101972844f5a0cffd3

add aws regions eu-south-1 and af-south-1

view details

Heather Lanigan

commit sha a9f26c11e328998ef01fbde4cfa27a61b07fabce

add google regions: us-west[34] and asia-southeast2

view details

Juju bot

commit sha fbb6344f63773c1beeb05640b0837f58d03d8117

Merge pull request #12175 from hmlanigan/aws-regions https://github.com/juju/juju/pull/12175 Add new regions for AWS: af-south-1 and eu-south-1. ## QA steps Bootstrapping either of these 2 regions requires enabling it in your aws account. ```console $ juju region aws Client Cloud Regions ... eu-north-1 eu-south-1 af-south-1 ap-east-1 ... # # enabling the eu-south-1 region is taking a while, however the api endpoint works and we can attempt to start # an instance, seeing that there are 3 AZ for the region. # $ juju bootstrap aws/eu-south-1 Creating Juju controller "aws-eu-south-1" on aws/eu-south-1 Looking for packaged Juju agent version 2.8.6 for amd64 No packaged binary found, preparing local Juju agent binary Launching controller instance(s) on aws/eu-south-1... Cloud credential "credentials" is not accepted by cloud provider: Your account is pending verification by Amazon.: Your request for accessing resources in this region is being validated, and you will not be able to launch additional resources in this region until the validation is complete. We will notify you by email once your request has been validated. While normally resolved within minutes, please allow up to 4 hours for this process to complete. If the issue still persists, please let us know by writing to aws-verification@amazon.com for further assistance. (PendingVerification) Cloud credential "credentials" is not accepted by cloud provider: Your account is pending verification by Amazon.: Your request for accessing resources in this region is being validated, and you will not be able to launch additional resources in this region until the validation is complete. We will notify you by email once your request has been validated. While normally resolved within minutes, please allow up to 4 hours for this process to complete. If the issue still persists, please let us know by writing to aws-verification@amazon.com for further assistance. (PendingVerification) Cloud credential "credentials" is not accepted by cloud provider: Your account is pending verification by Amazon.: Your request for accessing resources in this region is being validated, and you will not be able to launch additional resources in this region until the validation is complete. We will notify you by email once your request has been validated. While normally resolved within minutes, please allow up to 4 hours for this process to complete. If the issue still persists, please let us know by writing to aws-verification@amazon.com for further assistance. (PendingVerification) ERROR failed to bootstrap model: cannot start bootstrap instance in any availability zone (eu-south-1a, eu-south-1b, eu-south-1c) # # google changes # $ juju regions google Client Cloud Regions ... us-west2 us-west3 us-west4 asia-east1 ... asia-southeast1 asia-southeast2 australia-southeast1 ... $ juju bootstrap google/us-west3 Creating Juju controller "google-us-west3" on google/us-west3 ... Bootstrap complete, controller "google-us-west3" is now available Controller machines are in the "controller" model Initial model "default" added ```

view details

Simon Richardson

commit sha 9b97526d97debf15c7a2157c8b8300deea5ff3c8

Upgrade controller The following test ensures that we can upgrade our controller using simplestreams from a known stable branch to the new juju. There is a LOT of horse play here to get what we want to do. Namely that we need to find a good stable version, luckily we can use `--channel=<last version>/stable when installing a snap and that'll give us a clean stable. Then we need to perform more magic, as between major releases (2.8 and 2.9) we bumped the series version. So before we generate our metadata agents we also need to create tar.gz files for both focal and bionic. That way we can upgrade correctly, as 2.8 will expect that we can upgrade to 2.9 bionic, even if they're the same binary! Another magic trick is that we bootstrap with the new server url even though we're not using that, but we fallback to the canonical simplestreams for selecting the agent binary - magic /s In addition to this we then do the normal things of upgrading the controller and waiting for it to correctly upgrade. Additional work for deploying should be added to ensure that we didn't break things else where.

view details

Simon Richardson

commit sha 6c15d4689e3c38a14cf5bfd293e991b70bc20230

Add sudo This is really annoying, but is a requirement to ensure that we install juju correctly.

view details

Ian Booth

commit sha aba81e2d9d3d5d7bdea0e9b1365cdea629e1c6b4

The provisioner worker does not need state addresses

view details

Ian Booth

commit sha 2a53de5bd9041f3e5c659f3fc71ab904423515b1

Move container helpers from state to core

view details

Juju bot

commit sha 1bef0e3282927076d440d4373bb816e258778ef2

Merge pull request #12184 from wallyworld/provisioner-state-address https://github.com/juju/juju/pull/12184 The provisioner worker was calling a StateAddresses() API but it doesn't need that info. Remove the API and fix the associated fallout. The second commit is a drive by to move some trivial container helper methods from state to core. This removes one of the cases where the worker package imports state. Sadly it's one of many, so there's more to do. ## QA steps bootstrap k8s and deploy a charm juju show-controller and check the api address is correct bootstrap lxd and deploy a charm juju show-controller and check the api address is correct juju enable-ha juju show-controller and check the api addresses are correct remove a controller machine enable-ha again check that a replacement controller comes up and show-controller is happy ## Bug reference https://bugs.launchpad.net/juju/+bug/1866643

view details

Paul Collins

commit sha 79d39044d6ecb2fe84580d9c92cbb7e52cb0e83a

typo: goroutime -> goroutine

view details

Ian Booth

commit sha 4bd3cfdcbea5199c209cdccdecc11803b82d8566

show-cloud command includes user access

view details

Ian Booth

commit sha 2ae5fd430f051bcbafec4e5e83cd76f526440acc

Merge pull request #12185 from jetpackdanger/no-time-for-goroutine-dump typo: goroutime -> goroutine

view details

Juju bot

commit sha 276d08dfe2e20b7a0f73fff32257a800c28660a2

Merge pull request #12186 from wallyworld/showcloud-with-users https://github.com/juju/juju/pull/12186 The show and list cloud CLI output did not include the users who had access to the clouds (like we do for show-model). We actually have the backend APIs already implemented, but the CLI was not using them. ## QA steps bootstrap and add a user and grant that user add-model access to a cloud on the controller As that user, ``` $ juju show-cloud localhost --controller test Cloud "localhost" from controller "test": defined: public type: lxd auth-types: [certificate] endpoint: https://10.115.246.1:8443 regions: localhost: {} users: bob: access: add-model ``` As admin, ``` $ juju show-cloud localhost --controller test Cloud "localhost" from controller "test": defined: public type: lxd auth-types: [certificate] endpoint: https://10.115.246.1:8443 credential-count: 1 regions: localhost: {} users: admin: display-name: admin access: admin bob: access: add-model ``` Repeat with `list-clouds --format yaml` ## Bug reference https://bugs.launchpad.net/juju/+bug/1892233

view details

Kelvin Liu

commit sha cb207fdae48620bd3af4415408e1fbeede1ed0a2

Remove the tracked model from _backend cache;

view details

Ian Booth

commit sha 444f84a71f973b1ba6634c7d76a699891a016114

Merge pull request #12187 from ycliuhw/feature/juju-migrate-CI Remove the tracked model from _backend cache;

view details

Kelvin Liu

commit sha b0452f1a996616b8b25418c3cca73d9263e08fd1

Merge branch '2.8' into dev-merge-2.8

view details

Juju bot

commit sha 90ff78ce4ce1d0000f25c910d05584a538c4dbe8

Merge pull request #12188 from ycliuhw/dev-merge-2.8 https://github.com/juju/juju/pull/12188 Forward merge of 2.8 into develop. Brings the following changes: - #12175 - #12187

view details

Simon Richardson

commit sha e230d94e6f4e6a70628784b125ce5b6c89374acf

Ensure we use python3 Not everyone has aliased python to python3.

view details

Simon Richardson

commit sha 4353d96e52cbdede6514c817e44ad53fbabf48f0

Do not tee the output Because of the grep script it will always be true, so just reset the file.

view details

Juju bot

commit sha 6a4168ca00659e9baa3c00ae752a0425ddf1fc1d

Merge pull request #12173 from SimonRichardson/upgrade-via-streams https://github.com/juju/juju/pull/12173 Waiting for https://github.com/juju/juju/pull/12165 to land ----- The following test ensures that we can upgrade our controller using simplestreams from a known stable branch to the new juju. There is a LOT of horse play here to get what we want to do. Namely that we need to find a good stable version, luckily we can use `--channel=<last version>/stable when installing a snap and that'll give us a clean stable. Then we need to perform more magic, as between major releases (2.8 and 2.9) we bumped the series version. So before we generate our metadata agents we also need to create tar.gz files for both focal and bionic. That way we can upgrade correctly, as 2.8 will expect that we can upgrade to 2.9 bionic, even if they're the same binary! Another magic trick is that we bootstrap with the new server url even though we're not using that, we fallback to the canonical simplestreams for selecting the agent binary - magic /s In addition to this, we then do the normal things of upgrading the controller and waiting for it to correctly upgrade. Additional work for deploying should be added to ensure that we didn't break things elsewhere. # QA Steps **This will update your local snap client if testing locally** It is expected to bring up a password prompt if testing locally, this is because the snap wants to install/refresh juju. This won't be a problem in jenkins. ```sh ./main.sh upgrade ```

view details

Simon Richardson

commit sha bcb00a74cb02b4faa83eb30212224b2e5f968ef8

Expose juju wait-for in a snap Now that we're going to use juju wait-for for tests we should expose it via a snap.

view details

push time in 4 days

push eventbenhoyt/juju

Joseph Phillips

commit sha 88af681041714ae6ad74267de4d8664d0f672978

Removes provider implementations of Maintain instance and regenerates all mocks. MaintainInstance is a no-op for all implementations.

view details

Joseph Phillips

commit sha 7fad4a4f5213bc69c998ad906794dcb66a04d154

Removes provisioner logic associated with calling MaintainInstance as the method is a no-op for all providers and brokers.

view details

Joseph Phillips

commit sha f1dcb3c132159eb5a6feba98620320c881fc915d

Removes container broker implementations of MaintainInstance, as it is always a no-op.

view details

Joseph Phillips

commit sha 0ca960efee789bdd858f5077140e85a263f1783f

Removes MaintainInstance from the InstanceBroker interface and its mocks. Implementation of this method are always a no-op, so it serves no purpose.

view details

Joseph Phillips

commit sha 529391ed6247994d4f83bb7220e4fa13a067c205

Removes usage of MaintainInstance from container/broker test suites.

view details

Joseph Phillips

commit sha 198860f2cefab178c20db652513e3e6b9582c9bf

Regenerates instance-mutater mocks for removal of MaintainInstance.

view details

Joseph Phillips

commit sha 8a74819ad6b199e49f9bb7d9a86ea4d7b830b6c2

Regenerates container-broker mocks for removal of MaintainInstance.

view details

Joseph Phillips

commit sha d6d991e6eb75c3c493de8a4066f396a7a413eb7d

Regenerates command mocks for removal of MaintainInstance.

view details

Joseph Phillips

commit sha 803447e966779da2465b1e89fe0b2729020c8808

Removes provisioner testing for classification where the classification was to indicate maintenence. MaintainInstance is removed and so is this classification.

view details

Kelvin Liu

commit sha efcf8147d0948cc093befd005010a3cecbad3663

Add nagios to consume nrpe because nrpe will be blocked forever if there is no consumers;

view details

Ian Booth

commit sha 78e7a5a60ef88bd281835a3dfb3522277474257f

Merge pull request #12169 from ycliuhw/fix/nw-model-migration-amd64 Add nagios to consume nrpe because nrpe will be blocked forever if th…

view details

Kelvin Liu

commit sha ea0aafbdde444aa0d42e4628d0ef05dc856ab366

Revert ShouldBeAssigned to compare model type with IAAS;

view details

Achilleas Anagnostopoulos

commit sha 76e520f6197412a9b7ce84ebf51bdccb4e6e7b4a

Update azure region list Interestingly, running the following command also yields the "brazilsoutheast" region but we cannot bootstrap to it at this point in time. diff \ <(az account list-locations | grep 'name.' | cut -d '"' -f4 | sort) \ <(cat cloud/fallback-public-cloud.yaml| sed -n '/azure:/,/azure-china:/p' | grep -E '^ [[:alnum:]]' | tr -d ' ' | tr -d ':' | sort)

view details

Juju bot

commit sha 8eda9c24ae1d86639f7fbff0f2a0a69e27b24ab6

Merge pull request #12171 from achilleasa/2.8-update-azure-regions https://github.com/juju/juju/pull/12171 This PR updates the fallback cloud metadata entries for azure to rename `switzerlandeast` to `switzerlandnorth` Interestingly, running the following command also yields the `brazilsoutheast` region but we cannot bootstrap to it at this point in time so it was omitted. ```console diff \n<(az account list-locations | grep 'name.' | cut -d '"' -f4 | sort) \n<(cat cloud/fallback-public-cloud.yaml| sed -n '/azure:/,/azure-china:/p' | grep -E '^ [[:alnum:]]' | tr -d ' ' | tr -d ':' | sort) ``` The [list](https://streams.canonical.com/juju/public-clouds.syaml) of public clouds has already been updated/signed. ## QA steps ```console $ juju update-public-clouds This operation can be applied to both a copy on this client and to the one on a controller. No current controller was detected but there are other controllers registered: use -c or --controller to specify a controller if needed. Do you ONLY want to update public clouds on this client? (Y/n): Y Fetching latest public cloud list... Updated list of public clouds on this client, 1 cloud region added as well as 1 cloud region deleted: added cloud region: - azure/switzerlandnorth deleted cloud region: - azure/switzerlandeast $ juju bootstrap --credential azure --no-gui azure/switzerlandnorth azure-test ``` ## Bug reference https://bugs.launchpad.net/juju/+bug/1900638

view details

Ben Hoyt

commit sha 48bde6cdbe302dec5dce13d4ce5e6f76cd529709

Try to fix intermittent TestAPIServerCanShutdownWithOutstandingNext This test is failing intermittently in -race mode, for example: https://jenkins.juju.canonical.com/job/Unit-RunUnitTests-race-amd64/6/consoleFull Increase the timeout for stopping the server from 10s to 60s, and also add logging so we can see how long it usually takes (and if the MgoServer.Reset() is being retried). Tracking issue: https://bugs.launchpad.net/juju/+bug/1900931

view details

Kelvin Liu

commit sha f33c58f21155d59b5d8f34fda1b177aeb04f6368

Construct *Unit properly for destroying;

view details

Kelvin Liu

commit sha 58d1ae1ec4894f4c3838768c746ccee9ee82c398

Implemente migrate method in ModelClient;

view details

Juju bot

commit sha 704369cd71f0bcf4eae80692ce03f4b156ca32d1

Merge pull request #12178 from ycliuhw/fix/destroy-caas-controller-hangs https://github.com/juju/juju/pull/12178 *Fix destroying caas controller/models hang issue by constructing Unit properly in cleanupUnitsForDyingApplication;* ## 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.jujucharms.com/t/readme-in-packages/451) related to packages changed~ - [x] Comments answer the question of why design decisions were made ## QA steps ```console $ juju add-model t1 microk8s $ juju deploy cs:~juju/mariadb-k8s-3 $ juju deploy cs:~juju/mediawiki-k8s-4 --config kubernetes-service-type=LoadBalancer $ juju relate mediawiki-k8s:db mariadb-k8s:server $ juju destroy-controller k1 --destroy-all-models --destroy-storage --debug -y ``` ## Documentation changes No ## Bug reference https://bugs.launchpad.net/juju/+bug/1900937

view details

Kelvin Liu

commit sha 30dc8286cf46f5fdae11e153da2ba23a7e7d65cc

Remove unused imports;

view details

Ian Booth

commit sha 66bf72a70defde12f1d11ef4193c54f5969fbe12

Merge pull request #12179 from ycliuhw/feature/juju-migrate-CI Implemente migrate method in ModelClient;

view details

push time in 9 days

delete branch benhoyt/juju

delete branch : fix-legacy-test

delete time in 9 days

pull request commentjuju/juju

Try to fix intermittent TestAPIServerCanShutdownWithOutstandingNext

$$merge$$

benhoyt

comment created time in 9 days

push eventbenhoyt/juju

Ben Hoyt

commit sha 473dda5313efdd3f86d27a7d88aa7939f900c084

Add comment about why we're not using LongWait

view details

push time in 9 days

PR opened juju/juju

Try to fix intermittent TestAPIServerCanShutdownWithOutstandingNext

This test is failing intermittently in -race mode, for example: https://jenkins.juju.canonical.com/job/Unit-RunUnitTests-race-amd64/6/consoleFull

Try increasing the timeout for stopping the server from 10s to 60s, and also add logging so we can see how long it usually takes (and if the MgoServer.Reset() is being retried).

Tracking issue: https://bugs.launchpad.net/juju/+bug/1900931

+6 -1

0 comment

2 changed files

pr created time in 10 days

create barnchbenhoyt/juju

branch : fix-legacy-test

created branch time in 10 days

push eventbenhoyt/juju

Simon Richardson

commit sha 282316062181d185d1c9579aa5383a1c9a70793b

Map queries This is the initial idea for adding map queries. The code introduces a new set of tokens (left and right bracket) and we parse the index ast as a infix operator. From there the query evaluator can just loop through until we get to the bottom of the ast and collapse up. The following are pefectly plausable: config["value"] == 1 config["values"]["nested"] == 1 Slices are not currently handled, that will come later and also checking the length of something is not correctly handled.

view details

Simon Richardson

commit sha 21774f714202ec1657da9f75009feafbb5420ea0

Allow function calls This now allows function calls to happen in query. We currently only support the len() built in function atm. There is quite a few jump throughs to get len to work and jump down into reflect, which isn't ideal, but it is what it is. You could probably use a JIT here to speed up the caching of a function call, but if you're going that far, then wow we got some time on our hands!

view details

Simon Richardson

commit sha 0bf24bf3d9e04950bd0da3667daab6e215da22d5

Ensure that logical AND and OR do it lazily So when using AND and OR they should do things lazily and the right hand side of the AND/OR should not be invoked unless the left hand side passes. That way you can do things like: len(config) > 0 && config["name"] == "fred" If you don't have lazy operators then it would execute the right hand side and fail because name might not be there in the config yet.

view details

Simon Richardson

commit sha 0beeba5d8b7ba28c242a57c9144c799cfdc7c7e4

Add test files to manage regressions The following reads in queries to ensure that we can mass test files.

view details

Simon Richardson

commit sha 4ff2a40e547b5945e937ee740bd42a45760b340f

Handle slice index As both map and slices are pretty much the same deal, we can stand on the shoulders of that to get slices for free. Adding a print function to make it easier to debug. print(len(supported-containers))

view details

Simon Richardson

commit sha bce402d55ae7793c17f1e9aacbccb114728c22a7

Add model config Expose model config so you can query over it. It's now possible to do queries against the controller like so: juju wait-for model -m controller controller --query='config["agent-stream"] == "devel"' --debug

view details

Simon Richardson

commit sha 2fe7bf2c037ed64eea8212a4b45035d58e0e4861

Force github actions to trigger

view details

Simon Richardson

commit sha 4539c7f950da6a6a1c0a05e04b50fcd4d8d8e110

Start to implement bootstrap simplestream test The following starts to add a very simple stream server. It just works in a very simple way by using the jujud available to it. Using different tools to get this working easily (server, templating) makes this much more efficent. It tests that you can bootstrap with a simplestream server and then it deploys onto that server. Added a README file to help explain how the simplestream server works. It is expected that the simplestream server is only used for a limited set of tests and not a fully operational simplestream server to use in any production scenarios. --- Again the test is simple, put up a server, ensure that the tools are there and bootstrap to that tool against the local simplestream server.

view details

Simon Richardson

commit sha ca67d02e6bf23f03f5bcca2f620d6e3451b7e30b

Remove the debug log Instead of this debug log, favour the one in bootstrap.

view details

Simon Richardson

commit sha 4e20f64683c16681c56f80db22a23638c56efc09

Fix skip wordage. Skip refers to upgrade, when the test is running bootstrap

view details

Simon Richardson

commit sha 331bc6d960d72eba1cfb52b42763376e6d6b5044

Fix the missing .gitkeep file

view details

Ben Hoyt

commit sha b8d405ee6ddacbbda0ad6750040543c94538585d

Fix provider/common tests if repo not checked out at */juju/juju

view details

Juju bot

commit sha 276b6801ba5557824385f9bab704820f8e4086a2

Merge pull request #12167 from benhoyt/fix-provider-common https://github.com/juju/juju/pull/12167 Simple fix for test failures I was seeing locally with `provider/common` package. I home the juju repo checked out at `~/w/juju`, but it seems the tests expect it at `*/juju/juju` (probably most people have it at `~/go/src/github.com/juju/juju`?). Was probably happening only to me (and I guess I've never run the entire unit tests suite locally! I usually run by subdirectory or package). Either way, the tests shouldn't depend on the checkout directory, so loosen up this regex a bit.

view details

Ben Hoyt

commit sha 61e01ca3e6f760ea58150eefed2bae89c843f64b

Fix a race in the worker/introspection tests TestUnitStatusTimeout What was happening is that sometimes (specifically in -race mode), the Advance() call in the test was happening before the select on time.After() in the worker code, and the time.After() never triggered. Fixed by using WaitAdvance() -- see https://github.com/juju/juju/wiki/Intermittent-failures Additionally, there was no timeout on the testing http.Client, so the Get() never returned and the test didn't stop till the 40 minute overall timeout kicked in. Once I added an http.Client timeout the actual issue above was a lot more clear.

view details

Ben Hoyt

commit sha d9fe2a9050feaf98856d5575f5d4668b1255a2c1

go fmt

view details

Simon Richardson

commit sha c7d455efe27690c25d831f649d1c80b042f5ba91

Remove old test output A CR should have picked these up as not required.

view details

Joseph Phillips

commit sha 17b00dde25479e19a5515e266ad5f30635d42142

Moves ModelUUID method from common APIAddresser to the provisioner API, which is the only client-side usage of it.

view details

Simon Richardson

commit sha 4955b17c4b21eb1abe50970f8ed2c8f3b49ba621

Remove arch from the debug log We're stuttering when log out the debug information, so remove it.

view details

Simon Richardson

commit sha c025be3a0eb6da3ccf261a2a951ee613fe410f35

Allow tools metadata generation to fail early The metadata generation help documentation could be a lot more useful. Previously you had to dig into the code to see the expected requirements for the generation of the streams metadata from the tgz file. Additionaly for tests you REALLY do not want to go look in the public clouds for the streams if you're testing locally. The preventFallback prevents the generation of tools to go off and do that.

view details

Simon Richardson

commit sha 360666b04f039c001871425b26365aab807ff4c8

Use metadata generation The following removes the custom metadata testing server in favour of the the generating metadata tool that we already have. The issue is that the metadata tool also didn't do what I wanted, which was to fail hard when I was wrong. Failing hard now means that the tests will fail a lot harder a lot sooner and tell you why at the right time, rather than when you attempt to bootstrap! The reason is that the tool failed to do the right thing and now you have to work that out yourself.

view details

push time in 10 days

pull request commentjuju/juju

Fix a race in the worker/introspection tests TestUnitStatusTimeout

$$merge$$

benhoyt

comment created time in 10 days

pull request commentjuju/juju

Fix a race in the worker/introspection tests TestUnitStatusTimeout

!!build!!

benhoyt

comment created time in 11 days

push eventbenhoyt/juju

Ben Hoyt

commit sha d9fe2a9050feaf98856d5575f5d4668b1255a2c1

go fmt

view details

push time in 11 days

PR opened juju/juju

Fix a race in the worker/introspection tests TestUnitStatusTimeout

What was happening is that sometimes (specifically in -race mode), the Advance() call in the test was happening before the select on time.After() in the worker code, and the time.After() never triggered. Fixed by using WaitAdvance() -- see https://github.com/juju/juju/wiki/Intermittent-failures

Additionally, there was no timeout on the testing http.Client, so the Get() never returned and the test didn't stop till the 40 minute overall timeout kicked in. Once I added an http.Client timeout the actual issue above was a lot more clear.

+2 -1

0 comment

1 changed file

pr created time in 11 days

delete branch benhoyt/juju

delete branch : fix-provider-common

delete time in 11 days

create barnchbenhoyt/juju

branch : fix-worker-introspection-test-race

created branch time in 11 days

pull request commentjuju/juju

Fix provider/common tests if repo not checked out at */juju/juju

$$merge$$

benhoyt

comment created time in 11 days

PR opened juju/juju

Fix provider/common tests if repo not checked out at */juju/juju

Simple fix for test failures I was seeing locally with provider/common package. I home the juju repo checked out at ~/w/juju, but it seems the tests expect it at */juju/juju (probably most people have it at ~/go/src/github.com/juju/juju?). Was probably happening only to me (and I guess I've never run the entire unit tests suite locally! I usually run by subdirectory or package).

Either way, the tests shouldn't depend on the checkout directory, so loosen up this regex a bit.

+6 -6

0 comment

1 changed file

pr created time in 11 days

create barnchbenhoyt/juju

branch : fix-provider-common

created branch time in 11 days

push eventbenhoyt/juju

root

commit sha c6874ef9f2b595cc65eee9eb3415add9c1b7c4dc

Fix bug #1887549: Check args.AgentVersion in bootstrapCAAS

view details

Juju bot

commit sha 24468682eace78811a448f04b2bffa877688c2df

Merge pull request #12144 from wallyworld/extra-leadership-logging https://github.com/juju/juju/pull/12144 Add the unit name to various uniter log lines to make debugged k8s operations easier. ## QA steps deploy a k8s charm with debug logging and check logs

view details

Juju bot

commit sha b3a1514dca912275c86f44e02a422430aeb8049e

Merge pull request #12145 from wallyworld/extra-uniter-logging https://github.com/juju/juju/pull/12145 Backport https://github.com/juju/juju/pull/12144 ## QA steps deploy a k8s charm with debug logging and check logs

view details

Juju bot

commit sha 725509585d2f3f03847392aeeea13adf1dc3dddc

Merge pull request #12094 from davigar15/2.8 https://github.com/juju/juju/pull/12094 ## Please provide the following details to expedite Pull Request review: ### Checklist - [ ] Checked if it 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.jujucharms.com/t/readme-in-packages/451) related to packages changed? - [ ] Do comments answer the question of why design decisions were made? ---- ## Description of change This change is needed to fix the bug lp#1887549, that prevents the juju controller from being bootstrapped using a pinned version. In other words, the `--agent-version` option when bootstrapping is ignored. ## QA steps ```sh # Setup microk8s sudo snap install microk8s --classic microk8s.status --wait-ready microk8s.enable storage dns # Check juju version juju version # p.e. 2.8.4-focal-amd64 # Bootstrap controllers juju bootstrap microk8s one --agent-version 2.8.1 juju status # Version==2.8.1 juju bootstrap microk8s two --agent-version 2.8.2 juju status # Version==2.8.2 juju bootstrap microk8s current juju status # Version==2.8.4 ``` ## Bug reference https://bugs.launchpad.net/juju/+bug/1887549

view details

Simon Richardson

commit sha b51c3ab2ea4763dadf0133d236283d298c86b802

agent-stream isn't honoured with upgrade-juju This acceptance test expected that you can go from released stream to devel stream using upgrade-juju --agent-stream devel. That isn't the case and so the test is a bad test. There are numerous bugs around this so we should really fix this at some point: - https://bugs.launchpad.net/juju/+bug/1742342 - https://bugs.launchpad.net/juju/+bug/1863179 - https://bugs.launchpad.net/juju/+bug/1875567 - https://bugs.launchpad.net/juju/+bug/1879573

view details

Heather Lanigan

commit sha 69bb16b449c1b3e0a3fb1a731951ae98b3b29468

Value change for container types with container_network test cause the test to fail on incorrect options with the python test. Just take what is provided on the CLI, rather an interpret.

view details

Heather Lanigan

commit sha 11ad07883325a57fe1d20f671d0504dab56ab05f

Make has containers allowed for advanceLifecycle to dying. For cases like destroy-model and destroy-controller, allow for machines to be moved to dying even if they have containers. Containers must be removed for a machine to be marked dead. Use new DestroyWithContainers. cleanupMachinesForDyingModel uses DestroyWithContainers, and not skip containers, they need to be removed as well. Other cases like remove-machine, continue to fail if the machine has containers. In that case force can be used.

view details

Heather Lanigan

commit sha 5df4da81ca0b4b84d2a82d8140122b2743f665e0

Add CodeMachineHasContainers, for use by the machiner.

view details

Heather Lanigan

commit sha 016988a29dc0625fc8ffc1eb64ddbf4dcba5c086

Check for CodeMachineHasContainers if EnsureDead fails. A machine with containers can now be marked dying. However it should not be marked dead until all containers have been removed. Allow the worker to retry EnsureDead as the worker's watcher will not trigger once all the containers have been removed. If restarting while machine is dying or dead, no need to set the addresses. Improve comments. Add TestMachinerMachineHasContainers. And update current tests for changed behavior around EnsureDead failing on having containers.

view details

Heather Lanigan

commit sha 1814844582ba799e4e7529db3946fb46c561780c

Update machine lifecycle and to use juju 2.0 terminology. Include details about machines with containers in a machine's lifecycle description. Terminology: application not service, remove not destroy, etc.

view details

Heather Lanigan

commit sha 7cd859bfba50e26a19f4595343144587b3ae959e

Start doc describing the cleanup process.

view details

Heather Lanigan

commit sha a660859d3ea63de6af8ac28157adb31a423f0c1e

Make advanceLifecycle more readable. Push operation creation into helper methods, which helps make this very long method easier to read and reduces duplication. Ensure that allowDyingContainers can only be true for dying not dead.

view details

Heather Lanigan

commit sha a29eda0362ab652039440b1b8b03101f1678bc39

Split TestCleanupModelMachines into 2, with and without force. Add a container to the test as well.

view details

Harry Pidcock

commit sha 8a6d65f46d8a7bc7e9cc0462f56e9a741875dda9

Fix deprecation warning with GHA

view details

Ian Booth

commit sha 9333e82b0840304f3eeaaad05cf23fa7283d0094

Merge pull request #12155 from hpidcock/2.8-fix-gha Fix deprecation warning with GHA

view details

Heather Lanigan

commit sha 186aa71b93d47e2915f7ec7e61bcc2d573f47f93

Don't return if err is nil, causes destroy container to fail.

view details

Heather Lanigan

commit sha d836421a4f7afd1eecac4200305357f7fea2dd71

Rename evaulateContainersAdvanceLifecycle to advanceLifecycleIfNoContainers

view details

Ben Hoyt

commit sha f3116d0a4dd746203a945d77fce514e97a9cf543

Basic backup and juju-restore bash tests

view details

Ben Hoyt

commit sha 6bd4b7598f0544db8b1bf982e57f572a5265111e

Add test that both instances are still running (lxd only) Remove "set -e", presuming that this fix will be merged: https://github.com/juju/juju/pull/12140

view details

Ben Hoyt

commit sha 5489ca5d122bc34c7782bad6e081948682f47a37

Use ensure/destroy in run_basic_backup_create()

view details

push time in 11 days

startedmarkshannon/faster-cpython

started time in 11 days

issue commentbenhoyt/goawk

How I can set output of interp.ExecProgram to a variable

Looks like you might have figured it out, but if not, you'd set the Config.Output field to a buffer of some sort, like this: https://play.golang.org/p/p--h0P3tDok

Kingsley-C666

comment created time in 11 days

delete branch benhoyt/juju

delete branch : merge-28-develop-2

delete time in 11 days

pull request commentjuju/juju

Merge 2.8 into develop

$$merge$$

benhoyt

comment created time in 12 days

PR opened juju/juju

Merge 2.8 into develop

To pick up these PRs:

  • https://github.com/juju/juju/pull/12144 Add extra logging to uniter operations
  • https://github.com/juju/juju/pull/12145 Merge pull request #12144 from wallyworld/extra-leadership-logging
  • https://github.com/juju/juju/pull/12094 Fix bug #1887549: Check args.AgentVersion in bootstrapCAAS
  • https://github.com/juju/juju/pull/12155 Fix deprecation warning with GHA
  • https://github.com/juju/juju/pull/12160 Backport backup/restore CI tests to 2.8
+4 -2

0 comment

2 changed files

pr created time in 12 days

push eventbenhoyt/juju

Kelvin Liu

commit sha e847ca4acbe75aa108f91ad859100a4039d24875

Add a resources package for interacting with k8s API;

view details

Yang Kelvin

commit sha 3fe57eb7d40002ee02944ff5122ddae5c7d96cd9

Merge pull request #11932 from ycliuhw/sync-with-dev Sync with dev

view details

Kelvin Liu

commit sha bb9e1df2b5f12e09c384f05c7f6fddd4cb0ddbee

Add tests for resource package;

view details

Yang Kelvin

commit sha 885ae1ca1d885e58e2bfe9142977a7a1cf0dcebf

Merge pull request #11933 from ycliuhw/feature/new-k8s-api-layer Feature/new k8s api layer

view details

Kelvin Liu

commit sha 9ed1ffeff788a06d75f6beb0c7632da8062c458f

Add application abstraction for k8s;

view details

Harry Pidcock

commit sha bddf88d05c758e91969993174e9ed02ff5698ba8

Update state to handle named unit creation and embedded charms.

view details

Harry Pidcock

commit sha b3263b5a722a5a4948a51165d792339ef92fa989

Merge pull request #11940 from hpidcock/k8s-spike-x Update state to handle named unit creation and embedded charms.

view details

Harry Pidcock

commit sha f07cab2849e72fbca01fbd8dcee37ef314e153ad

Breakout charm API into common.

view details

Harry Pidcock

commit sha 16a56a47b99fa573d74f03a128daee596ee30516

Merge pull request #11941 from hpidcock/k8s-spike-x Breakout charm API into common.

view details

Kelvin Liu

commit sha e5d8a89848de8778a5cb031b8066cf51df9d6a39

Add harry's charm.v7 for testing;

view details

Kelvin Liu

commit sha 3ee7aef3e2683703c1bff26d60995868a0229b4c

Move k8s constants to constants package;

view details

Harry Pidcock

commit sha 778e6b7aeb3912bfa8a8d3ffd4a2e4068f1b0b2e

Fix Makefile and add fake-init executable

view details

Kelvin Liu

commit sha 95b4e52e6e38aedaa064bbc34d342b6ef62af05b

Add tests for caas application;

view details

Kelvin Liu

commit sha a37c40bcf5fb457c1feb861d607f63dd9ca58ba5

Try Create if Patch returned notfound error in Apply;

view details

Kelvin Liu

commit sha bd9d1014e3bfde1ea8f95d28df3a14865cc106a9

Config storage before constructing workload resource;

view details

Kelvin Liu

commit sha 7362e2793a83a4317ea29ac979fd7b21566c699e

Add tests for Ensure, Exists and Delete methods in Application;

view details

Kelvin Liu

commit sha 5c9e892aea4b390209d0dbd529c430f84412710e

Add tests for 'State()' in Application;

view details

Harry Pidcock

commit sha f1d3c39fdec0b8e4b9d5a341984d651250a51276

Update state to handle named unit creation and embedded charms.

view details

Harry Pidcock

commit sha 0131a5f1c3750f4d818c5604e28744a962d9dffc

Breakout charm API into common.

view details

Kelvin Liu

commit sha fd35285341cb89523258f6b4f6fabbd55f381b8a

Merge branch 'k8s-spike' of github.com:juju/juju into application-abstraction

view details

push time in 12 days

push eventbenhoyt/juju

root

commit sha c6874ef9f2b595cc65eee9eb3415add9c1b7c4dc

Fix bug #1887549: Check args.AgentVersion in bootstrapCAAS

view details

Joseph Phillips

commit sha d356d1ce5d2a5f6646f3a9a80db7ce95b43d4a1d

Adds an index to the linklayerdevices collection to speed up common use case of accessing by model-uuid and/or machine-id.

view details

Joseph Phillips

commit sha 4481a46d6e7606e6cb807ff118acf7beb28c1613

Adds upgrade step for removing global provider ID records for link-layer devices, where those IDs are not currently used.

view details

Joseph Phillips

commit sha d6945c55a50c37752fb66da52c294e8f9afde156

Tightens the logic in the link-layer device ID upgrade step so that we use a set for the referenced provider IDs and the regex used to identify deletion candidates is more specific. The test also verifies that we do not delete IDs that are not for link-layer devices.

view details

Joseph Phillips

commit sha 3f3532956368a4c03d7d66ab8f045a68545afa29

Tracks the delta for provider IDs in order to log number of deleted link-layer device IDs.

view details

Simon Richardson

commit sha 814e29085c402f116f05144b278e1e964b30a07b

Define a run linter Turns out the tension between run and run_linter was too great. This instead makes it more evident that the two should never be merged together as they require different things from the set modes. Some time should be used to potentially merge the run functions together with maybe a MODE envar, but for now we'll have duplicate functions so we can make any tweaks without breaking the abstractions.

view details

Simon Richardson

commit sha 91f338d0ed7fc2f6aa69fdd1ac23dbe11c46443d

Ensure we destroy the model It's to easy to keep the model up and running when using the reuse flag, ensuring that we remove the model when done.

view details

Simon Richardson

commit sha 60c965d753003f71278f67d519709a4e0ee1643b

Fix deploy test case The lxd profile can also include other values, so we need to make sure our grep can handle that.

view details

Joseph Phillips

commit sha edae4161728b3fbb698a77976516d2bc56b96614

Adds 2.8.6 to state upgrade steps for version list.

view details

Juju bot

commit sha 6a7f9c3e3d6b6b2304aa66c43eb4e4779a1d93d8

Merge pull request #12132 from manadart/2.8-unref-lld-provider-id https://github.com/juju/juju/pull/12132 It has been observed in older models the the `providerIDs` collection could end up with IDs registered for link-layer devices that were not actually against devices in the `linklayerdevices` collection. If the instance-poller attempts to set those IDs against devices, we get log messages saying that we cannot assign those IDs because they are already in use. This patch adds an upgrade step to remove unused link-layer device IDs from the global collection so that they can be used again, and the log output no longer occurs. ## QA steps - Bootstrap to MAAS with 2.8 and add a machine. - Connect to Mongo and add a global ID: ```javascript db.linklayerdevices.insertOne({ "_id" : "cd5b11f3-6534-4623-8127-53dc0ca0108d:linklayerdevice:GOOOOONE", "model-uuid" : "cd5b11f3-6534-4623-8127-53dc0ca0108d" }) ``` - Run the upgrade. - Check the collection and ensure that the inserted ID is gone and all others remain. ## Documentation changes None. ## Bug reference Potentially https://bugs.launchpad.net/bugs/1898195

view details

Juju bot

commit sha 7060e42df1204af42a460c3f6d1666f2f5d93aed

Merge pull request #12138 from SimonRichardson/fix-bash-tests-part-deux https://github.com/juju/juju/pull/12138 Turns out the tension between run and run_linter was too great. This instead makes it more evident that the two should never be merged together as they require different things from the set modes. Some time should be used to potentially merge the run functions together with maybe a MODE envar, but for now, we'll have duplicate functions so we can make any tweaks without breaking the abstractions. ## QA steps This takes some time, but is worth testing... ```sh make go-install juju bootstrap lxd test --no-gui cd tests && ./main.sh -l test deploy ``` ```sh make static-analysis ```

view details

Joseph Phillips

commit sha 1dd82325897c10ee4be82e7a834f99f64e098ee6

Fixes transient error in testing link-layer devices by doing an order agnostic comparison.

view details

Juju bot

commit sha afa3d678e8534c0162a77bea88fbc784b88e9dff

Merge pull request #12133 from manadart/2.8-linklayerdevices-index https://github.com/juju/juju/pull/12133 The `linklayerdevices` collection is quite large in legacy Juju deployments - we've seen hundreds of thousands. Although this should be trimmed down to extant devices by later Juju versions, adding this index will ameliorate full table scans for the common use case of selection by machine ID (and implicitly model ID). ## QA steps Tested on dump from production controller based on inferred queries from common access strategies. Execution times (estimated) are in milliseconds. Without index. - By model: 298 - By model and machine: 316 With index. - By model: 751 - By model and machine: 0 ``` > db.linklayerdevices.find({"model-uuid": "b8026e23-3e7a-475f-89b6-a9debdc5f7d5"}).explain("executionStats") { "queryPlanner" : { "plannerVersion" : 1, "namespace" : "juju.linklayerdevices", "indexFilterSet" : false, "parsedQuery" : { "model-uuid" : { "$eq" : "b8026e23-3e7a-475f-89b6-a9debdc5f7d5" } }, "winningPlan" : { "stage" : "COLLSCAN", "filter" : { "model-uuid" : { "$eq" : "b8026e23-3e7a-475f-89b6-a9debdc5f7d5" } }, "direction" : "forward" }, "rejectedPlans" : [ ] }, "executionStats" : { "executionSuccess" : true, "nReturned" : 795834, "executionTimeMillis" : 298, "totalKeysExamined" : 0, "totalDocsExamined" : 795837, "executionStages" : { "stage" : "COLLSCAN", "filter" : { "model-uuid" : { "$eq" : "b8026e23-3e7a-475f-89b6-a9debdc5f7d5" } }, "nReturned" : 795834, "executionTimeMillisEstimate" : 28, "works" : 795839, "advanced" : 795834, "needTime" : 4, "needYield" : 0, "saveState" : 795, "restoreState" : 795, "isEOF" : 1, "direction" : "forward", "docsExamined" : 795837 } }, "serverInfo" : { "host" : "sandbox", "port" : 27017, "version" : "4.4.1", "gitVersion" : "ad91a93a5a31e175f5cbf8c69561e788bbc55ce1" }, "ok" : 1 } > db.linklayerdevices.find({ ... "model-uuid": "b8026e23-3e7a-475f-89b6-a9debdc5f7d5", ... "machine-id": "1" ... }).explain("executionStats") { "queryPlanner" : { "plannerVersion" : 1, "namespace" : "juju.linklayerdevices", "indexFilterSet" : false, "parsedQuery" : { "$and" : [ { "machine-id" : { "$eq" : "1" } }, { "model-uuid" : { "$eq" : "b8026e23-3e7a-475f-89b6-a9debdc5f7d5" } } ] }, "winningPlan" : { "stage" : "COLLSCAN", "filter" : { "$and" : [ { "machine-id" : { "$eq" : "1" } }, { "model-uuid" : { "$eq" : "b8026e23-3e7a-475f-89b6-a9debdc5f7d5" } } ] }, "direction" : "forward" }, "rejectedPlans" : [ ] }, "executionStats" : { "executionSuccess" : true, "nReturned" : 20, "executionTimeMillis" : 316, "totalKeysExamined" : 0, "totalDocsExamined" : 795837, "executionStages" : { "stage" : "COLLSCAN", "filter" : { "$and" : [ { "machine-id" : { "$eq" : "1" } }, { "model-uuid" : { "$eq" : "b8026e23-3e7a-475f-89b6-a9debdc5f7d5" } } ] }, "nReturned" : 20, "executionTimeMillisEstimate" : 23, "works" : 795839, "advanced" : 20, "needTime" : 795818, "needYield" : 0, "saveState" : 795, "restoreState" : 795, "isEOF" : 1, "direction" : "forward", "docsExamined" : 795837 } }, "serverInfo" : { "host" : "sandbox", "port" : 27017, "version" : "4.4.1", "gitVersion" : "ad91a93a5a31e175f5cbf8c69561e788bbc55ce1" }, "ok" : 1 } > db.linklayerdevices.createIndex({ "model-uuid": 1, "machine-id": 1}) { "createdCollectionAutomatically" : false, "numIndexesBefore" : 1, "numIndexesAfter" : 2, "ok" : 1 } > db.linklayerdevices.find({"model-uuid": "b8026e23-3e7a-475f-89b6-a9debdc5f7d5"}).explain("executionStats") { "queryPlanner" : { "plannerVersion" : 1, "namespace" : "juju.linklayerdevices", "indexFilterSet" : false, "parsedQuery" : { "model-uuid" : { "$eq" : "b8026e23-3e7a-475f-89b6-a9debdc5f7d5" } }, "winningPlan" : { "stage" : "FETCH", "inputStage" : { "stage" : "IXSCAN", "keyPattern" : { "model-uuid" : 1, "machine-id" : 1 }, "indexName" : "model-uuid_1_machine-id_1", "isMultiKey" : false, "multiKeyPaths" : { "model-uuid" : [ ], "machine-id" : [ ] }, "isUnique" : false, "isSparse" : false, "isPartial" : false, "indexVersion" : 2, "direction" : "forward", "indexBounds" : { "model-uuid" : [ "[\"b8026e23-3e7a-475f-89b6-a9debdc5f7d5\", \"b8026e23-3e7a-475f-89b6-a9debdc5f7d5\"]" ], "machine-id" : [ "[MinKey, MaxKey]" ] } } }, "rejectedPlans" : [ ] }, "executionStats" : { "executionSuccess" : true, "nReturned" : 795834, "executionTimeMillis" : 751, "totalKeysExamined" : 795834, "totalDocsExamined" : 795834, "executionStages" : { "stage" : "FETCH", "nReturned" : 795834, "executionTimeMillisEstimate" : 67, "works" : 795835, "advanced" : 795834, "needTime" : 0, "needYield" : 0, "saveState" : 795, "restoreState" : 795, "isEOF" : 1, "docsExamined" : 795834, "alreadyHasObj" : 0, "inputStage" : { "stage" : "IXSCAN", "nReturned" : 795834, "executionTimeMillisEstimate" : 32, "works" : 795835, "advanced" : 795834, "needTime" : 0, "needYield" : 0, "saveState" : 795, "restoreState" : 795, "isEOF" : 1, "keyPattern" : { "model-uuid" : 1, "machine-id" : 1 }, "indexName" : "model-uuid_1_machine-id_1", "isMultiKey" : false, "multiKeyPaths" : { "model-uuid" : [ ], "machine-id" : [ ] }, "isUnique" : false, "isSparse" : false, "isPartial" : false, "indexVersion" : 2, "direction" : "forward", "indexBounds" : { "model-uuid" : [ "[\"b8026e23-3e7a-475f-89b6-a9debdc5f7d5\", \"b8026e23-3e7a-475f-89b6-a9debdc5f7d5\"]" ], "machine-id" : [ "[MinKey, MaxKey]" ] }, "keysExamined" : 795834, "seeks" : 1, "dupsTested" : 0, "dupsDropped" : 0 } } }, "serverInfo" : { "host" : "sandbox", "port" : 27017, "version" : "4.4.1", "gitVersion" : "ad91a93a5a31e175f5cbf8c69561e788bbc55ce1" }, "ok" : 1 } > db.linklayerdevices.find({ ... "model-uuid": "b8026e23-3e7a-475f-89b6-a9debdc5f7d5", ... "machine-id": "1" ... }).explain("executionStats") { "queryPlanner" : { "plannerVersion" : 1, "namespace" : "juju.linklayerdevices", "indexFilterSet" : false, "parsedQuery" : { "$and" : [ { "machine-id" : { "$eq" : "1" } }, { "model-uuid" : { "$eq" : "b8026e23-3e7a-475f-89b6-a9debdc5f7d5" } } ] }, "winningPlan" : { "stage" : "FETCH", "inputStage" : { "stage" : "IXSCAN", "keyPattern" : { "model-uuid" : 1, "machine-id" : 1 }, "indexName" : "model-uuid_1_machine-id_1", "isMultiKey" : false, "multiKeyPaths" : { "model-uuid" : [ ], "machine-id" : [ ] }, "isUnique" : false, "isSparse" : false, "isPartial" : false, "indexVersion" : 2, "direction" : "forward", "indexBounds" : { "model-uuid" : [ "[\"b8026e23-3e7a-475f-89b6-a9debdc5f7d5\", \"b8026e23-3e7a-475f-89b6-a9debdc5f7d5\"]" ], "machine-id" : [ "[\"1\", \"1\"]" ] } } }, "rejectedPlans" : [ ] }, "executionStats" : { "executionSuccess" : true, "nReturned" : 20, "executionTimeMillis" : 0, "totalKeysExamined" : 20, "totalDocsExamined" : 20, "executionStages" : { "stage" : "FETCH", "nReturned" : 20, "executionTimeMillisEstimate" : 0, "works" : 21, "advanced" : 20, "needTime" : 0, "needYield" : 0, "saveState" : 0, "restoreState" : 0, "isEOF" : 1, "docsExamined" : 20, "alreadyHasObj" : 0, "inputStage" : { "stage" : "IXSCAN", "nReturned" : 20, "executionTimeMillisEstimate" : 0, "works" : 21, "advanced" : 20, "needTime" : 0, "needYield" : 0, "saveState" : 0, "restoreState" : 0, "isEOF" : 1, "keyPattern" : { "model-uuid" : 1, "machine-id" : 1 }, "indexName" : "model-uuid_1_machine-id_1", "isMultiKey" : false, "multiKeyPaths" : { "model-uuid" : [ ], "machine-id" : [ ] }, "isUnique" : false, "isSparse" : false, "isPartial" : false, "indexVersion" : 2, "direction" : "forward", "indexBounds" : { "model-uuid" : [ "[\"b8026e23-3e7a-475f-89b6-a9debdc5f7d5\", \"b8026e23-3e7a-475f-89b6-a9debdc5f7d5\"]" ], "machine-id" : [ "[\"1\", \"1\"]" ] }, "keysExamined" : 20, "seeks" : 1, "dupsTested" : 0, "dupsDropped" : 0 } } }, "serverInfo" : { "host" : "sandbox", "port" : 27017, "version" : "4.4.1", "gitVersion" : "ad91a93a5a31e175f5cbf8c69561e788bbc55ce1" }, "ok" : 1 } ``` ## Documentation changes N/A ## Bug reference https://bugs.launchpad.net/juju/+bug/1899536

view details

Kelvin Liu

commit sha 544fd52b7a175cb9735b9ca03e003f471a25067b

Mount the primary service account to workload pod if it was defined;

view details

Juju bot

commit sha 5d0442d3e15952bfc0ce059cb43ef7949ca71aaa

Merge pull request #12141 from ycliuhw/fix/primarySA https://github.com/juju/juju/pull/12141 *Mount the primary service account to workload pod if it was defined;* ## 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.jujucharms.com/t/readme-in-packages/451) related to packages changed~ - [x] Comments answer the question of why design decisions were made ## QA steps ```console $ juju deploy cs:~charmed-osm/mongodb-k8s --config enable-sidecar=true $ mkubectl get pod/mongodb-k8s-0 -n t2 -o json | jq '.spec.serviceAccountName,.spec.serviceAccount' "mongodb-k8s" "mongodb-k8s" ``` ## Documentation changes No ## Bug reference https://bugs.launchpad.net/juju/+bug/1899987

view details

Juju bot

commit sha 24468682eace78811a448f04b2bffa877688c2df

Merge pull request #12144 from wallyworld/extra-leadership-logging https://github.com/juju/juju/pull/12144 Add the unit name to various uniter log lines to make debugged k8s operations easier. ## QA steps deploy a k8s charm with debug logging and check logs

view details

Juju bot

commit sha b3a1514dca912275c86f44e02a422430aeb8049e

Merge pull request #12145 from wallyworld/extra-uniter-logging https://github.com/juju/juju/pull/12145 Backport https://github.com/juju/juju/pull/12144 ## QA steps deploy a k8s charm with debug logging and check logs

view details

Juju bot

commit sha 725509585d2f3f03847392aeeea13adf1dc3dddc

Merge pull request #12094 from davigar15/2.8 https://github.com/juju/juju/pull/12094 ## Please provide the following details to expedite Pull Request review: ### Checklist - [ ] Checked if it 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.jujucharms.com/t/readme-in-packages/451) related to packages changed? - [ ] Do comments answer the question of why design decisions were made? ---- ## Description of change This change is needed to fix the bug lp#1887549, that prevents the juju controller from being bootstrapped using a pinned version. In other words, the `--agent-version` option when bootstrapping is ignored. ## QA steps ```sh # Setup microk8s sudo snap install microk8s --classic microk8s.status --wait-ready microk8s.enable storage dns # Check juju version juju version # p.e. 2.8.4-focal-amd64 # Bootstrap controllers juju bootstrap microk8s one --agent-version 2.8.1 juju status # Version==2.8.1 juju bootstrap microk8s two --agent-version 2.8.2 juju status # Version==2.8.2 juju bootstrap microk8s current juju status # Version==2.8.4 ``` ## Bug reference https://bugs.launchpad.net/juju/+bug/1887549

view details

Harry Pidcock

commit sha 8a6d65f46d8a7bc7e9cc0462f56e9a741875dda9

Fix deprecation warning with GHA

view details

Ian Booth

commit sha 9333e82b0840304f3eeaaad05cf23fa7283d0094

Merge pull request #12155 from hpidcock/2.8-fix-gha Fix deprecation warning with GHA

view details

push time in 12 days

pull request commentjuju/juju

Backport backup/restore CI tests to 2.8

$$merge$$

benhoyt

comment created time in 12 days

push eventbenhoyt/juju

Ben Hoyt

commit sha 3a9b63898c70127eb977bc0f04d3d0d4c9ddd60a

Add missing newline at EOF

view details

push time in 12 days

PR opened juju/juju

Backport backup/restore CI tests to 2.8

I landed the backup and juju-restore tests to develop, but Jenkins is trying to run them on 2.8 as well (where they don't exist). They should work on 2.8 so there's no reason not to add them. This PR cherry-picks them to 2.8 -- commits from two PRs https://github.com/juju/juju/pull/12137 and https://github.com/juju/juju/pull/12153.

+117 -8

0 comment

4 changed files

pr created time in 12 days

create barnchbenhoyt/juju

branch : tests-backup-28

created branch time in 12 days

delete branch benhoyt/juju

delete branch : fix-races

delete time in 12 days

push eventbenhoyt/juju

Simon Richardson

commit sha 8077f543e525b9e234105cac801743c518a30124

Allow unit queries This allows for unit queries, but whilst testing unit querying I found out that we drop the error if you misstype a identifier in a query and this is no way to know why. The following code fixes that and as a bonus we can check to see what you wanted as well. The code is rather simple and quite a bit of copy and paste from a model query. The difference being that the scope and the text for the command.

view details

Simon Richardson

commit sha 534aba5c893ebe854644b9b335c96c0dc3d66a0a

Add machine command This adds machine commands that take an Id and works on a machine scope for querying the model.

view details

Simon Richardson

commit sha a271502cfa019fd48fa25f0a5e6243f113302c64

Update status to be work-load status Forgot to update the default status now we have both workload-status vs agent-status.

view details

Ian Booth

commit sha abb7c83b256021892fcae0067034880f6292e2b0

Use the pool system state for getting api addresses Don't construct a new state each time

view details

Harry Pidcock

commit sha 8aafb917f0a79bdec709382b48a9e194439128e7

Fix deprecation warning in GHAs

view details

Juju bot

commit sha c1506e4c6979c81ed882478a8a6484a9011b72bf

Merge pull request #12154 from wallyworld/k8s-api-addresses https://github.com/juju/juju/pull/12154 When getting controller API addresses, the controller model state is needed for k8s models as that's where the controller cloud service entity is stored. We were constructing a new controller model state for each API call, but that's not needed as the state pool is already available on the facade context, and said state pool has a reference to SystemState(). This PR weaves use of the controller model through the facade layers, for both CAAS and IAAS models. ## QA steps bootstrap both k8s and lxd controllers deploy charms enable ha on lxd controller check local controller yaml for correct api addresses juju show-controller and check api addresses ssh into charm operator and check agent conf for correct api addresses

view details

Ian Booth

commit sha 5180307e5505c49f421f835ea541cbb66830f009

Merge pull request #12156 from hpidcock/develop-fix-gha Fix more deprecation warnings in GHAs

view details

Ben Hoyt

commit sha 051f8ee71959c8bcc339b92a8ad9a00b264ea8bd

Fix data races in various unit tests * Concurrent access of fakeContext.deployed set in worker/deployer tests * Overwriting global http.DefaultClient's Jar field in cmd/jujud/agent tests (fixed in juju/http repo) * Concurrent access of linereader fields. linereader.New() starts the runner goroutine, so it's unsafe to modify fields after New. See: https://github.com/mitchellh/go-linereader/blob/1b945b3263eb070718f0a0742000234b5c8cab86/linereader.go#L22-L26

view details

Ben Hoyt

commit sha bc1e4cea820db3cc5daf1024cd10f472d220ef94

Update go.sum (go mod tidy)

view details

Juju bot

commit sha 3e0ae83490e0f09215dbce0a3d7371ac893d83de

Merge pull request #12098 from SimonRichardson/unit-queries https://github.com/juju/juju/pull/12098 This allows for unit queries, but whilst testing unit querying I found out that we drop the error if you mistype an identifier in a query and there is no way to know why. The following code fixes that and as a bonus, we can check to see what you wanted as well. The code is rather simple and quite a bit of copy and paste from a model query. The difference is that the scope and the text for the command. ## QA steps ```sh $ juju bootstrap lxd test $ juju deploy mysql $ juju wait-for unit mysql/0 ``` To trigger the error message: ```sh $ juju wait-for unit mysql/0 --query='nam == "mysql-0"' ERROR Runtime Error: identifier "nam" not found on UnitInfo: invalid identifer Did you mean: name ```

view details

Heather Lanigan

commit sha be98fbb05def66b751638426b7a7aa01fc68a7c3

Fix data race. It is unsafe to change the timeout value after calling linereader.New. Mimic linereader.New and set our own timeout.

view details

Juju bot

commit sha 611fe4ecb603caae90c745766ab65d4a53f923c0

Merge pull request #12159 from hmlanigan/race-u-t https://github.com/juju/juju/pull/12159 Create a juju constructor for a linereader Reader to avoid changing the structure values, timeout, after it's been used in a go routine. ## QA steps No change to current behavior should be seen. Ran ~/bin/stress-race.bash in apiserver: 6 times and counting with no issue. Seen in first time without the change. ## Bug reference https://bugs.launchpad.net/juju/+bug/1900619

view details

Ben Hoyt

commit sha f2bff18934a06c9800daeeb947e9b5856d090f6a

Revert linereader fix as Heather fixed this in PR #12159

view details

Juju bot

commit sha cdecc76daef3f9b623f7c19454d7c4714bc07185

Merge pull request #12157 from benhoyt/fix-races https://github.com/juju/juju/pull/12157 Fix the following data races reported by `go test -race` in CI: * Concurrent access of fakeContext.deployed set in worker/deployer tests * Overwriting global http.DefaultClient's Jar field in cmd/jujud/agent tests (fixed in juju/http repo) This fixes the actual "WARNING: DATA RACE" issues reported by https://jenkins.juju.canonical.com/job/RunUnittests-race-amd64/ ... though I think there are other issues with the unittests-race job that aren't actual data races. See related fix: https://github.com/juju/juju/pull/12159

view details

push time in 12 days

pull request commentjuju/juju

Fix data races in various unit tests

$$merge$$

benhoyt

comment created time in 12 days

push eventbenhoyt/juju

Ben Hoyt

commit sha f2bff18934a06c9800daeeb947e9b5856d090f6a

Revert linereader fix as Heather fixed this in PR #12159

view details

push time in 12 days

pull request commentjuju/juju

Fix data races in various unit tests

!!build!!

benhoyt

comment created time in 12 days

issue closedbenhoyt/inih

array in ini file for ini parser stream to parse

Hi!:

I have an array in a ini file like

[section1]

key1 = value1 key2 = value2 ..... lut_table = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 ......

In the structure, it is defined as struct { ... int lut_table[16]; } for(i=0; i<16; i++) pconfig.lut_table[i] = atoi[multi_value] something?

Can I implement something in the ini_parse_stream to read values for this array? any suggestions? Or something similar like simpleIni to have a key whic has multivalues?

closed time in 12 days

chienhsinlin

issue commentbenhoyt/inih

array in ini file for ini parser stream to parse

Hi @chienhsinlin, there's no special provision for this in inih itself, but you can definitely parse comma-separated values in the handler yourself -- use something like strchr or strtok to find the ',' (comma) separators.

If the values for one key are spread across multiple lines, you'll also want to set INI_ALLOW_MULTILINE to 1. This works like Python's configparser multi-line values -- subsequent values have to be indented with whitespace. For example:

[section]
lut_table = 1, 2, 3, 4, 5, 6, 7, 8,
            9, 10, 11, 12, 13, 14, 15, 16

Then you'll receive two separate calls to your handler function with the same section and key name, and you'll need to save the last lut_table array index in a global or something like that.

Hope that helps!

chienhsinlin

comment created time in 12 days

pull request commentjuju/juju

Fix data races in various unit tests

!!build!!

benhoyt

comment created time in 13 days

push eventbenhoyt/juju

Ben Hoyt

commit sha bc1e4cea820db3cc5daf1024cd10f472d220ef94

Update go.sum (go mod tidy)

view details

push time in 13 days

PR opened juju/juju

Fix data races in various unit tests

Fix the following data races reported by go test -race in CI:

  • Concurrent access of fakeContext.deployed set in worker/deployer tests
  • Overwriting global http.DefaultClient's Jar field in cmd/jujud/agent tests (fixed in juju/http repo)
  • Concurrent access of linereader fields. linereader.New() starts the runner goroutine, so it's unsafe to modify fields after New. See: https://github.com/mitchellh/go-linereader/blob/1b945b3263eb070718f0a0742000234b5c8cab86/linereader.go#L22-L26

This fixes the actual "WARNING: DATA RACE" issues reported by https://jenkins.juju.canonical.com/job/RunUnittests-race-amd64/ ... though I think there are other issues with the unittests-race job that aren't actual data races.

+27 -5

0 comment

4 changed files

pr created time in 13 days

create barnchbenhoyt/juju

branch : fix-races

created branch time in 13 days

delete branch benhoyt/http

delete branch : fix-race

delete time in 13 days

push eventjuju/http

Ben Hoyt

commit sha 148b1c71cbd6cd4c7d1662430383e2e1b0746ccc

Fix NewClient overwriting http.DefaultClient's Jar field This was causing a data race in cmd/jujud/agent tests.

view details

Ben Hoyt

commit sha 69ae1d429836e3e8e505c20fbab9d3ef6cc70f12

Merge pull request #3 from benhoyt/fix-race Fix NewClient overwriting http.DefaultClient's Jar field

view details

push time in 13 days

PR merged juju/http

Fix NewClient overwriting http.DefaultClient's Jar field

Create a copy of http.DefaultClient before messing with its fields (specifically Jar).

This was causing a data race in cmd/jujud/agent tests (Jenkins failure). I've tested locally that this change also fixes that race, but I've added a unit test for the specific issue in this PR too.

+21 -1

0 comment

2 changed files

benhoyt

pr closed time in 13 days

PR opened juju/http

Fix NewClient overwriting http.DefaultClient's Jar field

Create a copy of http.DefaultClient before messing with its fields (specifically Jar).

This was causing a data race in cmd/jujud/agent tests (Jenkins failure). I've tested locally that this change also fixes that race, but I've added a unit test for the specific issue in this PR too.

+21 -1

0 comment

2 changed files

pr created time in 13 days

create barnchbenhoyt/http

branch : fix-race

created branch time in 13 days

fork benhoyt/http

Juju wrapper for the standard go HTTP library.

fork in 13 days

push eventbenhoyt/juju

Ben Hoyt

commit sha 128cf423c47f719b776622b902e3a2effc9cd62c

Rename suites/backup_restore to suites/backup to avoid underscore juju-qa-jenkins/jobs/ci-run/scripts/lxd-runner.sh creates the container name as follows: CONTAINER_NAME="ci-build-${{SHORT_GIT_COMMIT}}-${{JOB_NAME}}" And because the job name is created directly from the juju/tests/suites subdirectory, the job name is "backup_restore". lxc doesn't like underscores in container names, so the run fails. Just getting rid of the underscore in the directory name seems like the simplest way to fix. This commit adds "-e" to the "echo" commands to fix the tests/main.sh output for -h and -H (list of suites). Now that we're using bash instead of sh we need "echo -e" to interpret the backslashes.

view details

Ian Booth

commit sha 45115ea5ff625006cb5215c7bac2c245b9dd9d31

Merge pull request #12153 from benhoyt/rename-backup Rename suites/backup_restore to suites/backup to avoid underscore

view details

push time in 13 days

PR opened juju/juju

Rename suites/backup_restore to suites/backup to avoid underscore

juju-qa-jenkins/jobs/ci-run/scripts/lxd-runner.sh creates the container name as follows:

CONTAINER_NAME="ci-build-${{SHORT_GIT_COMMIT}}-${{JOB_NAME}}"

And because the job name is created directly from the juju/tests/suites subdirectory, the job name is "backup_restore". lxc doesn't like underscores in container names, so the run fails. Just getting rid of the underscore in the directory name seems like the simplest way to fix.

This commit adds -e to the "echo" commands to fix the tests/main.sh output for -h and -H (list of suites). Now that we're using bash instead of sh we need echo -e to interpret the backslashes.

+5 -5

0 comment

3 changed files

pr created time in 13 days

create barnchbenhoyt/juju

branch : rename-backup

created branch time in 13 days

push eventbenhoyt/juju

Ben Hoyt

commit sha f5ee8e73ad9174c235b3e61c45558487f9db0670

Basic backup and juju-restore bash tests

view details

Gabriel Adrian Samfira

commit sha 942456eabc885870c5ada502751fad4e589d3a15

Fix services list on Windows * Run machine agent under LocalSystem on Windows. There is no need to run it under a regular user. * Remove ListServices() code from juju and use the upstream implementation. It seems 6 years later, the ability to list services has been added. No need to keep using the one in juju. * Only attempt to reset password on services that belong to juju unit agents. This fixes https://bugs.launchpad.net/juju/+bug/1900002

view details

Ben Hoyt

commit sha 9f00c22c6d2d339319c1db0a0549e8f6c967104b

Add test that both instances are still running (lxd only) Remove "set -e", presuming that this fix will be merged: https://github.com/juju/juju/pull/12140

view details

Kelvin Liu

commit sha 544fd52b7a175cb9735b9ca03e003f471a25067b

Mount the primary service account to workload pod if it was defined;

view details

Ben Hoyt

commit sha 80197b2b2bbc1eb8898d2558ea25b4ba6955befa

Use ensure/destroy in run_basic_backup_create()

view details

Juju bot

commit sha 5d0442d3e15952bfc0ce059cb43ef7949ca71aaa

Merge pull request #12141 from ycliuhw/fix/primarySA https://github.com/juju/juju/pull/12141 *Mount the primary service account to workload pod if it was defined;* ## 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.jujucharms.com/t/readme-in-packages/451) related to packages changed~ - [x] Comments answer the question of why design decisions were made ## QA steps ```console $ juju deploy cs:~charmed-osm/mongodb-k8s --config enable-sidecar=true $ mkubectl get pod/mongodb-k8s-0 -n t2 -o json | jq '.spec.serviceAccountName,.spec.serviceAccount' "mongodb-k8s" "mongodb-k8s" ``` ## Documentation changes No ## Bug reference https://bugs.launchpad.net/juju/+bug/1899987

view details

Ian Booth

commit sha 53e0d340bad7db687c432b919a132ea777fb0981

Merge branch '2.8' into merge-2.8-20201016a

view details

Ian Booth

commit sha 57be62ee634fbe82444b5b7983722ad6d81ff96b

Fix bash tests to use focal

view details

Juju bot

commit sha 2eadbec03f4c542df58d2bd8976e0e75c977f4fb

Merge pull request #12143 from wallyworld/merge-2.8-20201016a https://github.com/juju/juju/pull/12143 ## Please provide the following details to expedite review (and delete this heading) Merge 2.8 with #12141 Also drive by fix for bash tests since focal is now the default LTS, not bionic. ## QA steps See PR.

view details

Harry Pidcock

commit sha 788376cc74a487fba63244b064027a39cc2b6abf

Fix windows userdata unit test.

view details

Thomas Miller

commit sha 392599f6c271a7c299a036d024219b0728d2499b

Adding some missing labels test and de-dupe

view details

Juju bot

commit sha bbefb4d91ac6c9635f181c1c319b547acda469bb

Merge pull request #12139 from gabriel-samfira/fix-services-list https://github.com/juju/juju/pull/12139 prdesc Run machine agent under LocalSystem on Windows. There is no need to run it under a regular user. prdesc Remove ListServices() code from juju and use the upstream implementation. It seems 6 years later, the ability to list services has been added. No need to keep using the one in juju. prdesc Only attempt to reset password on services that belong to juju unit agents. This fixes https://bugs.launchpad.net/juju/+bug/1900002 ## QA steps ```sh juju add-machine --series win2016 ``` RDP into the windows machine ```sh juju deploy cs:~cloudbaseit/active-directory --to 1 ``` ## Documentation changes N/A ## Bug reference https://bugs.launchpad.net/juju/+bug/1900002

view details

Ian Booth

commit sha 7fe54595675fa8fe01aa7adad4b25fbad485d1e2

Add extra logging to uniter operations

view details

Juju bot

commit sha 5726d98ea5b56e2fb900a8995892821593590f9f

Merge pull request #12144 from wallyworld/extra-leadership-logging https://github.com/juju/juju/pull/12144 Add the unit name to various uniter log lines to make debugged k8s operations easier. ## QA steps deploy a k8s charm with debug logging and check logs

view details

Juju bot

commit sha 4861690dacfdb68bc78850399b16a188abe74465

Merge pull request #12142 from tlm/label-tests https://github.com/juju/juju/pull/12142 Adds a missing test and removes duplicate function. Quick tidy up of the labels code base. ## Checklist - [x] Requires a [pylibjuju](https://github.com/juju/python-libjuju) change - [x] Added [integration tests](https://github.com/juju/juju/tree/develop/tests) for the PR - [x] Added or updated [doc.go](https://discourse.jujucharms.com/t/readme-in-packages/451) related to packages changed - [x] Comments answer the question of why design decisions were made ## QA steps Run normal unit tests etc.

view details

Jujubot

commit sha 7fd396c4b6acb3a22769c6f4082000defde76402

Increment juju to 2.9-rc1

view details

Ian Booth

commit sha e275a8015dc1e5c440db1996939db87e63a07cc1

Merge pull request #12146 from jujubot/increment-to-2.9-rc1 Increment juju to 2.9-rc1

view details

Juju bot

commit sha e12634ca7ce5bcf79a157225e1916d3776e6001c

Merge pull request #12137 from benhoyt/tests-backup https://github.com/juju/juju/pull/12137 We don't have any CI tests for the new stand-alone [`juju-restore`](https://github.com/juju/juju-restore) tool, and our current backup/restore tests are Python acceptance tests. This PR adds a basic "sanity check" test for `juju create-backup`, as well as a basic end-to-end test of `juju-restore`.

view details

Joseph Phillips

commit sha 8d949208748019bbf10718a417ff16a0c5f52a8d

Removes logic to set link-layer devices and addresses via instance info and removes method SetParentLinkLayerDevicesBeforeTheirChildren. This is only populated in StartInstanceResult by MAAS, which is leading to later issues updating link-layer device provider IDs. It is not actually required - MAAS works fine if setting link-layer data is left to the machiner and instance-poller.

view details

Joseph Phillips

commit sha 8118643a09c007d21efe42ae661ba7cfd1afd05f

Explicitly sets link-layer data for uniter facade tests instead of relying on SetInstanceInfo, which no longer does this. SetLinkLayerDevices is now deprecated. Validation of input is removed to ease test composition, and tests of the validations are removed.

view details

push time in 13 days

pull request commentjuju/juju

Basic backup and juju-restore bash tests

$$merge$$

benhoyt

comment created time in 16 days

pull request commentjuju/juju

Basic backup and juju-restore bash tests

!!build!!

benhoyt

comment created time in 16 days

push eventbenhoyt/juju

Heather Lanigan

commit sha 8d281d6c56082644f2d2e11c99e57a7f115198c0

Remove insertion of "latest" is no track specified.

view details

Heather Lanigan

commit sha 1a2238d5051a8dfcb6d54420f1680c1e378d7f7e

Ensure any charm saved to state is Normalized. Assists in calcuations later for charm refresh.

view details

Heather Lanigan

commit sha 1eaf9ed9433c043214ed4db33f24dade6c92670c

Update charmHubResolveOrigin, add logger. To mimic snap refresh channel behavior. If only Risk supplied, uses the current Track.

view details

Heather Lanigan

commit sha f5669fa7d2a948cbb2daf07bf0027dfcf680cc40

Split ParseChannel into ParseChannel and ParseChannelNormalize. In charm refresh we need to parse a channel but normalizing the data at that point breaks refresh functionality around empty tracks which are valid.

view details

Heather Lanigan

commit sha 73083b2ce62bebb42d860acadc3a1e39dc41bd85

Improve comments, add logger to Refreshed config setup. We cannot normalize the channel data when passing to the Refresher. Causes incorrect behavior as we cannot differentiate between the "latest" track and the current track being empty.

view details

Simon Richardson

commit sha 358ac9f083fe74ea1918eadb8911573b4491dc23

Rework run function for bash tests There is a tension between running tests and running linters. The fix previously worked great for linters, but failed hard for tests. This fixes both paths. We now have a run_linter command that turns out the ability to not have to fail hard when you encounter an error, but run will continue to do so.

view details

Simon Richardson

commit sha a970d29b49ee2af3a61891ef7d17522c7eba19eb

Handle pipefail correctly Allow pipefail to run for linters, but not for other tests. We need to correctly handle pipefail to ensure we have the correct modes for the tests. This happens because we have a tension between the expected output from the different running items. The real fix is to use the fact that the subshell can fail, but we don't want the subshell to bring down the parent shell. Correctly doing this is kinda tricky, but I believe this is working as expected now.

view details

Joseph Phillips

commit sha d356d1ce5d2a5f6646f3a9a80db7ce95b43d4a1d

Adds an index to the linklayerdevices collection to speed up common use case of accessing by model-uuid and/or machine-id.

view details

Juju bot

commit sha 82c72502ed073a536d00f6939f9182de3b284ec1

Merge pull request #12130 from SimonRichardson/fix-tests-runner-bash https://github.com/juju/juju/pull/12130 There is a tension between running tests and running linters. The fix previously worked great for linters, but failed hard for tests. This fixes both paths. We now have a run_linter command that turns out the ability to not have to fail hard when you encounter an error, but run will continue to do so. Allow pipefail to run for linters, but not for other tests. We need to correctly handle pipefail to ensure we have the correct modes for the tests. This happens because we have a tension between the expected output from the different running items. The real fix is to use the fact that the subshell can fail, but we don't want the subshell to bring down the parent shell. Correctly doing this is kinda tricky, but I believe this is working as expected now. ## QA Steps ```sh make static-analysis ``` ```sh cd tests && ./main.sh controller ```

view details

Joseph Phillips

commit sha 4481a46d6e7606e6cb807ff118acf7beb28c1613

Adds upgrade step for removing global provider ID records for link-layer devices, where those IDs are not currently used.

view details

Harry Pidcock

commit sha 1e2cc0d3b74846f80e8e3a10a9f690daf8a79d70

Make the juju-fake-init/pebble binary like juju.

view details

Juju bot

commit sha 022fca0c80d5166c206e6f1526ba2b27f163c913

Merge pull request #12136 from hpidcock/new-k8s https://github.com/juju/juju/pull/12136 ## Description This is to include the juju-fake-init/pebble binary in the juju k8s operator image. Eventually this will be replaced with the real binary, so this commit is only temporary for 2.9-beta1+ ## QA steps Build juju ## Documentation changes N/A ## Bug reference N/A

view details

Joseph Phillips

commit sha d6945c55a50c37752fb66da52c294e8f9afde156

Tightens the logic in the link-layer device ID upgrade step so that we use a set for the referenced provider IDs and the regex used to identify deletion candidates is more specific. The test also verifies that we do not delete IDs that are not for link-layer devices.

view details

Joseph Phillips

commit sha 3f3532956368a4c03d7d66ab8f045a68545afa29

Tracks the delta for provider IDs in order to log number of deleted link-layer device IDs.

view details

Simon Richardson

commit sha 814e29085c402f116f05144b278e1e964b30a07b

Define a run linter Turns out the tension between run and run_linter was too great. This instead makes it more evident that the two should never be merged together as they require different things from the set modes. Some time should be used to potentially merge the run functions together with maybe a MODE envar, but for now we'll have duplicate functions so we can make any tweaks without breaking the abstractions.

view details

Simon Richardson

commit sha 91f338d0ed7fc2f6aa69fdd1ac23dbe11c46443d

Ensure we destroy the model It's to easy to keep the model up and running when using the reuse flag, ensuring that we remove the model when done.

view details

Simon Richardson

commit sha 60c965d753003f71278f67d519709a4e0ee1643b

Fix deploy test case The lxd profile can also include other values, so we need to make sure our grep can handle that.

view details

Joseph Phillips

commit sha edae4161728b3fbb698a77976516d2bc56b96614

Adds 2.8.6 to state upgrade steps for version list.

view details

Juju bot

commit sha 6a7f9c3e3d6b6b2304aa66c43eb4e4779a1d93d8

Merge pull request #12132 from manadart/2.8-unref-lld-provider-id https://github.com/juju/juju/pull/12132 It has been observed in older models the the `providerIDs` collection could end up with IDs registered for link-layer devices that were not actually against devices in the `linklayerdevices` collection. If the instance-poller attempts to set those IDs against devices, we get log messages saying that we cannot assign those IDs because they are already in use. This patch adds an upgrade step to remove unused link-layer device IDs from the global collection so that they can be used again, and the log output no longer occurs. ## QA steps - Bootstrap to MAAS with 2.8 and add a machine. - Connect to Mongo and add a global ID: ```javascript db.linklayerdevices.insertOne({ "_id" : "cd5b11f3-6534-4623-8127-53dc0ca0108d:linklayerdevice:GOOOOONE", "model-uuid" : "cd5b11f3-6534-4623-8127-53dc0ca0108d" }) ``` - Run the upgrade. - Check the collection and ensure that the inserted ID is gone and all others remain. ## Documentation changes None. ## Bug reference Potentially https://bugs.launchpad.net/bugs/1898195

view details

Juju bot

commit sha 7060e42df1204af42a460c3f6d1666f2f5d93aed

Merge pull request #12138 from SimonRichardson/fix-bash-tests-part-deux https://github.com/juju/juju/pull/12138 Turns out the tension between run and run_linter was too great. This instead makes it more evident that the two should never be merged together as they require different things from the set modes. Some time should be used to potentially merge the run functions together with maybe a MODE envar, but for now, we'll have duplicate functions so we can make any tweaks without breaking the abstractions. ## QA steps This takes some time, but is worth testing... ```sh make go-install juju bootstrap lxd test --no-gui cd tests && ./main.sh -l test deploy ``` ```sh make static-analysis ```

view details

push time in 16 days

pull request commentjuju/juju

Basic backup and juju-restore bash tests

!!build!!

benhoyt

comment created time in 16 days

Pull request review commentjuju/juju

Basic backup and juju-restore bash tests

+run_basic_backup_create() {+    set -e  # TODO benhoyt: remove once "set +e" issue is fixed+    echo++    juju switch controller

Ah, I see what you mean by "ensure" now -- fixed, thanks.

benhoyt

comment created time in 16 days

PullRequestReviewEvent

push eventbenhoyt/juju

Ben Hoyt

commit sha 80197b2b2bbc1eb8898d2558ea25b4ba6955befa

Use ensure/destroy in run_basic_backup_create()

view details

push time in 16 days

Pull request review commentjuju/juju

Basic backup and juju-restore bash tests

+run_basic_backup_create() {+    set -e  # TODO benhoyt: remove once "set +e" issue is fixed+    echo++    juju switch controller+    juju create-backup --filename "${TEST_DIR}/basic_backup.tar.gz"++    # Do some basic sanity checks on what's inside the backup+    tar xf "${TEST_DIR}/basic_backup.tar.gz" -C "${TEST_DIR}"+    echo "checking metadata.json is present"+    test -s "${TEST_DIR}/juju-backup/metadata.json"+    echo "checking root.tar is present"+    test -s "${TEST_DIR}/juju-backup/root.tar"+    echo "checking oplog.bson is present"+    test -s "${TEST_DIR}/juju-backup/dump/oplog.bson"+}++run_basic_backup_restore() {+    set -e  # TODO benhoyt: remove once "set +e" issue is fixed+    echo++    wget -O "${TEST_DIR}/juju-restore" https://github.com/juju/juju-restore/releases/latest/download/juju-restore+    chmod +x "${TEST_DIR}/juju-restore"++    file="${TEST_DIR}/test-basic-backup-restore.log"++    ensure "test-basic-backup-restore" "${file}"++    echo "Deploy a workload (1 machine)"+    juju deploy cs:~jameinel/ubuntu-lite-7+    wait_for "ubuntu-lite" "$(idle_condition "ubuntu-lite")"+    juju status --format json | jq '.machines | length' | check 1++    echo "Create a backup"+    juju switch controller+    juju create-backup --filename "${TEST_DIR}/basic_backup.tar.gz"++    echo "Add another machine (after the backup)"+    juju switch test-basic-backup-restore+    juju add-unit ubuntu-lite+    juju status --format json | jq '.machines | length' | check 2++    echo "Restore the backup"+    juju switch controller+    juju scp "${TEST_DIR}/juju-restore" 0:+    juju scp "${TEST_DIR}/basic_backup.tar.gz" 0:+    juju ssh 0 ./juju-restore --yes basic_backup.tar.gz++    echo "Ensure there's only one machine (state before the backup)"

Added (lxd-only)

benhoyt

comment created time in 16 days

PullRequestReviewEvent
PullRequestReviewEvent

Pull request review commentjuju/juju

Basic backup and juju-restore bash tests

+run_basic_backup_create() {+    set -e  # TODO benhoyt: remove once "set +e" issue is fixed+    echo++    juju switch controller

Yes - clarified with comment. Not sure why I would use "ensure" here?

benhoyt

comment created time in 16 days

push eventbenhoyt/juju

Ben Hoyt

commit sha 9f00c22c6d2d339319c1db0a0549e8f6c967104b

Add test that both instances are still running (lxd only) Remove "set -e", presuming that this fix will be merged: https://github.com/juju/juju/pull/12140

view details

push time in 16 days

PullRequestReviewEvent

startedhashicorp/waypoint

started time in 16 days

PR opened juju/juju

Basic backup and juju-restore bash tests

We don't have any CI tests for the new stand-alone juju-restore tool, and our current backup/restore tests are Python acceptance tests. This PR adds a basic "sanity check" test for juju create-backup, as well as a basic end-to-end test of juju-restore.

+99 -7

0 comment

4 changed files

pr created time in 17 days

create barnchbenhoyt/juju

branch : tests-backup

created branch time in 17 days

push eventbenhoyt/juju

Ben Hoyt

commit sha 5723dcab7466351bc47c2f8a245000cc21433640

vsphere: Improve createImportSpec logging, sprinkle trace logging

view details

Ian Booth

commit sha cedb6c7afaccac975d1d3af49214f882acf4da28

k8s pod primary service account can have > 1 role

view details

Ben Hoyt

commit sha 08d3e355d7a31df95efd7582e158543180c67e53

Put createImportSpec spec.Error(s) on multiple lines

view details

Juju bot

commit sha 793a6429022ebc6847a412b54369edc2bc5ebd47

Merge pull request #12049 from wallyworld/k8s-sa-roles https://github.com/juju/juju/pull/12049 ## Description of change We were restricting the primary k8s service account for a workload pod to only have one role. This PR removes that restriction. The common validation code is moved so that it is shared between the primary service account struct and the additional service account struct, ie ServiceAccountSpecV3 Also, setting the primary service account name no longer sets the role name - the user can specify their own or it defaults to the service account name. ie the same behaviour as for additional service accounts. ## QA steps Deploy a k8s charm with a primary service account with > 1 role like in the bug. Use kubectl to check the roles and role bindings. ## Bug reference https://bugs.launchpad.net/juju/+bug/1896076

view details

Juju bot

commit sha 602dbc79f0fe84685ae5fa84d90cdbe318706c9c

Merge pull request #12050 from benhoyt/vsphere-better-logging https://github.com/juju/juju/pull/12050 ### Checklist - [ ] Checked if it 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.jujucharms.com/t/readme-in-packages/451) related to packages changed? - [x] Do comments answer the question of why design decisions were made? ---- ## Description of change Improved the debug logging for `createImportSpec`, which may have helped us debug https://bugs.launchpad.net/juju/+bug/1895815 a bit more quickly. Also sprinkle a few more trace logs of vSphere client methods. I did a proof of concept locally of trace-logging *all* vSphere API requests and responses, but it's a **huge** amount of data, screeds of XML. Plus, the govmomi library we're using only has a global debug logging hook (`debug.SetProvider` is a global function instead of per client). So I decided to just tweak and improve what we have. ## QA steps Deploy to a vSphere cluster with TRACE-level logging turned on for the vsphere provider, for example: ```sh $ juju bootstrap vsphere vs --config datastore=datastore1 --show-log \n --logging-config="<root>=DEBUG;juju.provider.vmware=TRACE" ``` ## Documentation changes N/A ## Bug reference Related to: https://bugs.launchpad.net/juju/+bug/1895815

view details

Heather Lanigan

commit sha 1e93ff8587f33c983c20ea809be9a57c4ec91fca

fix typo in comments

view details

Heather Lanigan

commit sha a87cefaa4cd2854a5b125cb4c42209e87fa22ca0

Refactor loop. Make a new method to check for restart in the middle of install. Move canApplyCharmProfile to be determined independing of restart during install.

view details

Heather Lanigan

commit sha 21efb5d07838a1650307c019d74d22439b1735fd

Check for pending charm upgrades when starting loop. To fix lp:1895040.

view details

Juju bot

commit sha 21072f0adc9c1c10f6894535dceab1fc1050bfdf

Merge pull request #12062 from hmlanigan/bug-1895040 https://github.com/juju/juju/pull/12062 ## Description of change During SetCharm, if there are new peer relations, they are added to the relation collection at the same time as the new charm URL is updated in the applications collection. There is a race between these two events reaching the unit to be handled. If the new peer relation is received, or acted upon, before the upgrade charm event, the unit will start an error loop. The peer relation isn't found in the local copy read from disk of the charm's metadata.yaml. Upgrade charm is usually done when there is a lull in charm activity. To not drastically change behavior, check to see if upgrade charm is in the queue when the uniter loop starts up. If so run upgrade charm before continuing. Other conditions for running upgrade-charm are: one is not already in progress, the unit has been started. The verifyCharmProfileResolver cannot be used here as it creates an import circle. ## QA steps ```console # run twice, once with an lxdprofile and once without. # setup charms for test $ cd /tmp $ charm pull cs:~jameinel/ubuntu-lite-7 $ charm pull cs:~jameinel/ubuntu-lite # Add the following text to the end of /tmp/ubuntu-lite-7/metadata.yaml peers: peer: interface: ubuntu-peer # $ juju bootstrap localhost testme $ juju deploy -n 5 /tmp/ubutu-lite # wait for units to be up and running $ juju upgrade-charm --path /tmp/ubutu-lite-7 ubuntu-lite ``` Run these steps on a prior version of 2.8, see the error, upgrade to this patch, the error should resolve. Run charm upgrade with other charms, there should be no change in current behavior. ## Bug reference https://bugs.launchpad.net/juju/+bug/1895040

view details

Achilleas Anagnostopoulos

commit sha 7cceaca9f7b873a6f6b035bc90cda024f8e366f9

Include Amazon VPC linux instances when fetching spot prices Prior to this commit, only a "Linux/UNIX" filter was passed. As a result, the query did not return the spot prices for some of the cheaper tX and mX instances causing juju to select more expensive instance types like c5n.large for controllers and workloads (us-east-1) instead of something like m3.large. Adding the "Linux/UNIX (Amazon VPC)" as an extra filter seems to resolve the problem. For more info on supported product descriptions see: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeSpotPriceHistory.html

view details

Achilleas Anagnostopoulos

commit sha c2bd775a45071ddf76db93253d14a26ad72777e4

Simplify ec2 instance type query code by removing un-needed defer block

view details

Juju bot

commit sha 1f31cbbd25c3d0116ce23e35f9d5f03d5aa2ebf0

Merge pull request #12066 from achilleasa/2.8-backport-relaxed-filtering-constraints-for-ec2-cost-calculations https://github.com/juju/juju/pull/12066 ## Description of change This PR backports the relaxed filtering constraints when fetching the costs of ec2 spot instances from #12061 to 2.8

view details

Joseph Phillips

commit sha 26d85cb05f806ebcf401c3f29ae3a3c0fa9fc761

Ensures that when converting address from NetworkInfo in order to get scopes for address sorting, we use unknown scope instead of local-cloud so that scope derivations will cause public addresses to appear first in sorted results.

view details

Joseph Phillips

commit sha 825e24c8d1791bcc0ad31d8e8c95eda33eca4681

Updates addresses used in network info tests so that test addresses where we assert a local-cloud scope are really local-cloud addresses according the relevant rfc.

view details

Heather Lanigan

commit sha 42d7575995dfc7305ffab9f66aa4f4749545a0c3

Move rebootDetected determination inside of uniter restart loop. Fixes LP:1897743. rebootDetected should be dermined for each time NewUniterResolver is called. Not all restarts are a reboot. Update the uniter tests to mimic the behavior of rebootDetected when the uniter is restarted within the test, but no reboot is intended. One of the tests intends a reboot.

view details

Heather Lanigan

commit sha c934e3abe05bb1b0fb321e4518085f2207141e4f

When calculating updateOps, only 1 op per space doc is necessary.

view details

Juju bot

commit sha c6b3c31097cc56f493c75f408707b59799965af8

Merge pull request #12073 from hmlanigan/only-one-op-per-space https://github.com/juju/juju/pull/12073 ## Description of change While helping to debug an upgrade-charm failure due to txn issues, found that there were 12 ops to verify the alpha space doc with the openstack-dashboard charm. Only need 1. ## QA steps ```console # bootstrap and deploy the charm, chosen for the endpoints, $ juju bootstrap guimaas testme $ juju deploy openstack-dashboard $ juju bind openstack-dashboard ha=default public=default website=default cluster=default # helpful to find the txn db.txns.find({'s': 6}).sort({'_id': -1}).pretty(), latest successful txn on top. # look at the bind txn in the db, should have only 1 of: { "c" : "spaces", "d" : "<model-uuid>6:1", "a" : "d+" }, ```

view details

Thomas Miller

commit sha 39a675734f112eb7cf25163b319ad8201fea3c4b

Fixes file set ordering bug for caas spec v2 container spec file set ordering is non deterministic because of go maps unmarshalling. This make us generate different kubernetes volume specs for v2 deployments potentially. See lp:1895598 This change introduces into the v2 -> v3 conversion a deterministic ordering on the map keys using string.Sort()

view details

Juju bot

commit sha 496a6512f578cb1bf10c71890d8817f2e0e1b5a1

Merge pull request #12070 from tlm/lp-1895598-k8s-rotation https://github.com/juju/juju/pull/12070 ### Checklist - [x] Checked if it requires a [pylibjuju](https://github.com/juju/python-libjuju) change? - [x] Added [integration tests](https://github.com/juju/juju/tree/develop/tests) for the PR? - [x] Added or updated [doc.go](https://discourse.jujucharms.com/t/readme-in-packages/451) related to packages changed? - [x] Do comments answer the question of why design decisions were made? ---- ## Description of change Fixes file set ordering bug for caas spec v2 container spec file set ordering is non deterministic because of go maps unmarshalling. This make us generate different kubernetes volume specs for v2 deployments potentially. See lp:1895598 This change introduces into the v2 -> v3 conversion a deterministic ordering on the map keys using string.Sort() ## QA steps See unit test changes. They reliably failed every so often due to unpacking. ## Bug reference https://bugs.launchpad.net/juju/+bug/1895598

view details

Juju bot

commit sha eeb74a22503f2159da813d8a99931c65d48a6ca6

Merge pull request #12069 from hmlanigan/bug-1897743 https://github.com/juju/juju/pull/12069 ## Description of change RebootDetected needs to be determined each time the Uniter loop is started, rather than when the worker is started. This allows for correct uniter restarts which are not worker restarts, such as during a charm upgrade. ## QA steps Run the QA steps in #11887, to ensure no change. ```console $ juju bootstrap lxd testme $ juju deploy keystone-315 Located charm "cs:keystone-315". Deploying charm "cs:keystone-315". # wait for idle, will be blocked with missing relations # $ juju show-status-log keystone/0 Time Type Status Message ... 30 Sep 2020 15:57:57Z juju-unit executing running start hook 30 Sep 2020 15:57:58Z workload blocked Missing relations: database, Allowed_units list provided but this unit not present 30 Sep 2020 15:57:58Z juju-unit idle # upgrade the charm $ juju upgrade-charm keystone Looking up metadata for charm cs:keystone (channel: stable) Added charm "cs:keystone-317" to the model. ... # watch for "upgrade-charm" hook to be run, not "start" hook $ juju show-status-log keystone/0 Time Type Status Message ... 30 Sep 2020 15:57:57Z juju-unit executing running start hook 30 Sep 2020 15:57:58Z workload blocked Missing relations: database, Allowed_units list provided but this unit not present 30 Sep 2020 15:57:58Z juju-unit idle 30 Sep 2020 15:58:39Z juju-unit executing running upgrade-charm hook ... ``` ## Bug reference https://bugs.launchpad.net/juju/+bug/1897743

view details

push time in 17 days

push eventbenhoyt/juju

Heather Lanigan

commit sha ee49bfa548593a7d636ce8ddd8c3ccb776566adb

Add contains-charms to result. It's a field for bundle types.

view details

Heather Lanigan

commit sha 7b88767b6e82c0fdb5ca688629f9718eefcd5fd3

Update bundle charm info to be name and package-id. Only print the name in the info output. Package-id may be used later to deploy bundles.

view details

Joseph Phillips

commit sha 5c770a48b628be58858afe648b61fa8ceaac2f9c

Annotates error return from AllLinkLayerDevices instead of hiding it.

view details

Juju bot

commit sha 98dea41af1aaae4102da3b6e96d8fb35767cd0a0

Merge pull request #12119 from manadart/2.8-all-lld-error https://github.com/juju/juju/pull/12119 This exact error was surfaced in-theatre, but of course the cause was hidden by using Errorf. Annotating the error instead will surface the root cause.

view details

Kelvin Liu

commit sha a28e8419c2e9d3cb3b28e369a09191f06b961125

Generate uniter params via copying rather than referencing from template;

view details

Juju bot

commit sha c894b3ff48f1f42b16cb90db921dd2ca36c35da6

Merge pull request #12120 from ycliuhw/fix/caas-uniter-tag-mismatch https://github.com/juju/juju/pull/12120 *Generate the CAAS uniter params via copying rather than referencing from the template params to fix below issues* ```text # unit tag mismatching; application-mariadb-k8s: 11:55:22 ERROR juju.worker.caasoperator exited "mariadb-k8s/31": executing operation "install local:kubernetes/mariadb-k8s-0": cannot install charm: cannot extract "lib/netaddr/ip/ipv4-address-space.xml": open /var/lib/juju/agents/unit-mariadb-k8s-29/charm/lib/netaddr/ip/ipv4-address-space.xml: file exists ``` ## 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.jujucharms.com/t/readme-in-packages/451) related to packages changed~ - [x] Comments answer the question of why design decisions were made ## QA steps deploy CAAS workload and scale the app to a large number of pods, then watch the debug log to see if there are any errors. ```console $ juju deploy /tmp/charm-builds/mariadb-k8s --resource mysql_image=ycliuhw/mariadb $ juju scale-application mariadb-k8s -m t1 50 $ juju debug-log -m k1:t1 --color --replay --level WARNING ``` ## Documentation changes No ## Bug reference https://bugs.launchpad.net/juju/+bug/1898792

view details

Ian Booth

commit sha 11dcb87d84ae3850964f3a4351f1d2216bb70915

Merge branch '2.8' into merge-2.8-20201013

view details

Ben Hoyt

commit sha 190d7205db70c0d58143bfbc250bf5dfb959ee42

Add integration test for deploy --series

view details

Juju bot

commit sha 1de99a2188e36a6a24a8001c072d0a2d5740eebc

Merge pull request #12123 from wallyworld/merge-2.8-20201013 https://github.com/juju/juju/pull/12123 Merge 2.8 with #12119 annotate error return from AllInkLayerDevices() #12120 generate uniter params via copy ## QA steps See PRs

view details

Ben Hoyt

commit sha c500fc5d7c3829724a840999843fb25d80e5c1a2

Make test work even though set +e is on (will fix that separately)

view details

Ben Hoyt

commit sha 1239d1ebc15b2a474f9888905d78a08340645d24

Lint fix: add quotes around echo'd variable to avoid globbing issues

view details

Harry Pidcock

commit sha 172c510d7729139143470ce0be1170b76463ae3b

Fix pebble building and remove k8sagent image.

view details

Juju bot

commit sha 065bc53fe041249b082a9ec81db11336bdb7e796

Merge pull request #12126 from hpidcock/new-k8s https://github.com/juju/juju/pull/12126 Build the pebble inside the dockerfile for simplified CI. Drop building the k8sagent image and instead use the operator image for now. ## QA steps `make microk8s-operator-update` Then bootstrap k8s and deploy a v2 charm. ## Documentation changes N/A ## Bug reference N/A

view details

Ian Booth

commit sha 58a3e3f7c40d7a4855a24b78866ad5968add36c1

Add ec2 eu-south-1 and af-south-1 regions to public clouds yaml

view details

Ian Booth

commit sha d2db1621277a776a829cac4cf4515f99a24d5abc

Merge pull request #12125 from benhoyt/series-integration-test Add integration test for deploy --series

view details

Juju bot

commit sha 2f742b757b7d184e10174a0310e9bdcd881eaee3

Merge pull request #12124 from wallyworld/missing-ec2-regions https://github.com/juju/juju/pull/12124 Back in April an update was done to the published public clouds but not included in the juju source. This PR fixes that. ## QA steps juju show-cloud aws

view details

Thomas Miller

commit sha 290999a05d67d6b9355a0eaf7263b625ad97c718

Fix chicken and egg with model admission. This change introduces a fix for lp-1898718 where the model operator pods can't restart in kubernetes after because they rely on validation of their self

view details

Juju bot

commit sha bfc8c5fd6cbb91cd94ab37ae8c0e46e8f6bb325f

Merge pull request #12122 from tlm/lp-1898718-microk8s https://github.com/juju/juju/pull/12122 This change introduces a fix for lp-1898718 where the model operator pods can't restart in kubernetes after because they rely on validation of their self ## Checklist - [x] Requires a [pylibjuju](https://github.com/juju/python-libjuju) change - [x] Added [integration tests](https://github.com/juju/juju/tree/develop/tests) for the PR - [x] Added or updated [doc.go](https://discourse.jujucharms.com/t/readme-in-packages/451) related to packages changed - [x] Comments answer the question of why design decisions were made ## QA steps Acceptance test coming soon. ## Bug reference https://bugs.launchpad.net/juju/+bug/1898718

view details

Thomas Miller

commit sha 348328ab79c461fe82a774be2a048875e5211863

Merge remote-tracking branch 'juju/2.8' into 2.8-develop Conflicts: caas/kubernetes/provider/bootstrap.go caas/kubernetes/provider/bootstrap_test.go caas/kubernetes/provider/modeloperator.go

view details

Juju bot

commit sha b49b0530eaaeab28e57ebd5e300ac1ac60fe0ee1

Merge pull request #12127 from tlm/2.8-develop https://github.com/juju/juju/pull/12127 Merge 2.8 into develop. Conflicts: caas/kubernetes/provider/modeloperator.go caas/kubernetes/provider/bootstrap_test.go caas/kubernetes/provider/bootstrap.go

view details

push time in 17 days

issue commentgolang/go

proposal: os: add ReadDir method for lightweight directory reading

@rsc I don't know what you normally do for proposals like this, but is it worth updating the description at the top with the final proposal (including Type)? It would make it easier for people to see what the final proposal is at a glance, without wading through 100+ comments.

rsc

comment created time in 17 days

push eventbenhoyt/juju

Ben Hoyt

commit sha 1239d1ebc15b2a474f9888905d78a08340645d24

Lint fix: add quotes around echo'd variable to avoid globbing issues

view details

push time in 18 days

PR opened juju/juju

Add integration test for deploy --series

Added CI integration test for the deploy --series fix. Actual fix in https://github.com/juju/juju/pull/12121.

I've verified that this fails without the --series fix, and succeeds as expected with the fix.

Checklist

  • [ ] Requires a pylibjuju change
  • [x] Added integration tests for the PR
  • [ ] Added or updated doc.go related to packages changed
  • [ ] Comments answer the question of why design decisions were made

QA steps

cd tests
./main.sh deploy test_deploy_charms

Bug reference

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

+16 -0

0 comment

1 changed file

pr created time in 18 days

more