Compile fixes after juju-2.2.2 update #5

Merged
merged 7 commits into from Jul 28, 2017

Conversation

Projects
None yet
3 participants
Member

babbageclunk commented Jul 27, 2017

Follows on from #4.

Update dependencies needed by 2.2.2. This included juju/description, so there are then changes needed to the juju1 export code to match. juju/txn isn't compatible between juju1 and juju2, so I tweaked the juju2 code to work with the juju1-compatible version.

Updates baseClientCommand to use modelcmd.WrapCommand on advice from @rogpeppe.

Now builds and upgrade-agents is working again with macaroons from the target controller. verify-source is broken (new validation in juju/description that the juju1 export fails) but I'll fix that in a separate PR.

axw approved these changes Jul 28, 2017

babbageclunk added some commits Jul 26, 2017

Enable export for EC2-hosted environments
Required changing the joyent dependencies to match Juju 1.25 - the more
recent one doesn't accept a loggo.Logger. Also, import all of the
providers so they're registered correctly.
Update juju2 to 2.2.2 version
This includes some updated macaroon handling which we need.
Update dependencies needed to build updated juju2
Since the interface needed for github.com/juju/txn differs between juju1
and juju2, revert the juju2 changes that rely on it.

Doesn't build at this point - the juju1 export code is broken by the
description changes, and baseClientCommand is broken by changes to
modelcmd - but I wanted those changes to be in a separate
commit.
Add changes to the juju2 code needed get API connection info
CommandBase.GetControllerAPIInfo and api.ConnectionInfo were originally
added in 343c23c, but were overwritten by upgrading juju2 to 2.2.2.

Also change baseClientCommand to match changes in juju2/cmd/modelcmd.

Now builds, but running upgrade-agents panics because
ControllerCommandBase.ControllerName() shouldn't be called before
calling .Run.
Update baseClientCommand to use new modelcmd features
These are needed to get the macaroons to open a connection to the target
controller from the remote command.

upgrade-agents now gets to where it used to - gets macaroon from the
target controller and sends it to the remote command, which can use it
to download the binaries and unpack them.

@wallyworld wallyworld merged commit 00f17b9 into juju:master Jul 28, 2017

@babbageclunk babbageclunk deleted the babbageclunk:juju2-compile-fixes branch Jul 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment