Make VM and wfagent names appear as node names in the Capnet Protocol.
This was tonight's adventure. Holy cow. I feel like I need to go take a shower. Apparently, despite the fact that Neutron and Nova have coexisted for many years, Nova VMs have a hostname that doesn't resolve to anything, and that Neutron knows nothing about. This causes all kinds of local hangups (i.e., sudo, ssh UseDNS), but ok, whatever. Neutron has its own "DNS" names for the VMs; Nova has its own. They don't share info. For us, it matters because we want the tenants to be able to create VMs and wfagents with meaningful names, and have those names returned to the Capnet Protocol as the node names. Well, Neutron and Nova do not share this information. The real way to solve this is to ask Nova for the VM name from the Capnet Neutron agent, when said agent sees a port binding update. But we want to process those pretty fast, and calling out to Keystone/Nova for a lookup on the hot path is quite undesirable. So instead, since we already have a Capnet-specific binding update call that pushes local OVS dpid and ofportno from the local node to the controller (which distributes it to whichever Capnet agents are writing metadata files), if we can "find" a nova VM name locally, we add that to the binding, and then the Neutron server adds the name to the ports table in the DB. Currently, we find this by whacking through the libvirt.xml until we find an instance who owns the device_name we are sending the binding update for. It seems that the Neutron people have already staged in db schema changes to support their pending new DNS feature. This is coming, but it's not here yet. So we can use the new table field, but the Neutron-Nova DNS thing doesn't exist in Liberty. Eventually, Nova will tell Neutron the name of the port and other DNS information.
Showing with 104 additions and 2 deletions