[ovs-discuss] [ovn] TFTP server - next server missing?
Hi folks, While doing some tests with PXE booting and OVN, we noticed that even though the tftp-server option was sent by ovn-controller, the baremetal node wouldn't try to reach it to download the image. Comparing it to the output sent by dnsmasq, it looks like we're missing the next server option. After this 'hardcoded' [0] (and dirty) patch, it seemed to work. Is this something we should add to OVN? For example, when the tftp-* options are set in the DHCP_Options table, have ovn-controller send the next-server address in the DHCP offer? Thanks! daniel [0] diff --git a/controller/pinctrl.c b/controller/pinctrl.c index ae3da332c..6c2c75a64 100644 --- a/controller/pinctrl.c +++ b/controller/pinctrl.c @@ -2259,6 +2259,7 @@ pinctrl_handle_put_dhcp_opts( if (*in_dhcp_msg_type != OVN_DHCP_MSG_INFORM) { dhcp_data->yiaddr = (msg_type == DHCP_MSG_NAK) ? 0 : *offer_ip; +dhcp_data->siaddr = (ovs_be32) inet_addr("172.27.7.29"); } else { dhcp_data->yiaddr = 0; } ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
Re: [ovs-discuss] [ovn] TFTP server - next server missing?
On Fri, May 6, 2022 at 9:46 AM Daniel Alvarez Sanchez wrote: > > Hi folks, > > While doing some tests with PXE booting and OVN, we noticed that even though > the tftp-server option was sent by ovn-controller, the baremetal node > wouldn't try to reach it to download the image. Comparing it to the output > sent by dnsmasq, it looks like we're missing the next server option. > Thanks for describing the issue, Daniel > After this 'hardcoded' [0] (and dirty) patch, it seemed to work. > Yes, we tested it with real hardware and it works! > Is this something we should add to OVN? For example, when the tftp-* options > are set in the DHCP_Options table, have ovn-controller send the next-server > address in the DHCP offer? > I would suggest using the "tftp_server_address" (DHCP Opt 150) for this, there's the "tftp_server" (DHCP Opt 66) option as well but this one also accepts a hostname. So, the way I would go about it is: When option 150 is set we also set the next-server field in the header [1] with the same IP address specified in that option. [1] https://github.com/openvswitch/ovs/blob/f8be30acf2eb60d567bb7386b98f5cb58ddb9119/lib/dhcp.h#L42 Cheers, Lucas > Thanks! > daniel > > [0] > > > diff --git a/controller/pinctrl.c b/controller/pinctrl.c > index ae3da332c..6c2c75a64 100644 > --- a/controller/pinctrl.c > +++ b/controller/pinctrl.c > @@ -2259,6 +2259,7 @@ pinctrl_handle_put_dhcp_opts( > > if (*in_dhcp_msg_type != OVN_DHCP_MSG_INFORM) { > dhcp_data->yiaddr = (msg_type == DHCP_MSG_NAK) ? 0 : *offer_ip; > +dhcp_data->siaddr = (ovs_be32) inet_addr("172.27.7.29"); > } else { > dhcp_data->yiaddr = 0; > } > ___ > discuss mailing list > disc...@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-discuss ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
Re: [ovs-discuss] [ovn] TFTP server - next server missing?
Hi, On Fri, May 6, 2022 at 9:45 AM Daniel Alvarez Sanchez wrote: > > Hi folks, > > While doing some tests with PXE booting and OVN, we noticed that even though > the tftp-server option was sent by ovn-controller, the baremetal node > wouldn't try to reach it to download the image. Comparing it to the output > sent by dnsmasq, it looks like we're missing the next server option. > > After this 'hardcoded' [0] (and dirty) patch, it seemed to work. > Thanks Daniel for describing the problem here. > Is this something we should add to OVN? For example, when the tftp-* options > are set in the DHCP_Options table, have ovn-controller send the next-server > address in the DHCP offer? > I would suggest doing it when the "tftp_server_address" option is set (DHCP 150), there's another option called "tftp_server" (DHCP 66) but that could also be the hostname of the machine. So using DHCP 150 is the way I would go about it. > Thanks! > daniel > > [0] > > > diff --git a/controller/pinctrl.c b/controller/pinctrl.c > index ae3da332c..6c2c75a64 100644 > --- a/controller/pinctrl.c > +++ b/controller/pinctrl.c > @@ -2259,6 +2259,7 @@ pinctrl_handle_put_dhcp_opts( > > if (*in_dhcp_msg_type != OVN_DHCP_MSG_INFORM) { > dhcp_data->yiaddr = (msg_type == DHCP_MSG_NAK) ? 0 : *offer_ip; > +dhcp_data->siaddr = (ovs_be32) inet_addr("172.27.7.29"); > } else { > dhcp_data->yiaddr = 0; > } ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
Re: [ovs-discuss] [ovn] TFTP server - next server missing?
On Fri, May 6, 2022, 5:57 AM Lucas Alvares Gomes wrote: > Hi, > > On Fri, May 6, 2022 at 9:45 AM Daniel Alvarez Sanchez > wrote: > > > > Hi folks, > > > > While doing some tests with PXE booting and OVN, we noticed that even > though the tftp-server option was sent by ovn-controller, the baremetal > node wouldn't try to reach it to download the image. Comparing it to the > output sent by dnsmasq, it looks like we're missing the next server option. > > > > After this 'hardcoded' [0] (and dirty) patch, it seemed to work. > > > > Thanks Daniel for describing the problem here. > > > Is this something we should add to OVN? For example, when the tftp-* > options are set in the DHCP_Options table, have ovn-controller send the > next-server address in the DHCP offer? > > > > I would suggest doing it when the "tftp_server_address" option is set > (DHCP 150), there's another option called "tftp_server" (DHCP 66) but > that could also be the hostname of the machine. So using DHCP 150 is > the way I would go about it. > This sounds reasonable to me. Patch is welcome if you want to submit :) Numan > > Thanks! > > daniel > > > > [0] > > > > > > diff --git a/controller/pinctrl.c b/controller/pinctrl.c > > index ae3da332c..6c2c75a64 100644 > > --- a/controller/pinctrl.c > > +++ b/controller/pinctrl.c > > @@ -2259,6 +2259,7 @@ pinctrl_handle_put_dhcp_opts( > > > > if (*in_dhcp_msg_type != OVN_DHCP_MSG_INFORM) { > > dhcp_data->yiaddr = (msg_type == DHCP_MSG_NAK) ? 0 : *offer_ip; > > +dhcp_data->siaddr = (ovs_be32) inet_addr("172.27.7.29"); > > } else { > > dhcp_data->yiaddr = 0; > > } > > ___ > discuss mailing list > disc...@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-discuss > > ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
Re: [ovs-discuss] [ovn] TFTP server - next server missing?
On Fri, May 6, 2022 at 10:53 PM Numan Siddique wrote: > > > > On Fri, May 6, 2022, 5:57 AM Lucas Alvares Gomes wrote: >> >> Hi, >> >> On Fri, May 6, 2022 at 9:45 AM Daniel Alvarez Sanchez >> wrote: >> > >> > Hi folks, >> > >> > While doing some tests with PXE booting and OVN, we noticed that even >> > though the tftp-server option was sent by ovn-controller, the baremetal >> > node wouldn't try to reach it to download the image. Comparing it to the >> > output sent by dnsmasq, it looks like we're missing the next server option. >> > >> > After this 'hardcoded' [0] (and dirty) patch, it seemed to work. >> > >> >> Thanks Daniel for describing the problem here. >> >> > Is this something we should add to OVN? For example, when the tftp-* >> > options are set in the DHCP_Options table, have ovn-controller send the >> > next-server address in the DHCP offer? >> > >> >> I would suggest doing it when the "tftp_server_address" option is set >> (DHCP 150), there's another option called "tftp_server" (DHCP 66) but >> that could also be the hostname of the machine. So using DHCP 150 is >> the way I would go about it. > > > This sounds reasonable to me. > > Patch is welcome if you want to submit :) > > Numan > Thanks Numans. I started coding this but just realized that the "tftp_boot_address" is a Cisco proprietary option and it accepts multiple IPv4 addresses. So I think we will need a separate option for the next-server. See: https://www.ovn.org/support/dist-docs/ovn-nb.5.html options : tftp_server_address: optional string The DHCPv4 option code for this option is 150. The option con‐ tains one or more IPv4 addresses that the client MAY use. This option is Cisco proprietary, the IEEE standard that matches with this requirement is option 66 (tftp_server). >> >> > Thanks! >> > daniel >> > >> > [0] >> > >> > >> > diff --git a/controller/pinctrl.c b/controller/pinctrl.c >> > index ae3da332c..6c2c75a64 100644 >> > --- a/controller/pinctrl.c >> > +++ b/controller/pinctrl.c >> > @@ -2259,6 +2259,7 @@ pinctrl_handle_put_dhcp_opts( >> > >> > if (*in_dhcp_msg_type != OVN_DHCP_MSG_INFORM) { >> > dhcp_data->yiaddr = (msg_type == DHCP_MSG_NAK) ? 0 : *offer_ip; >> > +dhcp_data->siaddr = (ovs_be32) inet_addr("172.27.7.29"); >> > } else { >> > dhcp_data->yiaddr = 0; >> > } >> >> ___ >> discuss mailing list >> disc...@openvswitch.org >> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss >> > ___ > discuss mailing list > disc...@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-discuss ___ discuss mailing list disc...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-discuss