← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1573337] Re: Neutron-LBaaS v2 in Mitaka: loadbalancer_dbv2.get_loadbalancers() fails with NoReferencedTableError

 

[Expired for neutron because there has been no activity for 60 days.]

** Changed in: neutron
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1573337

Title:
  Neutron-LBaaS v2 in Mitaka: loadbalancer_dbv2.get_loadbalancers()
  fails with NoReferencedTableError

Status in neutron:
  Expired

Bug description:
  I was calling get_loadbalancers() function from "/opt/stack/neutron-
  lbaas/neutron_lbaas/db/loadbalancer/loadbalancer_dbv2.py" in my driver
  to get context of loadbalancers.

  My enviroment is devstack on a ubuntu 14.04 machine with all
  stable/mitaka repos. This problem didn't occur when I worked with
  liberty.

  the error msgs are listed below:

  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/opt/stack/neutron-lbaas/neutron_lbaas/db/loadbalancer/loadbalancer_dbv2.py", line 267, in get_loadbalancers
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     for lb_db in lb_dbs]
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/opt/stack/neutron-lbaas/neutron_lbaas/services/loadbalancer/data_models.py", line 96, in from_sqlalchemy_model
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     calling_classes=calling_classes + [cls]))
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/opt/stack/neutron-lbaas/neutron_lbaas/services/loadbalancer/data_models.py", line 96, in from_sqlalchemy_model
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     calling_classes=calling_classes + [cls]))
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/opt/stack/neutron-lbaas/neutron_lbaas/services/loadbalancer/data_models.py", line 84, in from_sqlalchemy_model
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     attr = getattr(sa_model, attr_name)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py", line 237, in
  __get__
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     return self.impl.get(instance_state(instance), dict_)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/attributes.py", line 583, in get
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     value = self.callable_(state, passive)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/strategies.py", line 532, in _load_for_state
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     return self._emit_lazyload(session, state, ident_key, passive)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "<string>", line 1, in <lambda>
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/strategies.py", line 602, in _emit_lazyload
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     result = q.all()
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2588, in all
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     return list(self)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2732, in __iter__
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     context = self._compile_context()
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 3196, in _compile_context
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     entity.setup_context(self, context)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 3565, in setup_context
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     polymorphic_discriminator=self._polymorphic_discriminator)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/loading.py", line 255, in _setup_entity_query
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     **kw
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/interfaces.py", line 505, in setup
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     strat.setup_query(context, entity, path, loader, adapter, **kwargs)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/strategies.py", line 1156, in setup_query
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     chained_from_outerjoin=chained_from_outerjoin)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/loading.py", line 255, in _setup_entity_query
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     **kw
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/interfaces.py", line 505, in
  setup
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     strat.setup_query(context, entity, path, loader, adapter, **kwargs)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/strategies.py", line 1156, in setup_query
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     chained_from_outerjoin=chained_from_outerjoin)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/loading.py", line 255, in _setup_entity_query
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     **kw
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/interfaces.py", line 505, in setup
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     strat.setup_query(context, entity, path, loader, adapter, **kwargs)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/orm/strategies.py", line 147, in setup_query
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     c = adapter.columns[c]
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/util.py", line 571, in __getitem__
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     return self.columns[key]
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/_collections.py", line 728, in __missing__
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     self[key] = val = self.creator(key)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/util.py", line 591, in _locate_col
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     c = ClauseAdapter.traverse(self, col)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line 207, in traverse
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     return replacement_traverse(obj, self.__traverse_options__, replace)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line 327, in replacement_traverse
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     obj = clone(obj, **opts)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line 316, in clone
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     newelem = replace(elem)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/visitors.py", line 204, in replace
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     e = v.replace(elem)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/util.py", line 502, in replac
  e
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     return self._corresponding_column(col, True)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/util.py", line 479, in _corresponding_column
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     require_embedded=require_embedded)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/selectable.py", line 476, in corresponding_column
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     if self.c.contains_column(column):
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 754, in __get__
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     obj.__dict__[self.__name__] = result = self.fget(obj)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/selectable.py", line 552, in columns
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     self._populate_column_collection()
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/selectable.py", line 1125, in _populate_column_collection
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     col._make_proxy(self)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/schema.py", line 1365, in _make_proxy
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     for f in self.foreign_keys]
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 754, in __get__
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     obj.__dict__[self.__name__] = result = self.fget(obj)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher   File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/schema.py", line 1792, in column
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher     tablekey)
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher NoReferencedTableError: Foreign key associated with column 'lbaas_loadbalancers.flavor_id' could not find table 'flavors' with which to generate a foreign key to target column 'id'
  2016-04-20 18:06:09.351 16077 ERROR oslo_messaging.rpc.dispatcher

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1573337/+subscriptions


References