Christopher Johnston wrote:
> Should this be allowed?  Seems like this is not the appropriate 
> behaviour given I could have multiple interfaces on a host, no?

Duplicate hostname prevention is a feature in 1.2.X Cobbler, it is 
disabled/enabled at the top of your settings file.
I believe multiple hostnames on the same system are exempt from those 
restrictions.

What version of cobbler are you running?  (rpm -q cobbler) ? 

You mention a copy seems to be allowed.   Yes, it is.   This is one of 
those things that is pretty much required to make the copy easy to use, 
since it's hard to copy everything and supply correct arguments on the 
command line.    Enforcing the check at the copy time is one of the 
limitations of the duplicate hostname supression feature.  It's there as 
a safeguard, but it's not flawless.   A good tactic is to name your 
systems after your hostname parameters and make sure they match.   (You 
could probably even write some clever cobbler triggers to do more checks 
if you wanted)

Also, I should point out in 1.3, the hostname field per interface has 
been renamed to "--dns-name" and there is a global --hostname
that will set the /etc/sysconfig/network hostname.    Configurations 
will be migrated automatically so this is not something users will
need to worry about.

--Michael
>
> [EMAIL PROTECTED] dhcpd]# cobbler system edit --name=foo --interface=eth0 
> --hostname=foo
> [EMAIL PROTECTED] dhcpd]# cobbler system edit --name=foo --interface=eth1 
> --hostname=foo
> [EMAIL PROTECTED] dhcpd]# cobbler system edit --name=foo --interface=eth2 
> --hostname=foo
> [EMAIL PROTECTED] dhcpd]# cobbler sync
> [EMAIL PROTECTED] dhcpd]#
>
> [EMAIL PROTECTED] dhcpd]# cobbler system edit --name=foo --interface=eth0 
> --hostname=foo --ip=1.2.3.4 <http://1.2.3.4> --subnet=255.255.255.0 
> <http://255.255.255.0> 
> [EMAIL PROTECTED] dhcpd]# cobbler system edit --name=foo --interface=eth1 
> --hostname=foo --ip=1.2.3.4 <http://1.2.3.4> --subnet=255.255.255.0 
> <http://255.255.255.0> 
> [EMAIL PROTECTED] dhcpd]# cobbler system edit --name=foo --interface=eth2 
> --hostname=foo --ip=1.2.3.4 <http://1.2.3.4> --subnet=255.255.255.0 
> <http://255.255.255.0> 
> [EMAIL PROTECTED] dhcpd]# cobbler sync
>
> [EMAIL PROTECTED] dhcpd]# cobbler system report --name=foo
> system                : foo
> profile               : Legacy-Image-v1.0
> comment               : 
> created               : Wed Nov 26 05:13:46 2008
> image                 : 
> kernel options        : {}
> kernel options post   : {}
> kickstart             : <<inherit>>
> ks metadata           : {}
> mgmt classes          : []
> modified              : Wed Nov 26 05:18:03 2008
> netboot enabled?      : True
> owners                : ['admin']
> server                : <<inherit>>
> template files        : {}
> virt cpus             : <<inherit>>
> virt file size        : <<inherit>>
> virt path             : <<inherit>>
> virt ram              : <<inherit>>
> virt type             : <<inherit>>
> power type            : ipmitool
> power address         : 
> power user            : 
> power password        : 
> power id              : 
> interface        : eth0
>   bonding        : 
>   bonding_master : 
>   bonding_opts   : 
>   dhcp tag       : 
>   gateway        : 
>   hostname       : foo
>   ip address     : 1.2.3.4 <http://1.2.3.4>
>   is static?     : False
>   mac address    : 00:00:00:12:34:56
>   subnet         : 255.255.255.0 <http://255.255.255.0>
>   virt bridge    : 
> interface        : eth1
>   bonding        : 
>   bonding_master : 
>   bonding_opts   : 
>   dhcp tag       : 
>   gateway        : 
>   hostname       : foo
>   ip address     : 1.2.3.4 <http://1.2.3.4>
>   is static?     : False
>   mac address    : 00:00:00:12:34:56
>   subnet         : 255.255.255.0 <http://255.255.255.0>
>   virt bridge    : 
> interface        : eth2
>   bonding        : 
>   bonding_master : 
>   bonding_opts   : 
>   dhcp tag       : 
>   gateway        : 
>   hostname       : foo
>   ip address     : 1.2.3.4 <http://1.2.3.4>
>   is static?     : False
>   mac address    : 00:00:00:12:34:56
>   subnet         : 255.255.255.0 <http://255.255.255.0>
>   virt bridge    : 
>
>
> [EMAIL PROTECTED] dhcpd]# grep duplicate /etc/cobbler/settings
> # if 1, cobbler will allow insertions of system records that duplicate
> allow_duplicate_hostnames: 0
> # if 1, cobbler will allow insertions of system records that duplicate
> allow_duplicate_ips: 0
> # if 1, cobbler will allow insertions of system records that duplicate
> allow_duplicate_macs: 0
>
> Also a copy of a system record seems to be allowed, but not forcing me 
> to change any of the unique data in the record such as ip, hostname or 
> mac address.  See below.
>
> system                : foo
> profile               : Legacy-Image-v1.0
> comment               : 
> created               : Wed Nov 26 05:13:46 2008
> image                 : 
> kernel options        : {}
> kernel options post   : {}
> kickstart             : <<inherit>>
> ks metadata           : {}
> mgmt classes          : []
> modified              : Wed Nov 26 05:18:03 2008
> netboot enabled?      : True
> owners                : ['admin']
> server                : <<inherit>>
> template files        : {}
> virt cpus             : <<inherit>>
> virt file size        : <<inherit>>
> virt path             : <<inherit>>
> virt ram              : <<inherit>>
> virt type             : <<inherit>>
> power type            : ipmitool
> power address         : 
> power user            : 
> power password        : 
> power id              : 
> interface        : eth0
>   bonding        : 
>   bonding_master : 
>   bonding_opts   : 
>   dhcp tag       : 
>   gateway        : 
>   hostname       : foo
>   ip address     : 1.2.3.4 <http://1.2.3.4>
>   is static?     : False
>   mac address    : 00:00:00:12:34:56
>   subnet         : 255.255.255.0 <http://255.255.255.0>
>   virt bridge    : 
> interface        : eth1
>   bonding        : 
>   bonding_master : 
>   bonding_opts   : 
>   dhcp tag       : 
>   gateway        : 
>   hostname       : foo
>   ip address     : 1.2.3.4 <http://1.2.3.4>
>   is static?     : False
>   mac address    : 00:00:00:12:34:56
>   subnet         : 255.255.255.0 <http://255.255.255.0>
>   virt bridge    : 
> interface        : eth2
>   bonding        : 
>   bonding_master : 
>   bonding_opts   : 
>   dhcp tag       : 
>   gateway        : 
>   hostname       : foo
>   ip address     : 1.2.3.4 <http://1.2.3.4>
>   is static?     : False
>   mac address    : 00:00:00:12:34:56
>   subnet         : 255.255.255.0 <http://255.255.255.0>
>   virt bridge    : 
>
> system                : foo1
> profile               : Legacy-Image-v1.0
> comment               : 
> created               : Wed Nov 26 05:13:46 2008
> image                 : 
> kernel options        : {}
> kernel options post   : {}
> kickstart             : <<inherit>>
> ks metadata           : {}
> mgmt classes          : []
> modified              : Wed Nov 26 05:22:00 2008
> netboot enabled?      : True
> owners                : ['admin']
> server                : <<inherit>>
> template files        : {}
> virt cpus             : <<inherit>>
> virt file size        : <<inherit>>
> virt path             : <<inherit>>
> virt ram              : <<inherit>>
> virt type             : <<inherit>>
> power type            : ipmitool
> power address         : 
> power user            : 
> power password        : 
> power id              : 
> interface        : eth0
>   bonding        : 
>   bonding_master : 
>   bonding_opts   : 
>   dhcp tag       : 
>   gateway        : 
>   hostname       : foo
>   ip address     : 1.2.3.4 <http://1.2.3.4>
>   is static?     : False
>   mac address    : 00:00:00:12:34:56
>   subnet         : 255.255.255.0 <http://255.255.255.0>
>   virt bridge    : 
> interface        : eth1
>   bonding        : 
>   bonding_master : 
>   bonding_opts   : 
>   dhcp tag       : 
>   gateway        : 
>   hostname       : foo
>   ip address     : 1.2.3.4 <http://1.2.3.4>
>   is static?     : False
>   mac address    : 00:00:00:12:34:56
>   subnet         : 255.255.255.0 <http://255.255.255.0>
>   virt bridge    : 
> interface        : eth2
>   bonding        : 
>   bonding_master : 
>   bonding_opts   : 
>   dhcp tag       : 
>   gateway        : 
>   hostname       : foo
>   ip address     : 1.2.3.4 <http://1.2.3.4>
>   is static?     : False
>   mac address    : 00:00:00:12:34:56
>   subnet         : 255.255.255.0 <http://255.255.255.0>
>   virt bridge    : 
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> cobbler mailing list
> [email protected]
> https://fedorahosted.org/mailman/listinfo/cobbler
>   

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

Reply via email to