Opt-out of switching when bootstrapping a controller or adding a model

Bug #1618234 reported by Casey Marshall
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Menno Finlay-Smits

Bug Description

When I bootstrap a controller or add a model on an existing controller, I'd like to be able to opt-out of automatically switching to the new model (or the new default model in the new controller).

This can be mitigated by manipulating environment variables, but when operating Juju like this -- from a script, typically -- I'd prefer to not have Juju switch at all, to avoid inadvertently performing actions on the wrong model elsewhere, or at least, to avoid confusing myself and potentially breaking things when using Juju interactively on the same system.

Tags: sts
Changed in juju:
status: New → Triaged
importance: Undecided → Wishlist
milestone: none → 2.0.0
Curtis Hovey (sinzui)
Changed in juju:
milestone: 2.0.0 → 2.0.1
Changed in juju:
milestone: 2.0.1 → none
Changed in juju:
milestone: none → 2.2.0
Changed in juju:
milestone: 2.2-beta1 → none
Revision history for this message
Trent Lloyd (lathiat) wrote :

Came to report this bug because models created by conjure-up are automatically switched to.

This seems to be a worse problem than the fact a user using "add-model" switches however I believe both behaviours are bad, as they are unexpected. This could be critical when real production environments are running on juju.

Ultimately it seems easy that this may lead to commands being accidentally run in the wrong juju environment, and I feel it should have a higher priority than currently triaged.

tags: added: sts
Changed in juju:
milestone: none → 2.2-beta3
assignee: nobody → Menno Smits (menno.smits)
importance: Wishlist → Medium
status: Triaged → In Progress
importance: Medium → High
Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :

This PR adds -S / --no-switch to `juju bootstrap` and `juju add-model`.

https://github.com/juju/juju/pull/7237

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.