DHCP snippet validation should prompt user to add a global snippet for missing option and link to relevant documents.

Bug #1685490 reported by Mark Shuttleworth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Won't Fix
Medium
Unassigned
maas-ui
Won't Fix
Wishlist
Unassigned

Bug Description

When using DHCP snippets with custom DHCP options the error that is returned from validation makes it hard to understand what the issue is. MAAS should parse the validation message and provide a suggestion to add a global DHCP snippet with the missing option along with a link to relevant documentation. If the DHCP snippet UI could offer a way of creating a global DHCP snippet for the user or just take them to a new empty DHCP snippet that would help the user journey.

Original Bug Description:

I was unable to add snippets like these:

  option boot-server "ftp://polycom:fsfr4wwdfsdf@192.168.1.21";

or

  option sip-servers 0 "mallards.";

Can we ensure that all isc-dhcpd options are supported and also that custom options can be created? For example, see https://askubuntu.com/questions/267796/how-can-i-configure-isc-dhcpd-to-provide-option-150-for-cisco-phones

Tags: ui ux
Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

... and just to let you know, my phones don't work at home until this works, so Claire would really appreciate a fix :)

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

ISC dhcpd does not come with those two options defined. This allows more flexibility as a user can call those options what every name they like. The option just needs to be defined with its RFC code and its parameters.

If you add a global DHCP snippet with your options defined then this would allow your snippets to work.

option boot-server code 66 = string;
option sip-servers code 120 = { integer 8, ip-address };

Changed in maas:
status: New → Incomplete
milestone: none → 2.2.0rc3
importance: Undecided → High
Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 1685490] Re: Unable to use common options in DHCP snippets

Thanks Blake, that worked for the boot-server option but not for
sip-servers.

If the error message also pointed to documentation on how to add options
using a global snippet, then this would be clear for users. Or better,
when someone tries to add an unsupported option, prompt them to add the
global option directly, with a link to the relevant docs. Would you
update this bug accordingly?

Finally, we need to attach these snippets to the object they apply to,
not have them as a dangling collection of things that each need names :)

Mark

summary: - Unable to use common options in DHCP snippets
+ DHCP snippet validation should prompt user to add a global snippet for
+ missing option and link to relevant documents.
description: updated
tags: added: ui ux
Changed in maas:
status: Incomplete → Triaged
importance: High → Medium
milestone: 2.2.0rc3 → 2.3.0
Changed in maas:
milestone: 2.3.0 → 2.3.x
Changed in maas-ui:
importance: Undecided → Unknown
Revision history for this message
Jerzy Husakowski (jhusakowski) wrote :

Parsing DHCP snippets validation errors to figure out which options are missing in the global DHCP config is a hard problem that depends on specific versions of a specific package, which currently is reaching its end of life. The approach to DHCP snippets needs to be rethought during the migration to a successor of dhcpd (kea).

Changed in maas:
milestone: 2.3.x → none
status: Triaged → Won't Fix
Changed in maas-ui:
importance: Unknown → Undecided
status: New → Triaged
status: Triaged → New
Revision history for this message
Thorsten Merten (thorsten-merten) wrote :

MAAS will be transitioning to kea instead of dhcpd within the next one or two cycles and DHCP snippets are going to be removed.

Changed in maas-ui:
importance: Undecided → Wishlist
status: New → Won't Fix
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.