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

Bug #1084507 reported by Raphaël Badin
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Jeroen T. Vermeulen
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:

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):
            # 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:
            # 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)
            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  Edit
Everyone can see this information.

Other bug subscribers