Merge lp:~gandelman-a/ubuntu/precise/cobbler-enlist/868492 into lp:ubuntu/precise/cobbler-enlist
Status: | Merged |
---|---|
Merge reported by: | Dave Walker |
Merged at revision: | not available |
Proposed branch: | lp:~gandelman-a/ubuntu/precise/cobbler-enlist/868492 |
Merge into: | lp:ubuntu/precise/cobbler-enlist |
Diff against target: |
441 lines (+238/-75) 4 files modified
cobbler-enlist.c (+32/-15) cobbler-enlist.h (+168/-40) cobbler-xmlrpc.h (+30/-20) debian/changelog (+8/-0) |
To merge this branch: | bzr merge lp:~gandelman-a/ubuntu/precise/cobbler-enlist/868492 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Dave Walker (community) | Approve | ||
Review via email: mp+80642@code.launchpad.net |
Description of the change
Register all valid network interfaces when enlisting (LP: #868492)
This converts enlister->netif to a linked-list (enlister->netifs). Each node
of the LL is of struct netif, which contains an interface name and macaddr.
Any number of interfaces can be supplied via the command line. Each interface
is appended to the link list as a struct netif with the macaddr left NULL.
If no interfaces are supplied via argv, the list is populated with every
interface on the system (the macaddr for each left NULL).
What is contained in the enlister->netifs list is then verified. In the event
a non-existent interface was supplied via argv, it is removed from the list.
If enlister->netifs is empty (ie, none of the interfaces supplied actually
exist), die.
Nodes remaining in enlister->netifs get their mac addr's populated via ioctl.
Non-standard devices (ie, bridges not backed by any device) may contain a bad
mac addr, these are skipped. After populating, error out if the list does not
contain at least one valid mac address.
During system registration, loop over enlister->netifs and register each device.
On the cobbler side, the system ends up with something like:
# cobbler system dumpvars --name=testnode | grep mac_address_
mac_address_eth0 : 90:e6:ba:54:93:b9
mac_address_eth1 : 00:04:5a:5e:62:5f
mac_address_
mac_address_vnet0 : fe:16:3e:3e:a9:1a
mac_address_vnet1 : fe:54:00:4d:7e:a0
Cobbler will serve the profile via netboot to any of the interfaces.
We should keep an option to select specific interfaces, both on install and run-time. There are environments where strict separation of interface usage is enforced, and selecting all interfaces will trigger an audit finding.