Cannot upgrade Juju - ERROR target prechecks failed: model named "controller" already exists

Bug #2069162 reported by Nobuto Murata
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Snap
New
Undecided
Unassigned

Bug Description

I'm pretty sure this is a well known limitation but let me file it here explicitly.

To be clear, it affects all scenarios in the tutorials (single-node, local multi-node, and MAAS) since something is always deployed in the controller model.

https://juju.is/docs/juju/manage-models#heading--migrate-a-workload-model-to-another-controller
> A controller model cannot be migrated.

====

By following the (local) multi-node tutorial for example:
https://microstack.run/docs/multi-node

Juju cannot be upgraded even for a minor release update.

$ juju upgrade-model -m openstack --agent-version 3.5.1
ERROR cannot upgrade to a version "3.5.1" greater than that of the controller "3.4.3"

$ juju upgrade-controller --agent-version 3.5.1
ERROR cannot upgrade to "3.5.1" due to issues with these models:
"admin/controller":
- upgrading a controller to a newer major.minor version 3.5 not supported

$ juju controllers --refresh
Controller Model User Access Cloud/Region Models Nodes HA Version
sunbeam-controller admin/controller sunbeam-1.localdomain superuser 2 3 none 3.4.3
sunbeam-green-default* - admin superuser sunbeam-green/default 1 1 none 3.5.1

$ juju migrate sunbeam-controller:admin/controller sunbeam-green-default
ERROR cannot initiate migration as the users granted access to the model do not exist
on the destination controller. To resolve this issue you can add the following
users to the destination controller or remove them from the current model:
  - sunbeam-3.localdomain
  - sunbeam-1.localdomain
  - sunbeam-2.localdomain

$ juju add-user -c sunbeam-green-default sunbeam-1.localdomain
$ juju add-user -c sunbeam-green-default sunbeam-2.localdomain
$ juju add-user -c sunbeam-green-default sunbeam-3.localdomain

$ juju migrate sunbeam-controller:admin/controller sunbeam-green-default
ERROR target prechecks failed: model named "controller" already exists

$ juju models
Controller: sunbeam-controller

Model Cloud/Region Type Status Machines Cores Units Access Last connection
admin/controller* sunbeam/default manual available 3 48 13 admin just now
openstack sunbeam-microk8s/localhost kubernetes available 0 - 73 admin 3 minutes ago

$ juju status -m admin/controller
Model Controller Cloud/Region Version SLA Timestamp
controller sunbeam-controller sunbeam/default 3.4.3 unsupported 14:03:43Z

SAAS Status Store URL
cert-distributor active local sunbeam-1.localdomain/openstack.cert-distributor
certificate-authority active local sunbeam-1.localdomain/openstack.certificate-authority
cinder-ceph waiting local sunbeam-1.localdomain/openstack.cinder-ceph
keystone active local sunbeam-1.localdomain/openstack.keystone
nova active local sunbeam-1.localdomain/openstack.nova
ovn-relay active local sunbeam-1.localdomain/openstack.ovn-relay
rabbitmq active local sunbeam-1.localdomain/openstack.rabbitmq

App Version Status Scale Charm Channel Rev Exposed Message
controller active 1 juju-controller 3.4/stable 101 no
microceph active 3 microceph reef/edge 50 no
microk8s active 3 microk8s legacy/stable 121 no
openstack-hypervisor active 3 openstack-hypervisor 2024.1/edge 186 no
sunbeam-machine active 3 sunbeam-machine 2024.1/edge 22 no

Unit Workload Agent Machine Public address Ports Message
controller/0* active idle 0 192.168.123.11
microceph/0* active idle 0 192.168.123.11
microceph/1 active idle 1 192.168.123.12
microceph/2 active idle 2 192.168.123.13
microk8s/0* active idle 0 192.168.123.11 16443/tcp
microk8s/1 active idle 1 192.168.123.12 16443/tcp
microk8s/2 active idle 2 192.168.123.13 16443/tcp
openstack-hypervisor/0* active idle 0 192.168.123.11
openstack-hypervisor/1 active idle 1 192.168.123.12
openstack-hypervisor/2 active idle 2 192.168.123.13
sunbeam-machine/0* active idle 0 192.168.123.11
sunbeam-machine/1 active idle 1 192.168.123.12
sunbeam-machine/2 active idle 2 192.168.123.13

Machine State Address Inst id Base AZ Message
0 started 192.168.123.11 manual: ubuntu@22.04 Manually provisioned machine
1 started 192.168.123.12 manual:192.168.123.12 ubuntu@22.04 Manually provisioned machine
2 started 192.168.123.13 manual:192.168.123.13 ubuntu@22.04 Manually provisioned machine

Offer Application Charm Rev Connected Endpoint Interface Role
microceph microceph microceph 50 2/2 ceph ceph-client provider

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.