Michael DeHaan wrote:
> Simon Woolsgrove wrote:
>   
>> I just noticed this with the new network snippet in 1.4.1.
>>
>> If I add a system and only configure say eth5, cobbler adds eth0 I get say
>>
>> interface        : eth0
>>   mac address    :
>>   bonding        :
>>   bonding_master :
>>   bonding_opts   :
>>   is static?     : False
>>   ip address     :
>>   subnet         :
>>   static routes  : []
>>   dns name       :
>>   dhcp tag       :
>>   virt bridge    :
>> interface        : eth5
>>   mac address    : 00:xx:xx:xx:xx:xx
>>   bonding        :
>>   bonding_master :
>>   bonding_opts   :
>>   is static?     : False
>>   ip address     :
>>   subnet         :
>>   static routes  : []
>>   dns name       :
>>   dhcp tag       :
>>   virt bridge    :
>>
>>
>> The network snippet renders this as
>>
>> # --- Network ---
>> # Network information
>> # Using "old" style networking config. Make sure all MAC-addresses are in 
>> cobbler to use the new-style config
>> network --bootproto=dhcp --hostname=fred --device=eth0 --onboot=on
>> network --bootproto=dhcp --device=eth1 --onboot=on
>>
>> It goes into old style as no mac has been assigned to eth0 (unwanted 
>> interface).
>>
>> Making the following change fixes this
>>
>> diff --git a/snippets/network_config b/snippets/network_config
>> index 001aa50..a1ab5e4 100644
>> --- a/snippets/network_config
>> +++ b/snippets/network_config
>> @@ -61,7 +61,7 @@
>>              #end if
>>      ## network details are populated from the cobbler system object
>>              #if $is_vlan == "false"
>> -network $network_str --device=eth$i --onboot=on
>> +network $network_str --device=$iname --onboot=on
>>              #end if
>>          #end for
>>      #end if
>>
>>
>>
>> # --- Network ---
>> # Network information
>> # Using "old" style networking config. Make sure all MAC-addresses are in 
>> cobbler to use the new-style config
>> # found interface eth5 processing ...
>> network --bootproto=dhcp --hostname=fred --device=eth5 --onboot=on
>> # found interface eth0 processing ...
>> network --bootproto=dhcp --device=eth0 --onboot=on
>>
>>
>> Adding the mac address for eth0 fixes the issue as it jumps to the 
>> pre_install_network_config snippet.  I guess when eth0 is allowed to be 
>> removed would fix this use case. But  will still happen if old style is 
>> employed with non consecutive interfaces.
>>
>> Cheers,
>> Simon
>>
>>
>>
>>
>> _______________________________________________
>> cobbler mailing list
>> [email protected]
>> https://fedorahosted.org/mailman/listinfo/cobbler
>>   
>>     
>
> Just labelling this thread as a patch so I can find it :)
>
>
>
> _______________________________________________
> cobbler mailing list
> [email protected]
> https://fedorahosted.org/mailman/listinfo/cobbler
>   

Applied to devel and master branches (will be in 1.4.2), thanks!

--Michael


_______________________________________________
cobbler mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/cobbler

Reply via email to