dhcpd.conf is rendered from /etc/cobbler/dhcp.template - just change it there and sync.
From: cobbler-boun...@lists.fedorahosted.org [mailto:cobbler-boun...@lists.fedorahosted.org] On Behalf Of Neal Shrader Sent: Thursday, January 26, 2012 8:08 PM To: cobbler mailing list Subject: Re: cobbler xmlrpc subnet/netmask issue Hello -- Thanks for the reply. Yes, I saw that it was renamed, and I'm able to properly manipulate netmask-eth0. The only problem is when running a cobbler sync, /etc/dhcpd.conf is regenerated with the deprecated subnet value instead of the value I set for netmask-eth0. Here's the revelant stanza that's produced by cobbler sync from the host I was working with in the original email. host <redacted> { hardware ethernet 78:2b:cb:1e:a0:3d; fixed-address 69.55.48.164; option subnet-mask 255.255.255.224; option routers 69.55.48.129; default-lease-time 21600; max-lease-time 43200; filename "/pxelinux.0"; next-server 10.15.254.5; } 255.255.255.224 = subnet value, 255.255.255.128 = netmask-eth0 value. This causes PXE boots to fail when we need to modify our subnet mask. If netmask-eth0 was used, we'd be in good shape. Is there a way to remove or modify the deprecated subnet field, or a way for dhcpd.conf to use the expected netmask-eth0 value? -Neal On Thu, Jan 26, 2012 at 4:28 PM, Michael DeHaan <michael.deh...@gmail.com<mailto:michael.deh...@gmail.com>> wrote: This was renamed to net mask in a previous version of the app. Looking at the code (item_system.py) if not self.interfaces.has_key(name): self.interfaces[name] = { "mac_address" : "", "mtu" : "", "ip_address" : "", "dhcp_tag" : "", "subnet" : "", # deprecated "netmask" : "", The net mask line needs to be deleted here -- we shouldn't be adding the old field back when making new objects. 5000 imaginary Cobbler points if someone would like to remove it and test that everything's still cool. --Michael On Thursday, January 26, 2012 at 4:21 PM, Neal Shrader wrote: Hello -- I've got a little problem regarding cobbler system netmasks, and interfacing with them through xmlrpc API. I'm using a system that was recently upgraded to cobbler 2.3.1. From what I can tell, the subnet field was deprecated, but I still seem to be getting it in my output, and it's affecting our cobbler syncs. To state it explicitly: === >>> import xmlrpclib >>> cobserver = xmlrpclib.Server("http://127.0.0.1/cobbler_api") >>> cobserver.get_system('1301') {'comment': '', 'status': 'production', 'kickstart': '<<inherit>>', 'name_servers_search': [], 'ks_meta': {}, 'kernel_options_post': {}, 'image': '', 'redhat_management_key': '<<inherit>>', 'power_type': 'ipmitool', 'power_user': '', 'kernel_options': {}, 'name_servers': [], 'mtime': 1327611145.296062, 'template_files': {}, 'gateway': '69.55.48.129', 'uid': 'MTMwNDU0MzM2OC40NjIyNDQwODEuNTEzMTk', 'virt_auto_boot': 0, 'monit_enabled': False, 'virt_cpus': '<<inherit>>', 'mgmt_parameters': '<<inherit>>', 'boot_files': {}, 'hostname': '<redacted>', 'repos_enabled': False, 'mgmt_classes': [], 'power_pass': '', 'netboot_enabled': False, 'ipv6_autoconfiguration': False, 'profile': 'dedicated-centos-5-x86_64', 'virt_type': 'xenpv', 'interfaces': {'eth0': {'ipv6_address': '', 'interface_type': '', 'static': True, 'mtu': '', 'bonding_master': '', 'gateway': '69.55.48.129', 'subnet': '255.255.255.224', 'management': True, 'interface_master': '', 'hostname': '<redacted>', 'filename': '/pxelinux.0', 'mac_address': '78:2b:cb:1e:a0:3d', 'netboot_enabled': False, 'distro': {'comment': '', 'kernel': '/var/lib/cobbler/imgs/centos-5.7-x86_64/vmlinuz', 'uid': 'MTMxNjYxNTg1OC44ODc5ODUxMy44NjIzNDU', 'kernel_options_post': {}, 'redhat_management_key': '<<inherit>>', 'kernel_options': {}, 'redhat_management_server': '<<inherit>>', 'initrd': '/var/lib/cobbler/imgs/centos-5.7-x86_64/initrd.img', 'mtime': 1316615894.2218969, 'template_files': {}, 'ks_meta': {'tree': 'http://yum.realitychecknetwork.com/mirror/centos/5.7/os/x86_64/'<http://yum.realitychecknetwork.com/mirror/centos/5.7/os/x86_64/%27>}, 'boot_files': {}, 'breed': 'redhat', 'os_version': 'rhel5', 'mgmt_classes': ['base'], 'fetchable_files': {}, 'tree_build_time': 0, 'arch': 'x86_64', 'name': 'dedicated-centos-5.7-x86_64', 'owners': ['admin'], 'ctime': 1316615858.881011, 'source_repos': [], 'depth': 0}, 'virt_bridge': 'xenbr0', 'bonding': '', 'bonding_opts': '', 'ipv6_mtu': '', 'ip_address': '69.55.48.164', 'dhcp_tag': '', 'name': '<redacted>', 'static_routes': [], 'ipv6_static_routes': [], 'dns_name': '<redacted>', 'netmask': '255.255.255.128', 'bridge_opts': '', 'ipv6_secondaries': [], 'next_server': '10.15.254.5', 'ipv6_default_gateway': ''}}, 'virt_path': '<<inherit>>', 'power_address': '', 'proxy': '<<inherit>>', 'fetchable_files': {}, 'virt_file_size': '<<inherit>>', 'ldap_enabled': False, 'ipv6_default_device': '', 'ctime': 1304543368.45784, 'virt_disk_driver': '<<inherit>>', 'owners': ['admin'], 'name': '1301', 'virt_ram': '<<inherit>>', 'power_id': '', 'server': '<<inherit>>', 'redhat_management_server': '<<inherit>>', 'depth': 2, 'ldap_type': 'authconfig', 'template_remote_kickstarts': 0} >>> === Note in the above I have a netmask = 255.255.255.128 which is associated with the interface (eth0). I also seem to have a "subnet" value which is set to 255.255.255.224. I can modify the interface netmask fine: === >>> token = cobserver.login(USERNAME,PASSWORD) >>> handle = cobserver.get_system_handle('1301',token) >>> >>> cobserver.modify_system(handle, 'modify_interface', { "netmask-eth0" : >>> "255.255.255.252" }, token ) True >>> >>> cobserver.get_system('1301') {'comment': '', 'status': 'production', 'kickstart': '<<inherit>>', 'name_servers_search': [], 'ks_meta': {}, 'kernel_options_post': {}, 'image': '', 'redhat_management_key': '<<inherit>>', 'power_type': 'ipmitool', 'power_user': '', 'kernel_options': {}, 'name_servers': [], 'mtime': 1327611145.296062, 'template_files': {}, 'gateway': '69.55.48.129', 'uid': 'MTMwNDU0MzM2OC40NjIyNDQwODEuNTEzMTk', 'virt_auto_boot': 0, 'monit_enabled': False, 'virt_cpus': '<<inherit>>', 'mgmt_parameters': '<<inherit>>', 'boot_files': {}, 'hostname': '<redacted>', 'repos_enabled': False, 'mgmt_classes': [], 'power_pass': '', 'netboot_enabled': False, 'ipv6_autoconfiguration': False, 'profile': 'dedicated-centos-5-x86_64', 'virt_type': 'xenpv', 'interfaces': {'eth0': {'ipv6_address': '', 'interface_type': '', 'static': True, 'mtu': '', 'bonding_master': '', 'gateway': '69.55.48.129', 'subnet': '255.255.255.224', 'management': True, 'interface_master': '', 'hostname': '<redacted>', 'filename': '/pxelinux.0', 'mac_address': '78:2b:cb:1e:a0:3d', 'netboot_enabled': False, 'distro': {'comment': '', 'kernel': '/var/lib/cobbler/imgs/centos-5.7-x86_64/vmlinuz', 'uid': 'MTMxNjYxNTg1OC44ODc5ODUxMy44NjIzNDU', 'kernel_options_post': {}, 'redhat_management_key': '<<inherit>>', 'kernel_options': {}, 'redhat_management_server': '<<inherit>>', 'initrd': '/var/lib/cobbler/imgs/centos-5.7-x86_64/initrd.img', 'mtime': 1316615894.2218969, 'template_files': {}, 'ks_meta': {'tree': 'http://yum.realitychecknetwork.com/mirror/centos/5.7/os/x86_64/'<http://yum.realitychecknetwork.com/mirror/centos/5.7/os/x86_64/%27>}, 'boot_files': {}, 'breed': 'redhat', 'os_version': 'rhel5', 'mgmt_classes': ['base'], 'fetchable_files': {}, 'tree_build_time': 0, 'arch': 'x86_64', 'name': 'dedicated-centos-5.7-x86_64', 'owners': ['admin'], 'ctime': 1316615858.881011, 'source_repos': [], 'depth': 0}, 'virt_bridge': 'xenbr0', 'bonding': '', 'bonding_opts': '', 'ipv6_mtu': '', 'ip_address': '69.55.48.164', 'dhcp_tag': '', 'name': '<redacted>', 'static_routes': [], 'ipv6_static_routes': [], 'dns_name': '<redacted>', 'netmask': '255.255.255.252', 'bridge_opts': '', 'ipv6_secondaries': [], 'next_server': '10.15.254.5', 'ipv6_default_gateway': ''}}, 'virt_path': '<<inherit>>', 'power_address': '', 'proxy': '<<inherit>>', 'fetchable_files': {}, 'virt_file_size': '<<inherit>>', 'ldap_enabled': False, 'ipv6_default_device': '', 'ctime': 1304543368.45784, 'virt_disk_driver': '<<inherit>>', 'owners': ['admin'], 'name': '1301', 'virt_ram': '<<inherit>>', 'power_id': '', 'server': '<<inherit>>', 'redhat_management_server': '<<inherit>>', 'depth': 2, 'ldap_type': 'authconfig', 'template_remote_kickstarts': 0} === However that other subnet value, I don't seem to have a way to edit or remove that I'm aware of. The problem with this is when I attempt to cobbler sync, dhcpd.conf is updated with that global subnet value instead of the netmask value that I set myself. How do I remove or edit the incorrect subnet value? Am I doing something wrong, or is this a bug? Thank you for looking! -Neal _______________________________________________ cobbler mailing list cobbler@lists.fedorahosted.org<mailto:cobbler@lists.fedorahosted.org> https://fedorahosted.org/mailman/listinfo/cobbler _______________________________________________ cobbler mailing list cobbler@lists.fedorahosted.org<mailto:cobbler@lists.fedorahosted.org> https://fedorahosted.org/mailman/listinfo/cobbler ******************************************************* This message (including any files transmitted with it) may contain confidential and/or proprietary information, is the property of Interactive Data Corporation and/or its subsidiaries, and is directed only to the addressee(s). If you are not the designated recipient or have reason to believe you received this message in error, please delete this message from your system and notify the sender immediately. An unintended recipient's disclosure, copying, distribution, or use of this message or any attachments is prohibited and may be unlawful. *******************************************************
_______________________________________________ cobbler mailing list cobbler@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/cobbler