juju switch -l does not return list of env names

Bug #1250285 reported by Kapil Thangavelu
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Abel Deuring

Bug Description

Per the docs the -l parameter to juju switch should list env names, instead it has no zero effect on output when JUJU_ENV is set.

-l, --list (= false)
    list the environment names

kapil@realms-slicer:$ juju switch
Current environment: "local" (from JUJU_ENV)
kapil@realms-slice:$ juju switch -l
Current environment: "local" (from JUJU_ENV)
kapil@realms-slice:$ juju version
1.17.0-saucy-amd64

Clearing JUJU_ENV allows -l to work.

Tags: docs switch ui

Related branches

Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → 1.17.0
tags: added: docs switch ui
Revision history for this message
Kapil Thangavelu (hazmat) wrote : Re: [Bug 1250285] Re: juju switch -l does not return list of env names

re docs that's the inline cli docs for ref. ie juju switch -h

On Tue, Nov 12, 2013 at 10:05 AM, Curtis Hovey <email address hidden> wrote:

> ** Changed in: juju-core
> Status: New => Triaged
>
> ** Changed in: juju-core
> Importance: Undecided => High
>
> ** Changed in: juju-core
> Milestone: None => 1.17.0
>
> ** Tags added: docs switch ui
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1250285
>
> Title:
> juju switch -l does not return list of env names
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1250285/+subscriptions
>

Revision history for this message
Curtis Hovey (sinzui) wrote :

I cannot reproduce this issue with tip. Could this be a co-install issue?

curtis@retrograde:~$ juju switch
Current environment: "local"
curtis@retrograde:~$ $GOPATH/bin/juju switch -l
Current environment: "local"

Environments:
 jujustack
 local
 public-tools-canonistack
 public-tools-hp
 test-aws
 test-azure
 test-can

Changed in juju-core:
status: Triaged → Incomplete
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

try with a JUJU_HOME set (which i do because of encrypted home).

On Fri, Nov 15, 2013 at 10:27 AM, Curtis Hovey <email address hidden> wrote:

> I cannot reproduce this issue with tip. Could this be a co-install
> issue?
>
> curtis@retrograde:~$ juju switch
> Current environment: "local"
> curtis@retrograde:~$ $GOPATH/bin/juju switch -l
> Current environment: "local"
>
> Environments:
> jujustack
> local
> public-tools-canonistack
> public-tools-hp
> test-aws
> test-azure
> test-can
>
> ** Changed in: juju-core
> Status: Triaged => Incomplete
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1250285
>
> Title:
> juju switch -l does not return list of env names
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju-core/+bug/1250285/+subscriptions
>

Curtis Hovey (sinzui)
summary: - juju switch -l does not return list of env names
+ juju switch -l does not honour JUJU_HOME
Changed in juju-core:
status: Incomplete → Triaged
status: Triaged → Incomplete
Revision history for this message
Curtis Hovey (sinzui) wrote : Re: juju switch -l does not honour JUJU_HOME

JUJU_HOME is honoured for me using juju-core tip.

curtis@retrograde:~$ export JUJU_HOME=/home/curtis/Work/orangestack/
curtis@retrograde:~$ $GOPATH/bin/juju switch
Current environment: "staging"
curtis@retrograde:~$ $GOPATH/bin/juju switch -l
Current environment: "staging"

Environments:
 amazon
 azure
 hpcloud
 juju-gui-qa
 local
 maas
 orange
 staging
curtis@retrograde:~$ export JUJU_HOME=~/.juju
curtis@retrograde:~$ $GOPATH/bin/juju switch
Current environment: "local"
curtis@retrograde:~$ $GOPATH/bin/juju switch -l
Current environment: "local"

Environments:
 jujustack
 local
 public-tools-canonistack
 public-tools-hp
 test-aws
 test-azure
 test-canonistack
 test-hp

summary: - juju switch -l does not honour JUJU_HOME
+ juju switch -l does not return list of env names
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.17.0 → none
Revision history for this message
Kapil Thangavelu (hazmat) wrote :

The problem triggers on JUJU_ENV being set.

Revision history for this message
Kapil Thangavelu (hazmat) wrote :

kapil@realms-slice:~$ export JUJU_ENV=local
kapil@realms-slice:~$ juju switch -l
local
kapil@realms-slice:~$ unset JUJU_ENV
kapil@realms-slice:~$ juju switch -l
azure
canonistack
east
eu
hp
iaas-dev
iaas-stage
local
manual
openstack
public-cloud
southeast
training
west
kapil@realms-slice:~$

Changed in juju-core:
status: Incomplete → New
Curtis Hovey (sinzui)
Changed in juju-core:
status: New → Triaged
description: updated
Abel Deuring (adeuring)
Changed in juju-core:
assignee: nobody → Abel Deuring (adeuring)
status: Triaged → In Progress
Curtis Hovey (sinzui)
Changed in juju-core:
status: In Progress → Fix Committed
milestone: none → 1.17.3
Curtis Hovey (sinzui)
Changed in juju-core:
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.