When pserv requests the pxeconfig from the region, the context nodegroup is not detected correctly.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Jeroen T. Vermeulen | ||
1.2 |
Fix Released
|
Critical
|
Jeroen T. Vermeulen |
Bug Description
Although we assume that when a node is contacting the region controller (RC), we can safely detect to which nodegroup is belongs by having a look at the originating IP (which was assigned by our own dhcp server), when the cluster controller (CC) contacts the RC to get the pxeconfig, we cannot assume anything on the originating IP.
Currently, we try to detect to which nodegroup the request should be linked to by inspecting the originating IP. This does not work because we cannot assume that the CC will contact the RC using a registered network (i.e. one for which we control the DHCP server). Instead the CC should send its uuid (along with the other parameters: 'local' and 'remote') and the api should use that value.
Here is the network setup I'm talking about:
http://
Related branches
- Raphaël Badin (community): Needs Information
- Julian Edwards (community): Approve
-
Diff: 143 lines (+41/-3)4 files modifiedsrc/maasserver/api.py (+15/-1)
src/maasserver/tests/test_api.py (+16/-2)
src/provisioningserver/tests/test_tftp.py (+5/-0)
src/provisioningserver/tftp.py (+5/-0)
- Julian Edwards (community): Approve
-
Diff: 143 lines (+41/-3)4 files modifiedsrc/maasserver/api.py (+15/-1)
src/maasserver/tests/test_api.py (+16/-2)
src/provisioningserver/tests/test_tftp.py (+5/-0)
src/provisioningserver/tftp.py (+5/-0)
Changed in maas: | |
assignee: | nobody → Jeroen T. Vermeulen (jtv) |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
The fix for this should be twofold:
Fix the pserv code so that the UUID will be sent (sorry, not a proper diff, just notes from my cowboy on the QALab code): gserver/ tftp.py:
local_ host, local_port = get("local", (None, None))
params[ "local" ] = local_host
remote_ host, remote_port = get("remote", (None, None))
params[ "remote" ] = remote_host 262b-4d44- a5ee-b900a44480 82' # get the UUID from the config
params[ "uuid"] = uuid config_ reader( params)
src/provisionin
# Send the local and remote endpoint addresses.
uuid = 'cbc2e193-
d = self.get_
The API should use that value when it's provided: api.py:
src/maasserver/
else:
# Map from pxelinux namespace subarchitecture names to MAAS
# namespace subarchitecture names. Right now this happens to be a
# 1-1 mapping.
subarch = pxelinux_subarch
uuid = request. GET.get( 'uuid')
nodegroup = NodeGroup. objects. get(uuid= uuid)
nodegroup = find_nodegroup( request)
if uuid is not None:
else: