New juju in ubuntu

Stuart Bishop stuart.bishop at canonical.com
Thu Apr 7 09:17:14 UTC 2016


On 7 April 2016 at 16:03, roger peppe <roger.peppe at canonical.com> wrote:
> On 7 April 2016 at 09:38, Tim Penhey <tim.penhey at canonical.com> wrote:
>> We could probably set an environment variable for the plugin called
>> JUJU_BIN that is the juju that invoked it.
>>
>> Wouldn't be too hard.
>
> How does that stop old plugins failing because the new juju is trying
> to use them?
>
> An alternative possibility: name all new plugins with the prefix "juju2-" rather
> than "juju".

I've opened https://bugs.launchpad.net/juju-core/+bug/1567296 to track this.

Prepending the $PATH is not hard either - just override the
environment in the exec() call.

The nicest approach may be to not use 'juju1', 'juju2' and 'juju' but
instead just 'juju'. It would be a thin wrapper that sets the $PATH
and invokes the correct binary based on some configuration such as an
environment variable. This would fix plugins, and lots of other stuff
that are about to break too such as deployment scripts, test suites
etc.

-- 
Stuart Bishop <stuart.bishop at canonical.com>



More information about the Juju-dev mailing list