launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #12306
[Merge] lp:~rvb/maas/route-tasks into lp:maas
Raphaël Badin has proposed merging lp:~rvb/maas/route-tasks into lp:maas.
Commit message:
Use a nodegroup's UUID to identify the master nodegroup.
Requested reviews:
MAAS Maintainers (maas-maintainers)
For more details, see:
https://code.launchpad.net/~rvb/maas/route-tasks/+merge/125661
Use a nodegroup's UUID to identify the master nodegroup
= Pre-imp =
This was discussed with Julian.
= Notes =
To identify the master nodegroup (the nodegroup corresponding to the worker in charge of central tasks like DNS), we want to use the UUID. All the migrations have been made so that the master nodegroup as a UUID of 'master' (this is why this branch is so tiny) and nodegroup.name will only be used as the name of the DNS zone.
Note that all the API method to edit a nodegroup's name are already there.
--
https://code.launchpad.net/~rvb/maas/route-tasks/+merge/125661
Your team MAAS Maintainers is requested to review the proposed merge of lp:~rvb/maas/route-tasks into lp:maas.
=== modified file 'src/maasserver/models/nodegroup.py'
--- src/maasserver/models/nodegroup.py 2012-09-19 13:48:42 +0000
+++ src/maasserver/models/nodegroup.py 2012-09-21 10:10:35 +0000
@@ -85,7 +85,7 @@
from maasserver.models import Node
try:
- master = self.get(name='master')
+ master = self.get(uuid='master')
except NodeGroup.DoesNotExist:
# The master did not exist yet; create it on demand.
master = self.new(
=== modified file 'src/maasserver/tests/test_commands_config_master_dhcp.py'
--- src/maasserver/tests/test_commands_config_master_dhcp.py 2012-09-19 13:48:42 +0000
+++ src/maasserver/tests/test_commands_config_master_dhcp.py 2012-09-21 10:10:35 +0000
@@ -74,7 +74,7 @@
def test_configures_dhcp_for_master_nodegroup_existing_master(self):
management = NODEGROUPINTERFACE_MANAGEMENT.DHCP_AND_DNS
- master = factory.make_node_group(name='master', management=management)
+ master = factory.make_node_group(uuid='master', management=management)
settings = make_dhcp_settings()
call_command('config_master_dhcp', **settings)
master = NodeGroup.objects.ensure_master()