Cannot set vlan dhcp_on to true (primary rack controller id not accepted)

Bug #1756398 reported by Ryan Beisner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Expired
Undecided
Unassigned

Bug Description

Cannot set vlan dhcp_on to true (primary rack controller id not accepted)

MAAS version: 2.3.0 (6434-gd354690-0ubuntu1~16.04.1)

#### There is only one rack controller, the primary one:
rbeisner@rby:~/git⟫ maas maas rack-controllers read | grep system_id
                "system_id": "c4ak3h",
        "system_id": "c4ak3h",

#### Just to demonstrate, I can update the name of the vlan:
rbeisner@rby:~/git⟫ maas maas vlan update 0 2922 name="VLAN2922"
Success.
Machine-readable output follows:
{
    "fabric_id": 0,
    "primary_rack": null,
    "relay_vlan": null,
    "external_dhcp": null,
    "mtu": 1500,
    "space": "oam-space",
    "fabric": "fabric-0",
    "secondary_rack": null,
    "resource_uri": "/MAAS/api/2.0/vlans/5136/",
    "name": "VLAN2922",
    "dhcp_on": false,
    "vid": 2922,
    "id": 5136
}

#### But when I try to set dhcp_on true, I cannot proceed even though I provide the primary rack id according to documentation:
rbeisner@rby:~/git⟫ maas maas vlan update 0 2922 dhcp_on=true primary_rack="c4ak3h"
{"__all__": ["dhcp can only be turned on when a primary rack controlleris set."], "primary_rack": ["Select a valid choice. c4ak3h is not one of the available choices."]}

Tags: uosci
Revision history for this message
Ryan Beisner (1chb1n) wrote :

For reference, here's what I'm going by:

rbeisner@rby:~/git⟫ maas maas vlan update --help
usage: maas maas vlan update [--help] [-d] [-k]
                             fabric_id vid [data [data ...]]

Update VLAN.

Positional arguments:
        fabric_id
        vid

This method accepts keyword arguments. Pass each argument as a
key-value pair with an equals sign between the key and the value:
key1=value1 key2=value key3=value3. Keyword arguments must come after
any positional arguments.

:param name: Name of the VLAN.
:type name: unicode
:param description: Description of the VLAN.
:type description: unicode
:param vid: VLAN ID of the VLAN.
:type vid: integer
:param mtu: The MTU to use on the VLAN.
:type mtu: integer
:param dhcp_on: Whether or not DHCP should be managed on the VLAN.
:type dhcp_on: boolean
:param primary_rack: The primary rack controller managing the VLAN.
:type primary_rack: system_id
:param secondary_rack: The secondary rack controller manging the VLAN.
:type secondary_rack: system_id
:param relay_vlan: Only set when this VLAN will be using a DHCP relay
    to forward DHCP requests to another VLAN that MAAS is or will run
    the DHCP server. MAAS will not run the DHCP relay itself, it must
    be configured to proxy reqests to the primary and/or secondary
    rack controller interfaces for the VLAN specified in this field.
:type relay_vlan: ID of VLAN
:param space: The space this VLAN should be placed in. Passing in an
    empty string (or the string 'undefined') will cause the VLAN to be
    placed in the 'undefined' space.
:type space: unicode

Returns 404 if the fabric or VLAN is not found.

Common command-line options:
    --help, -h
        Show this help message and exit.
    -d, --debug
        Display more information about API responses.
    -k, --insecure
        Disable SSL certificate check

Revision history for this message
Ryan Beisner (1chb1n) wrote :

To confirm, following the "Enabling DHCP" section of https://docs.maas.io/2.3/en/installconfig-network-dhcp:

In the MAAS UI, under Subnets --> Fabrics, I drill down on VLAN2922.

I then hit the Take Action drop-down menu and select Provide DHCP.

I am then presented with an empty Rack Controller drop-down list. Nothing is there to select.

Revision history for this message
Blake Rouse (blake-rouse) wrote :

Seems to me that you have no rack controllers that have an interface on that VLAN. Can you confirm?

Changed in maas:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for MAAS because there has been no activity for 60 days.]

Changed in maas:
status: Incomplete → Expired
Revision history for this message
tyldis (tyldis) wrote :

Reviving this issue as it's present even in 2.6. The problem seems to be that a dhcp-relayed VLAN does not get assigned to a rack-controller.

So a rack-controller with an interface in VLAN1000. Set up DHCP relay in VLAN2000 and point it to the rack-controller in VLAN1000.
VLAN2000 does not get assinged a rack-controller, and hence the pxe-boot is not configured.

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.