juju controllers show wrong model name

Bug #1878744 reported by Joe Guo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

In one of our clouds, `juju controllers` shows a model `k8s-dev-env-02`:

juju controllers
Use --refresh option with this command to see the latest information.

Controller Model User Access Cloud/Region Models Nodes HA Version
foundation-openstack-k8s k8s-dev-env-02 admin superuser openstack_cloud/wgs-wnd-01 4 29 3 2.7.5
foundations-maas* openstack admin superuser maas_cloud/default 3 88 3 2.7.4

However, that model name doesn't exist in controller:

juju models -c foundation-openstack-k8s
Controller: foundation-openstack-k8s

Model Cloud/Region Type Status Machines Cores Units Access Last connection
controller openstack_cloud/wgs-wnd-01 openstack available 3 12 - admin just now
default openstack_cloud/wgs-wnd-01 openstack available 0 - - admin 2020-05-13
k8s-dev-env-01 openstack_cloud/wgs-wnd-01 openstack available 21 88 150 admin 19 minutes ago
lma openstack_cloud/wgs-wnd-01 openstack available 5 33 20 admin 2020-05-13

The actual model name here is `k8s-dev-env-01`, not `k8s-dev-env-02`.

I don't know how to reproduce this yet, bug created to track this issue.

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 1878744] [NEW] juju controllers show wrong model name

Did you try with '--refresh' for it to actually connect to the controller
and not just report what it knows from the local cache?

On Fri, May 15, 2020 at 8:40 AM Joe Guo <email address hidden> wrote:

> Public bug reported:
>
> In one of our clouds, `juju controllers` shows a model `k8s-dev-env-02`:
>
> juju controllers
> Use --refresh option with this command to see the latest information.
>
> Controller Model User Access Cloud/Region
> Models Nodes HA Version
> foundation-openstack-k8s k8s-dev-env-02 admin superuser
> openstack_cloud/wgs-wnd-01 4 29 3 2.7.5
> foundations-maas* openstack admin superuser
> maas_cloud/default 3 88 3 2.7.4
>
> However, that model name doesn't exist in controller:
>
> juju models -c foundation-openstack-k8s
> Controller: foundation-openstack-k8s
>
> Model Cloud/Region Type Status
> Machines Cores Units Access Last connection
> controller openstack_cloud/wgs-wnd-01 openstack available
> 3 12 - admin just now
> default openstack_cloud/wgs-wnd-01 openstack available
> 0 - - admin 2020-05-13
> k8s-dev-env-01 openstack_cloud/wgs-wnd-01 openstack available
> 21 88 150 admin 19 minutes ago
> lma openstack_cloud/wgs-wnd-01 openstack available
> 5 33 20 admin 2020-05-13
>
>
> The actual model name here is `k8s-dev-env-01`, not `k8s-dev-env-02`.
>
> I don't know how to reproduce this yet, bug created to track this issue.
>
> ** Affects: juju
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to juju.
> Matching subscriptions: juju bugs
> https://bugs.launchpad.net/bugs/1878744
>
> Title:
> juju controllers show wrong model name
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1878744/+subscriptions
>

Revision history for this message
Pen Gale (pengale) wrote :

Locally, juju keeps a file called ~/.local/share/juju/models.yaml, which has a list of controllers, the current model for each controller, and other models on that controller.

If you created a model, then removed it, but didn't switch over to another model on that controller, that local file may not have been updated.

I'm going to say that this is legitimately a bug -- that local file shouldn't get out of date. But it won't hurt anything. That dead model isn't sitting in a database somewhere.

I reproduced the issue w/ the following steps on my local lxd cloud:

    juju add-model test-foo localhost
    juju controllers # I see test-foo as the current model
    juju destroy-model test-foo
    juju controllers # I still see test-foo as the current model

Changed in juju:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

tags: added: expirebugs-bot
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.