Re: [Dnsmasq-discuss] Referring the PXE GUID / UUID in dhcp script

2019-03-05 Thread Simon Kelley
On 20/02/2019 06:38, 西谷優希 wrote:
> Hi,
> 
> http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2010q1/003844.html
> As mentioned in this post, a PXE request contains a GUID / UUID value.
> Is there a way to refer this GUID / UUID in dhcp script?
> 
> I'd like to implement like below:
> 1. execute PXE Boot
> 2. send DHCP request to dhsmasq
> 3. hook dhcp-script which does:
>   - refer UUID of the client
>   - take the the client information from CMDB
>   - create pxelinux.cfg/ with the taken information(e.g. RAID
> type, kernel version)
> 4. send DHCP response to the host
> 5. booting goes on ...
> 
> Of course, it is possible to use the MAC address of NIC in place of
> UUID, but it can be changed by repair and replacement and the priority
> of UUID is higher than the MAC address of NIC for pxelinux.
> So it's great if GUID / UUID can be referred in dhcp script.
> 
> Thanks,
> nishitani yuki
> 
> ___

There are two problems with this idea.

1) The UUID is not supplied to the script (but that's easy to fix.)

2) The script execution is asynchronous. The DHCP protocol processing
doesn't wait for the script to execute, so you will have a big fat race
condition where the host may actually be booting before or after step 3
above has occurred.

Cheers,

Simon.


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] Referring the PXE GUID / UUID in dhcp script

2019-02-20 Thread Geert Stappers
On Wed, Feb 20, 2019 at 03:38:27PM +0900, 西谷優希 wrote:
> Hi,
> 
> http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2010q1/003844.html
> As mentioned in this post, a PXE request contains a GUID / UUID value.
> Is there a way to refer this GUID / UUID in dhcp script?
> 
> I'd like to implement like below:
> 1. execute PXE Boot
> 2. send DHCP request to dhsmasq
> 3. hook dhcp-script which does:
>   - refer UUID of the client
>   - take the the client information from CMDB
>   - create pxelinux.cfg/ with the taken information(e.g. RAID type,
> kernel version)
> 4. send DHCP response to the host
> 5. booting goes on ...
> 
> Of course, it is possible to use the MAC address of NIC in place of UUID,
> but it can be changed by repair and replacement and the priority of UUID is
> higher than the MAC address of NIC for pxelinux.
> So it's great if GUID / UUID can be referred in dhcp script.

I did read that as
  How are GUID/UUID provided to  dhcp-script?

Reading http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html
did not clearly reveal it.  My startpoint would

|  If the client provides user-classes, 
DNSMASQ_USER_CLASS0..DNSMASQ_USER_CLASSn 

and see if DNSMASQ_USER_CLASS97 is indeed GUID/UUID


Hope this helps,

Regards
Geert Stappers
Devops Engineer Hendrikx ITC


___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] Referring the PXE GUID / UUID in dhcp script

2019-02-19 Thread 西谷優希
Hi,

http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2010q1/003844.html
As mentioned in this post, a PXE request contains a GUID / UUID value.
Is there a way to refer this GUID / UUID in dhcp script?

I'd like to implement like below:
1. execute PXE Boot
2. send DHCP request to dhsmasq
3. hook dhcp-script which does:
  - refer UUID of the client
  - take the the client information from CMDB
  - create pxelinux.cfg/ with the taken information(e.g. RAID type,
kernel version)
4. send DHCP response to the host
5. booting goes on ...

Of course, it is possible to use the MAC address of NIC in place of UUID,
but it can be changed by repair and replacement and the priority of UUID is
higher than the MAC address of NIC for pxelinux.
So it's great if GUID / UUID can be referred in dhcp script.

Thanks,
nishitani yuki
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss