Node always belongs to the same nodegroup/cluster
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Unassigned |
Bug Description
While trying to work on the FPI, I found out that the nodes always belong to the same nodegroup/cluster controller even though they have been registered with different clusters.
My setup is the following:
1. maas region node (node: maas)
2. maas cluster node (node: cluster)
3. Added a 2nd maas-cluster-
Them I proceeded with enlistment/
1. Enlisted/
2. Enlisted/
Then I did the following:
>>> from maasserver.models import Node
>>> node = Node.objects.
>>> node.nodegroup.
'192.168.123.3'
>>> node = Node.objects.
>>> node.nodegroup.
'192.168.123.3'
(Note that I added a function get_any_interface that obtains the first interface in a nodegroup/cluster, however this is really unrelated to the issue because I also did the following:
>>> from maasserver.models import Node
>>> node = Node.objects.
>>> node.nodegroup.uuid
u'5f26e851-
>>> node = Node.objects.
>>> node.nodegroup.uuid
u'5f26e851-
If you see, both UUID's are the same. The UUID belongs to the cluster-controller running on node 'cluster'.
Related branches
- Andres Rodriguez (community): Approve
- Julian Edwards (community): Approve
-
Diff: 261 lines (+124/-70)3 files modifiedsrc/maasserver/exceptions.py (+10/-0)
src/maasserver/utils/__init__.py (+50/-25)
src/maasserver/utils/tests/test_utils.py (+64/-45)
Changed in maas: | |
importance: | Undecided → High |
importance: | High → Undecided |
Changed in maas: | |
status: | New → Fix Committed |
importance: | Undecided → Critical |
Changed in maas: | |
status: | Fix Committed → Fix Released |
When a node enlists, we decide to which cluster it should be attached to by checking the IP address of the node against the managed interfaces configured on the cluster (see src/maasserver/ api.py: find_nodegroup).
Can you tell us how the interfaces of the 2 clusters are configured?