JUJU_MODEL not being respected

Bug #1693356 reported by Jason Hobbs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Roger Peppe

Bug Description

I'm exporting JUJU_MODEL but juju seems to be ignoring it.

http://paste.ubuntu.com/24647512/

If I use -m to pass the model name in, everything works fine. Even juju status -m $JUJU_MODEL is working, so I know my model string is correct.

This is with 2.2-beta4-xenial-amd64

tags: added: cdo-qa cdo-qa-blocker
Revision history for this message
John A Meinel (jameinel) wrote :

I do see this in cmd/modelcmd/modelcommand.go:
func GetCurrentModel(store jujuclient.ClientStore) (string, error) {
    if model := os.Getenv(osenv.JujuModelEnvKey); model != "" {
        return model, nil
    }

    currentController, err := store.CurrentController()
...

but its the only place I see an actual reference to JujuModelEnvKey, so its possible some other refactoring broke this support.

Changed in juju:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Anastasia (anastasia-macmood) wrote :

Adding 'eda' tag - we should have a functional test(s) to detect that we do not break JUJU_MODEL.

tags: added: eda
John A Meinel (jameinel)
Changed in juju:
assignee: nobody → Roger Peppe (rogpeppe)
status: Triaged → In Progress
Revision history for this message
Anastasia (anastasia-macmood) wrote :

PR against develop (2.2): https://github.com/juju/juju/pull/7394

Changed in juju:
milestone: none → 2.2-rc1
Tim Penhey (thumper)
Changed in juju:
status: In Progress → Fix Committed
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.