Comment 0 for bug 1549068

Revision history for this message
Zhenguo Niu (niu-zglinux) wrote :

when booting an ironic instance with multi networks, we create the network resources with the macs get from ironic node ports, and then set the neutron port id back to ironic port's extra/vif_port_id, but the current logic will lead the vif-pif ids pair mismatch.

code:

for vif, pif in zip(network_info, ports):
    port_id = six.text_type(vif['id'])
    patch = [{'op': 'add',
                       'path': '/extra/vif_port_id',
                       'value': port_id}]
    self.ironicclient.call("port.update", pif.uuid, patch)

we should check whether the mac addresses match between vif and pif before setting the 'vif_port_id'.