cybertron / openstack-virtual-baremetal

Tools for using OpenStack instances as baremetal deployment targets
20 stars 19 forks source link

build json with server.id instead of port name #10

Closed matbu closed 8 years ago

matbu commented 8 years ago

If port name is empty then nodes.json could be wrong

matbu commented 8 years ago

Hi Ben,

Sorry for the delay. Yes the bug is 100% reproducible, on devstack and OSP clouds. But i'm not sure it's a heat bug, i think it's more a bug design of the templates. Because the Bmc instance is created in the virtual-baremetal.yaml file, then the virtual-baremetal-servers.yaml is iterate in regards of the node_count. There, heat will create 2 ports named bmc_x, but once the x ports gets created, they will never attached to the bmc, except if we specify the resource of the created ports to the bmc instance. But since we don't know how many ports which has been created, we can't iterate here for attaching those ports the bmc instance.

Btw the settings of the network for the bmc is wrong, it assume that the bmc instance will have always 2 ports on the private network. If the node_count value is 3 for example, the bmc will only have 2 ports attached to the private network. I think a depoyment with more than 2 nodes will failed.

I'm wondering of a change for fixing this...

cybertron commented 8 years ago

Oh, okay, I just realized while looking at the templates for something else that what you described is exactly what is supposed to happen. Two anonymous ports get attached to the instance, and the other ports are only created to make use of Neutron for IPAM. The bmc install script then assigns the named ports to the second interface on the BMC so it will be listening on those addresses.

So the first port attached to the BMC is just an access address that should work regardless of what happens with the post-deploy configuration and is not used for IPMI, and the second port is unused, except as a NIC to bind the named ports to.

However, I think I've been able to look at this environment and it appears other things are wrong. I believe you were copied on a private email discussing it. We should probably resolve the other issues before pursuing this change.

cybertron commented 8 years ago

Okay, I think the problems this was trying to address have been resolved, so I'm going to close it out. Please feel free to re-submit any of the changes that you think should still go in. Thanks.