Session's persistent objects across transactions create inconsistency
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Group Based Policy |
Fix Released
|
High
|
Ivar Lazzaro |
Bug Description
In GBP, we happen to run many consecutive transactions using the same session object (when calling Neutron's plugins for creating implicit objects for example).
This can sometimes create inconsistencies between what is persisted in the session and the actual DB state. using expunge_all() before such operations will make sure that the session object will refresh its state.
An example is what sporadically happens with the following UT:
gbp.neutron.
gbp.neutron.
_StringException: Empty attachments:
pythonlogging
stderr
stdout
pythonlogging:'': {{{
2014-12-19 20:04:23,280 INFO [neutron.manager] Loading core plugin: gbp.neutron.
2014-12-19 20:04:23,281 INFO [neutron.manager] Loading Plugin: gbp.neutron.
2014-12-19 20:04:23,281 INFO [gbp.neutron.
2014-12-19 20:04:23,282 INFO [gbp.neutron.
2014-12-19 20:04:23,282 INFO [gbp.neutron.
2014-12-19 20:04:23,282 INFO [gbp.neutron.
2014-12-19 20:04:23,283 INFO [gbp.neutron.
2014-12-19 20:04:23,283 INFO [gbp.neutron.
2014-12-19 20:04:23,283 INFO [gbp.neutron.
2014-12-19 20:04:23,284 INFO [gbp.neutron.
2014-12-19 20:04:23,284 INFO [neutron.manager] Loading Plugin: router
2014-12-19 20:04:23,285 INFO [neutron.
2014-12-19 20:04:23,285 INFO [neutron.manager] Loading Plugin: gbp.neutron.
2014-12-19 20:04:23,286 INFO [gbp.neutron.
2014-12-19 20:04:23,286 INFO [gbp.neutron.
2014-12-19 20:04:23,286 INFO [gbp.neutron.
2014-12-19 20:04:23,286 INFO [gbp.neutron.
2014-12-19 20:04:23,310 INFO [neutron.
2014-12-19 20:04:23,313 WARNING [neutron.quota] security_group is already registered.
2014-12-19 20:04:23,314 WARNING [neutron.quota] security_group_rule is already registered.
2014-12-19 20:04:23,322 WARNING [neutron.quota] router is already registered.
2014-12-19 20:04:23,323 WARNING [neutron.quota] floatingip is already registered.
2014-12-19 20:04:24,055 WARNING [gbp.neutron.
2014-12-19 20:04:24,069 WARNING [gbp.neutron.
2014-12-19 20:04:24,508 WARNING [neutron.
2014-12-19 20:04:24,611 WARNING [gbp.neutron.
2014-12-19 20:04:24,639 WARNING [gbp.neutron.
2014-12-19 20:04:25,075 WARNING [neutron.
2014-12-19 20:04:25,198 WARNING [gbp.neutron.
2014-12-19 20:04:25,217 WARNING [gbp.neutron.
}}}
Traceback (most recent call last):
File "gbp/neutron/
self.
File "gbp/neutron/
"Rule not found, expected:\n%s" % rule)
File "/home/
raise self.failureExc
AssertionError: False is not true : Rule not found, expected:
{'direction': ['ingress'], 'protocol': [u'tcp'], 'remote_ip_prefix': [u'10.0.0.64/26'], 'port_range_max': [8080], 'security_
Also see the logs here:
http://
Changed in group-based-policy: | |
status: | Confirmed → In Progress |
Changed in group-based-policy: | |
milestone: | 2014.2rc2 → kilo-gbp-1 |
Changed in group-based-policy: | |
importance: | Critical → High |
Changed in group-based-policy: | |
milestone: | kilo-gbp-1 → kilo-gbp-2 |
Changed in group-based-policy: | |
milestone: | kilo-gbp-2 → kilo-gbp-3 |
summary: |
- Resource Mapping driver UT breaking gate + Session's persistent objects across transactions create inconsistency |
description: | updated |
Changed in group-based-policy: | |
milestone: | kilo-gbp-3 → kilo-gbp-4 |
Changed in group-based-policy: | |
status: | Fix Committed → Fix Released |
Fix proposed to branch: master /review. openstack. org/143220
Review: https:/