[et-mgmt-tools] dhcp.template and multiple subnets
Peter Wright
wright at imageworks.com
Mon Nov 5 17:36:10 UTC 2007
Michael DeHaan wrote:
> Michael DeHaan wrote:
>
>> Peter Wright wrote:
>>
>>> hi,
>>> just noticed an issue when you define multiple subnets in
>>> dhcp.template. it seems that if you have setup your template file to
>>> use mutiple subnets dhpcd will fail to start unless you have tagged a
>>> system to live on one of the secondary subnets. for example take
>>> this dhcp.template:
>>>
>>> subnet 172.30.214.0 netmask 255.255.255.0 {
>>> ...
>>> }
>>>
>>> $insert_cobbler_system_definitions
>>>
>>> subnet 172.30.206.0 netmask 255.255.255.0 {
>>> ...
>>> }
>>>
>>> $insert_cobbler_system_definitions_abq
>>>
>>>
>>>
>>> restarting dhcpd (or running cobbler sync) will fail due to the fact
>>> that "$insert_cobbler_system_definitions_abq" will litterally end up
>>> in /etc/dhpcd.conf. once you tag a system to use the secondary
>>> subnet (in this case --dhcp-tag=abq) the $insert_cobbler... variable
>>> is expanded correctly and dhcp restarts as expected.
>>>
>>> i am not sure if anyone else has run into this, or if this issue can
>>> we worked around (i am not too familiar with how template's).
>>>
>>> -pete
>>>
>>>
>>>
>> This would work... I'll add it to the Wiki.
>>
>> #if $getVar("insert_cobbler_system_definitions_abq","none") != "none"
>> subnet 172.30.206.0 netmask 255.255.255.0 {
>> ...
>> }
>> $insert_cobbler_system_definitions_abq
>> #end if
>>
>>
>>
>>
>>
>>
>>
> Small tweak:
>
> #if $getVar("insert_cobbler_system_definitions_abq","") != ""
> subnet 172.30.206.0 netmask 255.255.255.0 {
> ...
> }
> $insert_cobbler_system_definitions_abq
> #end if
>
>
>
awesome, thanks! i'll give this a go later today.
-pete
--
Peter Wright
Systems Engineer
Sony Pictures Imageworks
wright at imageworks.com
www.imageworks.com
More information about the et-mgmt-tools
mailing list