juju bootstrap older version: ERROR requested agent version major.minor mismatch

Bug #1708541 reported by Felipe Reyes
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Wishlist
Anastasia

Bug Description

For testing purposes and reproduce issues, it's common for our team to have the need of bootstrap an specific version of juju, the reasons may vary from test upgrade procedures for a specific environment to load a mongodump and try fix the database.

At the moment, some of us keep old versions (debian packages) in PPAs clearly marked as "unsupported and only for testing", but with the arrival of snaps we would like to have the ability to bootstrap older versions of juju with the latest client, so we just follow "latest/stable" in our machines and nothing else.

Another benefit is that this will allow us to detect any possible API incompatibilities between an old controller and a new client.

$ juju --version
2.2.2-zesty-amd64
$ juju bootstrap --agent-version 2.0.2 lxd
ERROR requested agent version major.minor mismatch
$ juju bootstrap --agent-version 2.1.3 lxd
ERROR requested agent version major.minor mismatch
$ juju bootstrap --agent-version 2.2.0 lxd
Creating Juju controller "localhost-localhost" on lxd/localhost
Looking for packaged Juju agent version 2.2.0 for amd64

Tags: sts
Revision history for this message
Andrew Wilkins (axwalk) wrote :

This is unviable without making significant changes to the way bootstrap works. The client code currently knows how to create the bootstrap instance, and works in concert with the exact same agent version on it.

We would need to either introduce cross-version compatibility between client/server bootstrap procedures (which I think would be too costly in terms of maintenance, and therefore a mistake); or we could split the client-side bootstrap code into a separate binary, and have the client fetch the appropriate version from streams.canonical.com. I think the latter would be very reasonable, and probably better than what we have today.

Marking this as Wishlist for now, since it's an improvement over an existing solution.

Changed in juju:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Felipe Reyes (freyes) wrote :

are you aware of any change in the boostrap procedure between 2.0 and 2.2?, I'm not implying there is not, I'm just not familiar with what the client does to bootstrap the controller and how often this changes.

Revision history for this message
Anastasia (anastasia-macmood) wrote :

For historical reasons, your local client can only bootstrap controller with the same major.minor versions.
In other words, 2.0 client can only bootstrap controllers using 2.0.x agents; 2.1 client can only bootstrap 2.1.x agents, etc.

I have updated the error message at bootstrap to be more explicit: https://github.com/juju/juju/pull/7911.

However, we have no intention of changing this behavior in the future. We want to avoid pitfalls where bootstrap may become incompatible between Juju versions.

Changed in juju:
status: Triaged → Fix Committed
assignee: nobody → Anastasia (anastasia-macmood)
milestone: none → 2.3-beta1
Revision history for this message
Anastasia (anastasia-macmood) wrote :

I have created a separate Wishlist item to deal with splitting of client-side bootstrap, bug # 1721443.

Revision history for this message
Felipe Reyes (freyes) wrote : Re: [Bug 1708541] Re: juju bootstrap older version: ERROR requested agent version major.minor mismatch

On Thu, Oct 05, 2017 at 04:53:38AM -0000, Anastasia wrote:
> For historical reasons, your local client can only bootstrap controller with the same major.minor versions.
> In other words, 2.0 client can only bootstrap controllers using 2.0.x agents; 2.1 client can only bootstrap 2.1.x agents, etc.
>
> I have updated the error message at bootstrap to be more explicit:
> https://github.com/juju/juju/pull/7911.
>
> However, we have no intention of changing this behavior in the future.
> We want to avoid pitfalls where bootstrap may become incompatible
> between Juju versions.

I understand this reasoning, but we need a method to bootstrap old versions when using snaps, currently with deb packages I keep around in different PPAs each release (2.0, 2.1, etc). If juju could keep a track for each major.minor would be great.

The only method we will have is to compile locally the version needed.

Changed in juju:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.