Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Merge 2.7 2020528 #11636

Merged
merged 20 commits into from May 28, 2020
Merged

Merge 2.7 2020528 #11636

merged 20 commits into from May 28, 2020

Conversation

wallyworld
Copy link
Member

Description of change

Merge 2.7 branch with these PRs

#11628 lift leading pinning API to be a member
#11620 remove machine series upgrade lock
#11630 migrating a model with old endpoint bindings confuses model import
#11633 upgrade step to rerun ReplaeSpacenameWithIDEndpointBindings
#11627 CMR relation remove

QA steps

See individual PRs.

SimonRichardson and others added 19 commits May 26, 2020 11:16
This is a VERY mechanical change, but is the embodyment of don't let
common functionality determine your Facade API[1].

The change from the outset is to allow the changes of the common
leadership pinning functionality methods, without having to change the
API. As in the future we want to expose methods from that package
without adding them to the Facade API.

Ensuring that this is the same API is done via the usage of
`make schema`, which will be different if any of the methods/params are
different.

 1. https://discourse.juju.is/t/common-facade-apis/3081
Considering that ReplaceAll is a alias for Replace with a default value
set for the tail argument (-1). We should fix this to allow building of
2.7 branch again.
…nning-api

juju#11628

## Description of change

This is a VERY mechanical change but is the embodiment of don't let
common functionality determine your Facade API[1].

The change from the outset is to allow the changes of the common
leadership pinning functionality methods, without having to change the
API. As in the future we want to expose methods from that package
without adding them to the Facade API.

Ensuring that this is the same API is done via the usage of
`make schema`, which will be different if any of the methods/params are
different.

 1. https://discourse.juju.is/t/common-facade-apis/3081

## QA steps

Rebuild the schema to ensure that there are no facade changes. 

```sh
make schema
git diff # is empty
```

## Bug reference

https://bugs.launchpad.net/juju/+bug/1879663
series upgrade lock, regardless of whether the machine is still in the
machines collection.
accomodate the fact that errors are now being traced.
…eseries-lock

juju#11620

## Description of change

This patch does 2 things:
- Prevents (non-forced) removal of a machine that is locked for series upgrade.
- Ensures that force removal always deletes any associated series upgrade locks.

## QA steps

- Bootstrap and add a Xenial machine.
- `juju upgrade-series 0 prepare bionic`.
- `juju remove-machine 0` fails due to the lock.
- `juju remove-machine 0 --force` succeeds.
- Connect to Mongo and check that the collection `machineUpgradeSeriesLocks` is empty.

## Documentation changes

None.

## Bug reference

https://bugs.launchpad.net/juju/+bug/1879663
juju#11630

## Description of change

There was a missing upgrade step when processing endpoint bindings coming from 2.6->2.7. The default binding was not added. This then confused the handling endpoint bindings when importing a model = a default space name was added where in some cases it should have been the id, depending on the import source.

This PR fixes the upgrade and also leaves in place extra logic to handle imports from broken models on controllers upgraded to 2.7.6 or earlier.

## QA steps

3 scenarios to check, all migrating a model to a 2.7 controller built off this PR
The model to be migrated has a single charm with at least one endpoint deployed

1. 2.6 controller
2. 2.6 controller upgraded to 2.7.6
3. 2.6 controller upgraded to 2.7 from this PR

In the latter case, you can also show-application prior to migrating to see that the default endpoint binding has been added when upgrading.

## Bug reference

https://bugs.launchpad.net/juju/+bug/1880797
juju#11633

## Description of change

Add a 2.7.7 upgrade step to re-run the 2.7.0 upgrade step ReplaceSpaceNameWithIDEndpointBindings.

The step has had a logic fix and needs to be run again when upgrading from 2.7.x.

## QA steps

bootstrap 2.6
deploy a charm
upgrade to 2.7.6
upgrade to this PR
check that there's a default endpoint binding "":0
Expose relation unit count.
Fix message when removing an offer with connections.
or the application is removed, as well as app status changes.
juju#11627

## Description of change

There's a few issues for CMR relations. The main one is the workers in the consuming model are stopped as soon as the relation dead event arrives, but there could still be a unit scope change event to arrive (different watchers are used). So ensure that the watchers are only stopped when all units have left scope. This is done by adding unit count to the relation-unit change event. Also, when a relation is suspended, only stop the watchers if the relation is alive, otherwise we might miss departing events.

Reduce the cmr worker restart delay to 15 seconds, as 1 minute seems too long (we want to avoid spamming when using cross controller calls hence it's not the standard 3 seconds).

We were also marking the saas status as terminated if the offering side had removed the relation, but this should only be done if the offer (or app) is removed. So add a new watcher to provide that information. Extra unit tests in various places were added also.

There's 3 commits:
- state changes
- apiserver changes
- cmr worker changes

## QA steps

```sh
juju bootstrap lxd
juju add-model database
juju deploy percona-cluster mysql --config min-cluster-size=3 -n 3
juju offer mysql:shared-db
juju switch default
juju deploy vault -n 3
juju consume database.mysql rmysql
juju relate rmysql vault
```

wait for things to settle, then 
juju remove-relation vault rmysql
The relation should be removed both consuming side and offering side.

Remove the offer.
The saas status on the consuming side should go to "terminated".

## Bug reference

https://bugs.launchpad.net/bugs/1879645
@wallyworld
Copy link
Member Author

$$merge$$

2 similar comments
@wallyworld
Copy link
Member Author

$$merge$$

@wallyworld
Copy link
Member Author

$$merge$$

@wallyworld
Copy link
Member Author

!!build!!

@wallyworld
Copy link
Member Author

$$merge$$

1 similar comment
@wallyworld
Copy link
Member Author

$$merge$$

@wallyworld
Copy link
Member Author

$$merge$$

@wallyworld
Copy link
Member Author

$$merge$$

@jujubot jujubot merged commit d05284c into juju:2.8-rc May 28, 2020
jujubot added a commit that referenced this pull request May 29, 2020
#11642

Forward Port:
- Increment juju to 2.8-rc3 #11603
- Version updated to 2.8.1 #11605
- 2.8 - Enhance state.Space -> network.SpaceInfo Conversion Performance #11606 
- Add an acceptance test for CharmRevisionUpdater instead of flakey "unit" test #11609
- 2.8 - Add GetByHardwareAddress to InterfaceInfos #11607
- CAASOperator tests race condition #11610
- Test speedup - fast insecure KeyProfile for testing #11616
- Remove JujuConnSuite from some api tests #11615
- [2.8] Enhance manual machine cleanup script #11618
- [2.8] All space infos backport #11622
- Multi-arch docker image build support #11623 
- 2.8 - Backport Uniter Test Race Fix #11625
- 2.8 - Use Up-To-Date Charm for Branches Integration Test #11626
- Lift leader pinning API to be a member #11628
- [2.8] Bindings constraints for space topology #11621
- Introduces centralised SNI tls getter. #11612
- Muxhttp server tests for worker #11629
- 2.7 - Remove Machine Series Upgrade Lock #11620
- Migrating a model from an old controller with incomplete endpoint bin… #11630
- Add support for bootstrapping to EKS; #11614
- Add 2.7.7 upgrade step to re-run ReplaceSpaceNameWithIDEndpointBindings #11633
- Ensure relation members in uniter data model are not nil #11634
- CMR relation remove #11627
- 2.8-rc Performance Enhancements Ported from 2.8 #11637
- Refactor leadership pinning API #11631
- Merge 2.7 2020528 #11636
- Port stickupkid/unpin machine applications on destroy #11641
- Merge 2.8-rc branch #11640
- Clean up more package level loggers. #11635

Conflicts:
- core/network/nic.go
- core/network/nic_test.go
- scripts/win-installer/setup.iss
- snap/snapcraft.yaml
- version/version.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants