Feature request: MAAS should support relay-only DHCP

Bug #1797986 reported by Kellen Renshaw
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
MAAS
In Progress
Medium
Unassigned

Bug Description

A use case for MAAS that was encountered at a customer site was to only provide DHCP via the relay mechanism. Currently, MAAS does not support relaying DHCP via an interface that is not also providing DHCP to the local subnet.

An example dhcpd.conf file is below that will only hand out leases to a relayed network. It was adapted from a dhcpd.conf generated by MAAS 2.3.5.

The subnet is on vlan-5003 relayed via the subnet/interface in vlan-5001. This was tested on vanilla isc-dhcp-server and confirmed to work as expected.

# WARNING: Do not edit /var/lib/maas/dhcpd.conf yourself. MAAS will
# overwrite any changes made there. Instead, you can modify dhcpd.conf by
# using DHCP snippets over the API or through the web interface.

option arch code 93 = unsigned integer 16; # RFC4578
option path-prefix code 210 = text; #RFC5071

#
# Shorter lease time for PXE booting
#
class "PXE" {
   match if substring (option vendor-class-identifier, 0, 3) = "PXE";
   default-lease-time 30;
   max-lease-time 30;
}

#
# Define lease time globally (can be overriden globally or per subnet
# with a DHCP snippet)
#
default-lease-time 600;
max-lease-time 600;

#
# Global DHCP snippets
#
# No global DHCP snippets defined

#
# Bootloaders
#
if option arch = 00:00 {
    # pxe
    filename "pxelinux.0";
} elsif option arch = 00:0C {
    # open-firmware_ppc64el
    filename "bootppc64.bin";
} elsif option arch = 00:0E {
    # powernv
    filename "pxelinux.0";
    option path-prefix "ppc64el/";
} elsif option arch = 00:07 {
    # uefi_amd64
    filename "bootx64.efi";
} elsif option arch = 00:0B {
    # uefi_arm64
    filename "grubaa64.efi";
} else {
    # pxe
    filename "pxelinux.0";
}

#
# Failover Peers
#

#
# Networks
#
# vlan-5003 relayed via vlan-5001
shared-network vlan-5001 {
    subnet 10.100.1.0 netmask 255.255.255.0 {
        # Silences "no leases available" messages from local DHCP requests
        ignore unknown-clients;
    }
}
shared-network vlan-5003 {
    subnet 10.100.2.0 netmask 255.255.255.0 {
           ignore-client-uids true;
           option subnet-mask 255.255.255.0;
           option broadcast-address 10.100.2.255;
           option domain-name-servers 10.100.1.2;
           option domain-name "maas";
           option domain-search "maas";
           option routers 10.100.2.1;
           option ntp-servers 10.100.1.2;

           #
           # Subnet DHCP snippets
           #
           # No DHCP snippets defined for subnet
           pool {
              range 10.100.2.10 10.100.2.15;
           }
    }
}

Tags: internal track
Changed in maas:
status: New → Confirmed
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Kellen,

Could you please clarify a few things:

1. Can you please expand on the use case? What is the problem that you are trying to solve? From the bug report, it is not clear to me what problem you have encountered and that you are trying to solve.

2. Can you please provide a maas generated DHCP config vs the expected generated config if there were to be an option to solve your problem?

3. Did you try DHCP snippets to see if you would be able to configure this yourself without providing an specific option ? The reason I ask is because the DHCP snippet feature was created to be flexible and provide configuration that is not otherwise supported. I would imagine that if MAAS is not providing DHCP on a given network, you could still use a global snippet (or maybe even a subnet snippet) to configure the DHCP as desired.

Thanks!

Changed in maas:
status: Confirmed → Incomplete
milestone: none → next
tags: added: internal track
Revision history for this message
Kellen Renshaw (krenshaw) wrote :

Hi Andres,

Certainly!

1) Use case is MAAS being located on an infrastructure subnet where MAAS managing DHCP is not desired. Deployment subnets have DHCP relayed to MAAS, and MAAS is expected to manage DHCP on those networks. This arrangement can happen via organizational requirements, especially when HA is desired. To date, I have not seen a split out (separate rack/region) HA architecture documented that can be suggested as an alternative.

2) Attached, maas-now.txt and maas-proposed.txt

3) Yes, we have a temporary workaround using a DHCP snippet to disable DHCP functionality on a subnet that is configured to serve DHCP using "deny unknown-clients;". This is not optimal, since the UI indicates that DHCP is provided to a subnet that it functionally does not.

I can test adding a global snippet with an appropriate set of declarations, however, I am not sure that MAAS will permit a VLAN to be relayed (using the MAAS feature set) without a directly connected VLAN set to provide DHCP. A snippet to relay DHCP outside of MAAS control is not the desired outcome.

Additionally, the UI would not reflect the reality, leading to potential management issues and user confusion.

Thanks,
Kellen

Revision history for this message
Kellen Renshaw (krenshaw) wrote :

Currently generated maas config

Revision history for this message
Kellen Renshaw (krenshaw) wrote :

maas config if relay-only option/ability was provided.

Changed in maas:
status: Incomplete → Triaged
importance: Undecided → Medium
Revision history for this message
Adam Collard (adam-collard) wrote :

This bug has not seen any activity in the last 6 months, so it is being automatically closed.

If you are still experiencing this issue, please feel free to re-open.

MAAS Team

Changed in maas:
status: Triaged → Invalid
Changed in maas:
status: Invalid → In Progress
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.