Stick 'pxe' role to physical interface

* add 'pxe' property to the nic db model
* collect 'pxe' property during the
  bootstrap stage
* forbid to assign admin net to non pxe interfaces
* allow to assign admin net only to bond interface
  what containing pxe interface

Change-Id: I70dcaed66607728b76ae3d93c59048c310ddb22c
Implements: blueprint admin-network-on-bond
This commit is contained in:
Valyavskiy Viacheslav 2015-07-01 16:23:27 +03:00
parent 39d4b921e5
commit c8dd7ad0a7
1 changed files with 2 additions and 0 deletions

2
agent
View File

@ -206,6 +206,7 @@ class NodeAgent
:memory => (_dmi_memory or _ohai_memory),
}
admin_mac = _master_ip_and_mac[:mac] rescue nil
begin
(@os[:network][:interfaces] or {} rescue {}).each do |int, intinfo|
# Send info about physical interfaces only
@ -220,6 +221,7 @@ class NodeAgent
(intinfo[:addresses] or {} rescue {}).each do |addr, addrinfo|
if (addrinfo[:family] rescue nil) =~ /lladdr/
int_meta[:mac] = addr
int_meta[:pxe] = admin_mac == int_meta[:mac]
begin
int_info = Rethtool::InterfaceSettings.new(int)
int_meta[:driver] = int_info.driver