[2.x] DHCP HA - Configuring a secondary DHCP server when primary is dead, results in DHCP not answering requests

Bug #1798476 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Blake Rouse

Bug Description

I have 2 rack controllers where I want to configure DHCP HA (rack1, rack2). If I try to configure a secondary when the primary server is unavailable, the secondary will never respond the DHCP requests, even though it is correctly configured.

How to reproduce
================
1. Configure rackd1 as primary DHCP server for a VLAN, but do not configure a secondary(e.g: maas admin vlan update 1 3000 dhcp_on=True primary_rack=ntkhf7 )
2. Stop rackd1 (e.g. sudo service maas-rackd stop)
3. Configure rackd2 with the same primary and a different secondary (maas admin vlan update 1 3000 dhcp_on=True primary_rack=ntkhf7 secondary_rack=syxs8y)
4. Try to commission a machine
5. Machine won't PXE boot

Proposed solution
==================
There's one of two options:

1. When attempting to configure a secondary rack controller when the primary is down, MAAS should prevent the user from doing so, because the secondary will never answer requests until the first time it syncs with a primary (in this case, it never did).
2. When configuring a secondary rack controller when the primary is down, always make that secondary rack controller the primary regardless, so that DHCP works. Once the primary comes back (if it ever does), then the previous primary would become secondary.

Related branches

Changed in maas:
milestone: none → 2.5.0
importance: Undecided → High
Changed in maas:
assignee: nobody → Blake Rouse (blake-rouse)
milestone: 2.5.0 → 2.5.0rc1
Revision history for this message
Blake Rouse (blake-rouse) wrote :

We do not model wanted state vs current state, which would be a requirement to solve this the way you are describing. Its a rather big change and not a simple bug fix.

Revision history for this message
Andres Rodriguez (andreserl) wrote : Re: [Bug 1798476] Re: [2.x] DHCP HA - Configuring a secondary DHCP server when primary is dead, results in DHCP not answering requests

Well then the minimum thing we should do is prevent a machine to be
configured as a secondary rack controller for a vlan if the primary is dead
with a proper message of why, or, allow this to be forced if they want to
resume the configuration.

On Mon, Oct 22, 2018 at 12:21 PM Blake Rouse <email address hidden>
wrote:

> We do not model wanted state vs current state, which would be a
> requirement to solve this the way you are describing. Its a rather big
> change and not a simple bug fix.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1798476
>
> Title:
> [2.x] DHCP HA - Configuring a secondary DHCP server when primary is
> dead, results in DHCP not answering requests
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/maas/+bug/1798476/+subscriptions
>
> Launchpad-Notification-Type: bug
> Launchpad-Bug: product=maas; milestone=2.5.0rc1; status=New;
> importance=High; <email address hidden>;
> Launchpad-Bug-Information-Type: Public
> Launchpad-Bug-Private: no
> Launchpad-Bug-Security-Vulnerability: no
> Launchpad-Bug-Commenters: andreserl blake-rouse
> Launchpad-Bug-Reporter: Andres Rodriguez (andreserl)
> Launchpad-Bug-Modifier: Blake Rouse (blake-rouse)
> Launchpad-Message-Rationale: Subscriber
> Launchpad-Message-For: andreserl
>
--
Andres Rodriguez (RoAkSoAx)
Ubuntu Server Developer
MSc. Telecom & Networking
Systems Engineer

Revision history for this message
Andres Rodriguez (andreserl) wrote :

To provide more context it seems that when configuring isc-dhcp as a secondary DHCP server, it won't answer DHCP requests (provide IP addresses) to machines, if it has never synced with the primary isc-dhcp server.

To address the issue MAAS should:
 - In the UI, MAAS should allow the configuration, but if MAAS detects the primary is dead, MAAS should provide a confirmation message telling the user if they do so, DHCP may not work until the primary is back up.

 - In the API, MAAS should prevent the user from configuring the secondary if the primary is dead. However, allow the user to force this behavior with a force parameter.

Changed in maas:
status: New → Incomplete
status: Incomplete → Opinion
status: Opinion → New
Changed in maas:
status: New → Triaged
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.