When pserv requests the pxeconfig from the region, the context nodegroup is not detected correctly.

Bug #1084507 reported by Raphaël Badin
6
This bug affects 1 person
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://www.asciiflow.com/#Draw8163190354464759514/1354753908

Related branches

Revision history for this message
Raphaël Badin (rvb) wrote :

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):
src/provisioningserver/tftp.py:
            # Send the local and remote endpoint addresses.
            local_host, local_port = get("local", (None, None))
            params["local"] = local_host
            remote_host, remote_port = get("remote", (None, None))
            params["remote"] = remote_host
            uuid = 'cbc2e193-262b-4d44-a5ee-b900a4448082' # get the UUID from the config
            params["uuid"] = uuid
            d = self.get_config_reader(params)

The API should use that value when it's provided:
src/maasserver/api.py:
        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')
        if uuid is not None:
            nodegroup = NodeGroup.objects.get(uuid=uuid)
        else:
            nodegroup = find_nodegroup(request)

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
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.