[openstack-dev] [neutron] Reading an updated port's fixed IPs in mech driver update_port_postcommit
Neil.Jerram at metaswitch.com
Tue Jul 7 12:35:58 UTC 2015
I think there's something I'm not understanding about how Neutron's DB
tables are related, and when one can safely read
believed-to-be-committed information from them...
My project's mechanism driver is handling a port update in which the
fixed IPs are changing; specifically, a second fixed IP has been added
to the port. It does this (for a reason I can explain if needed) by
calling db.get_port(), in the update_port_postcommit hook.
But we observe that the result of db.get_port() does not include the new
fixed IP. Even though we're in the postcommit hook, and hence we assume
that all the changes for that port have by now been committed.
What are we misunderstanding here? My guess is that this is something
to do with 'fixed_ips' not being a column directly in the Ports table,
but instead calculated from relationships between the port ID and
another (IPAllocation) table. We've seen a similar problem in the past
with binding:host_id, for which the same is true, i.e. info is in the
separate portbindings table.
Or could it be that the transaction hasn't really been closed yet, when
update_port_postcommit hook is called?
(This is with Icehouse-level code, so it could be something that's been
More information about the OpenStack-dev