yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #73401
[Bug 1777908] [NEW] Ensure _get_changed_synthetic_fields() return updatable fields - breaks consumers
Public bug reported:
It appears the landing of [1] into stable/queens has broken some
consumers, at least vmware-nsx.
When running with [1] in neutron/queens, we now get:
----
security_group_rule is already registered
Loaded quota_driver: <neutron.db.quota.driver.DbQuotaDriver object at 0x7fd805e1e750>.
Loaded quota_driver: <neutron.db.quota.driver.DbQuotaDriver object at 0x7ff8b1e0c790>.
create failed: No details.: DetachedInstanceError: Parent instance <SecurityGroup at 0x7fd804039f10> is not bound to a Session; lazy load operation of attribute 'ext_properties' cannot proceed (Background on this error at: http://sqlalche.me/e/bhk3)
Traceback (most recent call last):
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/api/v2/resource.py", line 98, in resource
result = method(request=request, **args)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/api/v2/base.py", line 425, in create
return self._create(request, body, **kwargs)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/db/api.py", line 91, in wrapped
setattr(e, '_RETRY_EXCEEDED', True)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
self.force_reraise()
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
six.reraise(self.type_, self.value, self.tb)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/db/api.py", line 87, in wrapped
return f(*args, **kwargs)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_db/api.py", line 154, in wrapper
ectxt.value = e.inner_exc
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
self.force_reraise()
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
six.reraise(self.type_, self.value, self.tb)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_db/api.py", line 142, in wrapper
return f(*args, **kwargs)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/db/api.py", line 126, in wrapped
LOG.debug("Retry wrapper got retriable exception: %s", e)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
self.force_reraise()
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
six.reraise(self.type_, self.value, self.tb)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/db/api.py", line 122, in wrapped
return f(*dup_args, **dup_kwargs)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/api/v2/base.py", line 539, in _create
obj = do_create(body)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/api/v2/base.py", line 521, in do_create
request.context, reservation.reservation_id)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
self.force_reraise()
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
six.reraise(self.type_, self.value, self.tb)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/api/v2/base.py", line 514, in do_create
return obj_creator(request.context, **kwargs)
File "vmware_nsx/tests/unit/extensions/test_provider_security_groups.py", line 53, in create_security_group
context, security_group)
File "vmware_nsx/db/extended_security_group.py", line 77, in create_provider_security_group
context, security_group, False, True)
File "vmware_nsx/db/extended_security_group.py", line 107, in create_security_group_without_rules
secgroup_dict = self._make_security_group_dict(sg)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/db/securitygroups_db.py", line 280, in _make_security_group_dict
security_group.db_obj)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/db/_resource_extend.py", line 75, in apply_funcs
resolved_func(response, db_object)
File "vmware_nsx/db/extended_security_group.py", line 348, in _extend_security_group_with_properties
if sg_db.ext_properties:
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 242, in __get__
return self.impl.get(instance_state(instance), dict_)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 599, in get
value = self.callable_(state, passive)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/strategies.py", line 596, in _load_for_state
(orm_util.state_str(state), self.key)
DetachedInstanceError: Parent instance <SecurityGroup at 0x7fd804039f10> is not bound to a Session; lazy load operation of attribute 'ext_properties' cannot proceed (Background on this error at: http://sqlalche.me/e/bhk3)
{0} vmware_nsx.tests.unit.extensions.test_provider_security_groups.ProviderSecurityGroupExtTestCase.test_create_provider_security_groups_same_tenant [0.806920s] ... FAILED
----
If I manually revert [1] in neutron/queens of my workspace, the test passes.
ATM I'm only testing locally; working on a sample patch for the gate to reference here.
Is there a way we can do [1] without breaking consumers?
[1] https://review.openstack.org/#/c/573617/
** Affects: neutron
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1777908
Title:
Ensure _get_changed_synthetic_fields() return updatable fields -
breaks consumers
Status in neutron:
New
Bug description:
It appears the landing of [1] into stable/queens has broken some
consumers, at least vmware-nsx.
When running with [1] in neutron/queens, we now get:
----
security_group_rule is already registered
Loaded quota_driver: <neutron.db.quota.driver.DbQuotaDriver object at 0x7fd805e1e750>.
Loaded quota_driver: <neutron.db.quota.driver.DbQuotaDriver object at 0x7ff8b1e0c790>.
create failed: No details.: DetachedInstanceError: Parent instance <SecurityGroup at 0x7fd804039f10> is not bound to a Session; lazy load operation of attribute 'ext_properties' cannot proceed (Background on this error at: http://sqlalche.me/e/bhk3)
Traceback (most recent call last):
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/api/v2/resource.py", line 98, in resource
result = method(request=request, **args)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/api/v2/base.py", line 425, in create
return self._create(request, body, **kwargs)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/db/api.py", line 91, in wrapped
setattr(e, '_RETRY_EXCEEDED', True)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
self.force_reraise()
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
six.reraise(self.type_, self.value, self.tb)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/db/api.py", line 87, in wrapped
return f(*args, **kwargs)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_db/api.py", line 154, in wrapper
ectxt.value = e.inner_exc
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
self.force_reraise()
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
six.reraise(self.type_, self.value, self.tb)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_db/api.py", line 142, in wrapper
return f(*args, **kwargs)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/db/api.py", line 126, in wrapped
LOG.debug("Retry wrapper got retriable exception: %s", e)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
self.force_reraise()
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
six.reraise(self.type_, self.value, self.tb)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/db/api.py", line 122, in wrapped
return f(*dup_args, **dup_kwargs)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/api/v2/base.py", line 539, in _create
obj = do_create(body)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/api/v2/base.py", line 521, in do_create
request.context, reservation.reservation_id)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
self.force_reraise()
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
six.reraise(self.type_, self.value, self.tb)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/api/v2/base.py", line 514, in do_create
return obj_creator(request.context, **kwargs)
File "vmware_nsx/tests/unit/extensions/test_provider_security_groups.py", line 53, in create_security_group
context, security_group)
File "vmware_nsx/db/extended_security_group.py", line 77, in create_provider_security_group
context, security_group, False, True)
File "vmware_nsx/db/extended_security_group.py", line 107, in create_security_group_without_rules
secgroup_dict = self._make_security_group_dict(sg)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/db/securitygroups_db.py", line 280, in _make_security_group_dict
security_group.db_obj)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/src/neutron/neutron/db/_resource_extend.py", line 75, in apply_funcs
resolved_func(response, db_object)
File "vmware_nsx/db/extended_security_group.py", line 348, in _extend_security_group_with_properties
if sg_db.ext_properties:
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 242, in __get__
return self.impl.get(instance_state(instance), dict_)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/attributes.py", line 599, in get
value = self.callable_(state, passive)
File "/home/boden/src/vmware-nsx/.tox/py27-dev/local/lib/python2.7/site-packages/sqlalchemy/orm/strategies.py", line 596, in _load_for_state
(orm_util.state_str(state), self.key)
DetachedInstanceError: Parent instance <SecurityGroup at 0x7fd804039f10> is not bound to a Session; lazy load operation of attribute 'ext_properties' cannot proceed (Background on this error at: http://sqlalche.me/e/bhk3)
{0} vmware_nsx.tests.unit.extensions.test_provider_security_groups.ProviderSecurityGroupExtTestCase.test_create_provider_security_groups_same_tenant [0.806920s] ... FAILED
----
If I manually revert [1] in neutron/queens of my workspace, the test passes.
ATM I'm only testing locally; working on a sample patch for the gate to reference here.
Is there a way we can do [1] without breaking consumers?
[1] https://review.openstack.org/#/c/573617/
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1777908/+subscriptions
Follow ups