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/'}, 
'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'
 : [], 'd
ns_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/'}, 
'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'
 : [], 'd
ns_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
> [email protected] (mailto:[email protected])
> https://fedorahosted.org/mailman/listinfo/cobbler
> 
> 


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

Reply via email to