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

Fix/upgrade-caas-model #11544

Merged
merged 11 commits into from May 8, 2020
Merged

Fix/upgrade-caas-model #11544

merged 11 commits into from May 8, 2020

Conversation

ycliuhw
Copy link
Member

@ycliuhw ycliuhw commented May 7, 2020

Please provide the following details to expedite Pull Request review:

Checklist

  • Checked if it requires a pylibjuju change?
  • Added integration tests for the PR?
  • Added or updated doc.go related to packages changed?
  • Do comments answer the question of why design decisions were made?

Description of change

This PR fixes a few issues on CAAS models upgrading from 2.7 to 2.8:

  • remove legacy charm dir symlink for units deployed before 2.8;
  • fix install hook failure caused by a Mongo assertion failed for the new field (upgrade-counter)in podSpecs collection;
  • enhance the process of init container upgrading from 2.7 to 2.8;

QA steps

  1. bootstrap to 2.7 and deploy some workload;
  2. upgrade controller then model to 2.8;
  3. monitor the upgrading process;

Documentation changes

None

Bug reference

https://bugs.launchpad.net/juju/+bug/1874506
https://bugs.launchpad.net/juju/+bug/1877025

version/version.go Outdated Show resolved Hide resolved
ycliuhw and others added 8 commits May 7, 2020 21:28
If the machine that you are trying to manually provision has the
2.8/edge juju snap installed, it introduces a snap service called
"snap.juju.fetch-oci". The code was just checking for "juju" in the
returned service list.

We now look for "jujud-machine" as a service name as any machine
that we sould look to provision over SSH would have a machine agent
set up if it was provisioned.
Tell k8s that the admission worker's webhook has no side effects
so that dry runs work.
A commit which was part of the 2.8 refactoring work messed up the
implementation of the handleReboot method. While the method would return
the correct error (ErrReboot or ErrRequeAndReboot), the actual reboot
request was never queued due to an early return logic bug.

This commit makes everything work again and includes additional checks
to prevent future regressions.
@ycliuhw ycliuhw force-pushed the fix/install-hook-failed branch 2 times, most recently from 9753164 to 0027f6c Compare May 8, 2020 04:36
@ycliuhw ycliuhw marked this pull request as ready for review May 8, 2020 04:53
@ycliuhw ycliuhw changed the title Fix/install hook failed Fix/upgrade-caas-model May 8, 2020
apiserver/facades/agent/uniter/uniter.go Outdated Show resolved Hide resolved
cmd/jujud/agent/caasunitinit.go Outdated Show resolved Hide resolved
worker/uniter/runner/context/context.go Outdated Show resolved Hide resolved
@ycliuhw
Copy link
Member Author

ycliuhw commented May 8, 2020

$$merge$$

1 similar comment
@ycliuhw
Copy link
Member Author

ycliuhw commented May 8, 2020

$$merge$$

@jujubot jujubot merged commit 645ee0d into juju:develop May 8, 2020
@ycliuhw ycliuhw deleted the fix/install-hook-failed branch May 8, 2020 07:35
@ycliuhw
Copy link
Member Author

ycliuhw commented May 11, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants