-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.2 force upgrade #7958
2.2 force upgrade #7958
Conversation
At the State level, allow a force flag that ignores the agent-version check. Expose this with a direct client that can trigger an upgrade to any version you want.
Rename 'force-upgrade' to 'juju-force-upgrade'. Expose a new value in the API that allows us to pass Force through to the state code.
Change the flag from 'force' to 'ignore-agent-versions' because it is more descriptive about what we're actually doing with the flag. And we don't actually let you force things like models newer than controller, etc.
As a drive-by, can you confirm the model version check is accurate? I saw a failure comparing versions with rc in it for instance.. (Basically, can you add a test for versions with strings in them and confirm) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great overall \o/
Thank you for a nice doc string explaining the parameter and awesome QA steps on the PR!
I'd love to see the best facade check in CLI.
Also are you sure you don't want to bump a facade version? You have after all changed an input type...
Leaner api layer tests is just a wish but it would be nice if we started cleaning them up as we go rather than fixing & modifying existing full-stack, heavy tests....
@@ -363,7 +369,8 @@ func (c *upgradeJujuCommand) Run(ctx *cmd.Context) (err error) { | |||
return block.ProcessBlockedError(err, block.BlockChange) | |||
} | |||
} | |||
if err := client.SetModelAgentVersion(context.chosen); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any specific reasons why you did not want to use BestFacadeVersion check to determine which call to make?
@@ -527,7 +527,7 @@ func (s *clientSuite) TestSetModelAgentVersionDuringUpgrade(c *gc.C) { | |||
_, err = s.State.EnsureUpgradeInfo(machine.Id(), agentVersion, nextVersion) | |||
c.Assert(err, jc.ErrorIsNil) | |||
|
|||
err = s.APIState.Client().SetModelAgentVersion(nextVersion) | |||
err = s.APIState.Client().SetModelAgentVersion(nextVersion, false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate that this is an old, full-stack test. It'd be great to make it leaner \o/ Especially since the only thing we'd want to check here is that all the parameters are passed in.
@jameinel 2.2.6 is going right now -- can we ship this? |
$$merge$$
…On Wed, Oct 25, 2017 at 7:23 PM, nskaggs ***@***.***> wrote:
@jameinel <https://github.com/jameinel> 2.2.6 is going right now -- can
we ship this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7958 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAMYfUqoT3Qg7uLZS6G8guAzn7zaiDMXks5sv1JegaJpZM4QEkSh>
.
|
Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju |
@pmatulis This needs documented. It shipped in 2.2.6. It's kind of a get of a jail card, if a model is really broken, this can let you fix it. Not sure how we want to highlight it, or the extent to which we do. |
@jameinel
|
This is valid for both controller and non controller models. You can still only upgrade non-controller models to agents that are <= the controller agent version. The 'juju-force-upgrade' command exists to trigger the same upgrade (still checks versions, still ensures controllers are higher version than individual models, just ignores agent version skew). It Once 2.2.6+ is prevalent enough, I would expect juju-force-upgrade to be deprecated and retired. |
|
1. As an example: If you did "juju bootstrap --agent-version=2.1.0" and
then "juju upgrade-juju --agent-version=2.1.1", and some of the agents were
down, they will be flagged inside the controller as still being 2.1.0. Thus
when you try to do "juju upgrade-juju --agent-version 2.1.2" we will
refuse, because not all the agents are reporting 2.1.1. The "juju
upgrade-juju --ignore-agent-versions" is a way to do the upgrade anyway.
(the original check is still in place, because if those are not at 2.1.1
simply because they haven't caught up yet, it is reasonable to wait for
them.)
2. scripts/juju-force-upgrade should be the source tree for it. If you did
"go install github.com/juju/juju/..." then it will be in $GOPATH/bin. I
don't know how Nicholas is packaging things as to whether it will be
generally released and available, or whether it is just a
build-from-source-when-you-need-it.
3. If you are running a 2.2.6+ controller, then you can use "juju
upgrade-juju --ignore-agent-versions" instead of using juju-force-upgrade.
If you are running say a 2.1 controller and want to upgrade *to* 2.2.6 then
you probably need "juju-force-upgrade" because the 2.1.X controller won't
accept the --ignore-agent-versions flag.
4. I do think it will be in 2.3 (I think it is there now). It was just a
case of landing the code in 2.2, and then merging from 2.2 into 2.3 and it
took a day or two for me to do the merge because we ended up having a merge
conflict. I *think* that should all be sorted out now, and the code for
juju-force-upgrade should be in 2.3-beta2, but its possible I missed
something there. (And I'm also not sure how Nicholas is planning on
publishing things.) One option is that we could just publish a snap of
juju-force-upgrade and make it accessible in that fashion.
…On Mon, Oct 30, 2017 at 3:29 AM, Peter Matulis ***@***.***> wrote:
@jameinel <https://github.com/jameinel>
1. So if some agents/machines are down/broken the user may end up with
version skew?
2. Where do I find juju-force-upgrade? I cannot find it.
3. What is the connection between the deprecation of juju-force-upgrade
and 2.2.6+?
4. Similar to the last question, why is juju-force-upgrade only in
2.2(.6) and not in 2.3?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7958 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAMYffOo5-qIaZODF-odmfOykLGIZihWks5sxQo-gaJpZM4QEkSh>
.
|
New question:
|
1. By default we refuse if there is any skew between any agent version and
what is flagged as "current". --ignore-agent-versions would allow you to
get into a heavily skewed view, but only for agents that are unable to
upgrade (which has always only actually happened when the agents aren't
actually running).
2. agreed
3. 2.2.6
4. sure
b1: Its whatever versions of Juju that we have published. There is 'juju
upgrade-juju --dry-run' which reports the version it would use, but I don't
believe we have a Juju command to expose what versions are available.
…On Tue, Oct 31, 2017 at 12:40 AM, Peter Matulis ***@***.***> wrote:
1. The upgrade will abort unless all agents are only 1 patch version
behind the targeted version. By overriding that we are getting users into a
position we don't want them to be in?
2. The docs will refrain from mentioning juju-force-upgrade until the
command is available for regular users.
3. What is the oldest version that supports the --ignore-agent-versions
flag?
4. Please let the docs team know what happens.
New question:
1. How does one discover what values for --agent-version can be used
(with bootstrap or upgrade-juju)?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7958 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAMYfeihIjfh4rSigK9UQNUH1ASm4bJFks5sxjRQgaJpZM4QEkSh>
.
|
|
Description of change
This addresses an issue that has come up a few times, where we are asking people to upgrade their Controller, but they are unable to because of some agents that aren't working properly.
It does 3 primary things:
QA steps
Documentation changes
The flag should be documented, along with when it is appropriate to use it.
Bug reference
lp:1726893