Out of a box Fuel does not support moving controllers into different network node groups (racks). But as a plugin developer I want to have such possibility because I can handle it within my plugin.
So right now if controllers are in different nodegroups (for example in case of external LB), then it's not possible to download/get network configuration and thus not possible to deploy such configuration because Nailgin throws error.
Steps to reproduce:
1) Install https://github.com/adidenko/fuel-plugin-external-lb/blob/master/rpms/external_loadbalancer-0.1-0.1.3-1.noarch.rpm?raw=true plugin
2) Create env with 2+ nodegroups and enable plugin
3) Add 2+ nodes from different nodegroups as controllers to the cluster
4) Try to get network configuration via CLI (fuel network --env 1 -d) or via UI
Expected result:
Steps 1-4 work fine, no errors
Actual result:
500 Server Error: Internal Server Error (Node roles [controller] has more than one common node group)
Trace from nailgin app.log:
2015-12-09 11:35:20.635 ERROR [7fbcc775e740] (network_configuration) Serialization failed
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/nailgun/api/v1/handlers/network_configuration.py", line 101, in GET
return self.serializer.serialize_for_cluster(cluster)
File "/usr/lib/python2.6/site-packages/nailgun/objects/serializers/network_configuration.py", line 108, in serialize_for_cluster
result = cls.serialize_net_groups_and_vips(cluster)
File "/usr/lib/python2.6/site-packages/nailgun/objects/serializers/network_configuration.py", line 50, in serialize_net_groups_and_vips
net_manager.assign_vips_for_net_groups_for_api(cluster))
File "/usr/lib/python2.6/site-packages/nailgun/network/manager.py", line 1783, in assign_vips_for_net_groups_for_api
cluster):
File "/usr/lib/python2.6/site-packages/nailgun/network/manager.py", line 1899, in _assign_vips_for_net_groups
objects.Cluster.get_node_group(cluster, noderoles)
File "/usr/lib/python2.6/site-packages/nailgun/objects/cluster.py", line 898, in get_node_group
', '.join(noderoles)))
CanNotFindCommonNodeGroup: Node roles [controller] has more than one common node group
Fuel version info:
release: "8.0"
openstack_version: "2015.1.0-8.0"
api: "1.0"
build_number: "243"
build_id: "243"
It looks like we need to update these lines:
https:/ /github. com/openstack/ fuel-web/ blob/master/ nailgun/ nailgun/ objects/ cluster. py#L895- L898
and return cls.get_ default_ group(instance) if len(nodegroups) > 1. Otherwise it won't be possible to deploy controllers in different racks.