[OVN] Add baremetal support without Neutron DHCP agent for IPv4 #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherrypick from upstream, there were two conflicts:
This patch adds support for deploying baremetal nodes with OVN's built-in DHCP server for IPv4.
Since Neutron API's for setting DHCP options is mostly a pass-thru, Ironic uses a dnsmasq syntax for setting the baremetal options [0]. Since this syntax is unlikely to change and it's only a tiny subset of what dnsmasq can offer this patch does translate that syntax used by Ironic and convert it to OVN's equivalent options. In this way we do not need to re-design Neutron's DHCP options API nor change Ironic to use it with ML2/OVN.
This option also adds a new configuration option called "disable_ovn_dhcp_for_baremetal_ports". PXE booting nodes can be very sensitive and operators may prefer to use a fully-fledged DHCP server to do it (even Ironic makes DHCP pluggable). So if operators wish to disable OVN's built-in DHCP server for baremetal provisioning they can do so by setting this new option to True. It defaults to False.
This change has been tested with real hardware and it does work. That said, we found a problem in core OVN itself [1] while testing it that can affect PXE from reaching the TFTP server, we already communicated this with the core OVN folks and we hope it can be fixed soon. The change in core OVN should not affect the Neutron change tho.
Not that the "server-ip-address" DHCP Option now points to the "next_server" option in OVN instead of the "tftp_server_address". The previous behavior was wrong, the "server-ip-address" should set the "siaddr" in the DHCP header and this has been introduced in OVN [2] as an option called "next_server".
[0]
https://github.com/openstack/ironic/blob/49113385e89c52b56152418d3a0c8c69ddaf8b6e/ironic/common/pxe_utils.py#L523-L538 [1]
https://mail.openvswitch.org/pipermail/ovs-discuss/2022-May/051821.html [2]
https://patchwork.ozlabs.org/project/ovn/patch/20220511142757.168196-1-lmartins@redhat.com/
Partial-Bug: #1971431
Change-Id: Ia041f640293ba26abf9f70af915817e9861e8ffc
Signed-off-by: Lucas Alvares Gomes lucasagomes@gmail.com
(cherry picked from commit e73a85f)