juju_exe() fails to parse JUJU_VERSION

Bug #1701249 reported by Junien F
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Juju Wait Plugin
New
Undecided
Unassigned
Mojo: Continuous Delivery for Juju
Triaged
Medium
Unassigned

Bug Description

Hi,

If you run mojo with the JUJU_VERSION environment variable set to "latest-1.25.x", mojo will try to run the "juju-latest" executable, which doesn't exist.

This is because juju_exe() (in mojo/juju/wait.py) is bugged, and is expecting JUJU_VERSION to have a proper formatting.

Not sure why this exists and why mojo doesn't simply use juju from PATH.

At any rate, this error should be caught up and displayed more appropriately, because right now, here's what's displayed :

2017-06-29 12:10:29 [INFO] Waiting for environment to reach steady state
2017-06-29 12:10:29 [ERROR] juju-latest status --format=json failed: 2
2017-06-29 12:10:29 [ERROR] Juju Status: environment: my-super-env
machines:
[juju status follows]
2017-06-29 12:10:29 [ERROR] 2

Not easy to understand what's going on :)

Thanks

Revision history for this message
William Grant (wgrant) wrote :

(2 is ENOENT here, not actually the exit code of the process.)

Revision history for this message
Stuart Bishop (stub) wrote :

JUJU_VERSION was added to support Openstack workflows. AFAIK it isn't anything official, so there is no definition of 'proper formatting' except for what works for the Openstack Charmers (because they got here first).

Does juju-wait need to cope with weird JUJU_VERSION's, or make using JUJU_VERSION opt in? Or is the fix simply to emit the juju executable to be used and why so 'bogus' JUJU_VERSION settings can be fixed?

Changed in juju-wait:
status: New → Incomplete
Revision history for this message
Junien F (axino) wrote :

mojo should tell the operator that it tried to run juju-latest because of JUJU_VERSION, and should advise the operator to fix or unset this variable.

Changed in juju-wait:
status: Incomplete → New
Changed in mojo:
status: New → Invalid
status: Invalid → Triaged
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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