bulk creation of security group rules fails StaleDataError
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Invalid
|
Low
|
Unassigned |
Bug Description
Concurrently creating (many) security group rules in a security group, either posting concurrently directly to the api, or by using heat fails (on queens) with:
Retry wrapper got retriable exception: UPDATE statement on table 'standardattrib
2018-11-26 12:01:51.917 4605 ERROR oslo_db.api [req-459cb962-
StaleDataError: UPDATE statement on table 'standardattrib
I've written a small script to reproduce this.
https:/
Example usages:
python secruletest.py concurrent --auth-url http://
or
python secruletest.py heat --rules-amount 200 --file-out /tmp/heat.yaml
The heat template is just written not applied, the first example makes a security group named NeutronSecurity
It is reproducible on rdo packstack queens, and also fails on production environment (Ubuntu based queens)
Thank you for your bug report.
As a first step it seems I managed to reproduce the error by running your script in 'concurrent' mode. So I'm setting the status to Confirmed.
$ sudo journalctl -u devstack@ neutron- api --since '10 minutes ago' | egrep 'Retry wrapper got retriable exception' | wc -l 100.109. 0.51/identity/ v3 --username demo --project-name demo --domain-id default --rules-amount 50 neutron- api --since '10 minutes ago' | egrep 'Retry wrapper got retriable exception' | wc -l
0
$python ~/bug-1805132.py concurrent --auth-url http://
# creates 50 secgroup rules
$ sudo journalctl -u devstack@
169