manual provider: adding space does not update machines

Bug #2067617 reported by Guillaume Boutry
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
High
Joseph Phillips

Bug Description

Trying to create a space on a manual provider does not refresh the subnet definition of the machine.

Reproducer:

(think of sunbeam)

- bootstrap a manual controller on the current host
- juju add-space management <one of the IP address of the host>
- juju controller-config juju-mgmt-space=management
ERROR invalid config "juju-mgmt-space"="management": machines with no addresses in this space: 0

Juju will complain that the machine 0 does not have an address in this space. But the machine 0 IS the controller, and the only machine managed by the controller.

But binding the controller application to this space will actually work:
juju bind controller management

After some digging, I've seen that the machine address I'm interested in does not have a space id tagged:
{
 "value": "10.206.54.40",
 "addresstype": "ipv4",
 "networkscope": "local-cloud",
 "origin": "machine"
},

Thanks to @manadart, I've been able to look further into what's going on:

The following commands will allow the machine subnets to be tagged with a space id:
juju model-config ignore-machine-addresses=true
sudo systemctl restart jujud-machine-0.service
juju model-config ignore-machine-addresses=false
sudo systemctl restart jujud-machine-0.service

You can see:
{
 "value" : "10.206.54.40",
 "addresstype" : "ipv4",
 "networkscope" : "local-cloud",
 "origin" : "machine",
 "spaceid" : "1"
}

but you still can't update `juju-mgmt-space`

Juju version: 3.4.2
Cloud: manual provider

description: updated
description: updated
Changed in juju:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Joseph Phillips (manadart)
milestone: none → 3.4.4
Revision history for this message
Joseph Phillips (manadart) wrote :

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

This cuts the process down to one bounce of the agent post space definition.

Changed in juju:
status: Confirmed → In Progress
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
Revision history for this message
Guillaume Boutry (gboutry) wrote :

I'm still getting the error in juju 3.4.4

```
juju controller-config juju-mgmt-space=management
ERROR invalid config "juju-mgmt-space"="management": machines with no addresses in this space: 0
```

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.