500 error on nova datasource delete
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
congress |
Fix Released
|
Critical
|
Unassigned |
Bug Description
Critical because the error leaves the congress data structure in a corrupted state, causing all further policy changes to error.
I encountered a 500 error on datasource delete.
$ openstack congress policy create policy1
$ openstack congress policy rule create policy1 'execute[
$ openstack congress datasource delete nova
Internal server error (HTTP 500) (Request-ID: req-2f8c2788-
The rule creation is required. Appears to need both the nova reference in the head and the body.
If we continue from the error and continue to create & delete the datasource, the same error occurs.
$ openstack congress datasource create --config username=admin --config tenant_name=admin --config auth_url=http://
+------
| Field | Value |
+------
| config | {u'username': u'admin', u'tenant_name': u'admin', u'auth_url': u'http://
| | u'password', u'poll_time': u'5'} |
| description | None |
| driver | nova |
| enabled | True |
| id | 32760158-
| name | nova |
| type | None |
+------
$ openstack congress datasource delete nova
Internal server error (HTTP 500) (Request-ID: req-cedea388-
But then this strange thing happens:
If I delete and create policy1, and execute the same commands that caused the error the first time, no error occurs.
$ openstack congress datasource create --config username=admin --config tenant_name=admin --config auth_url=http://
+------
| Field | Value |
+------
| config | {u'username': u'admin', u'tenant_name': u'admin', u'auth_url': u'http://
| | u'password', u'poll_time': u'5'} |
| description | None |
| driver | nova |
| enabled | True |
| id | 8ecba93c-
| name | nova |
| type | None |
+------
$ openstack congress policy delete policy1
user@ubuntu:~$ openstack congress policy create policy1
+------
| Field | Value |
+------
| abbreviation | polic |
| description | |
| id | 0a2e97a7-
| kind | nonrecursive |
| name | policy1 |
| owner_id | user |
+------
$ openstack congress policy rule create policy1 'execute[
+------
| Field | Value |
+------
| comment | |
| id | 03cb7e6f-
| name | None |
| rule | execute[
| | nova:flavors(id=id, vcpus=x), |
| | s(x), |
| | q(10, 10) |
+------
$ openstack congress datasource delete nova
But it only seems to work AFTER the error has already occurred. Creating and deleting policy1 on a newly started instance of congress before executing the first script results in the 500 error.
Partial log:
2017-02-08 00:29:18.920 ERROR congress.
File "/opt/stack/
response = handler.
File "/opt/stack/
return self.delete(
File "/opt/stack/
id_, request.params, context=
File "/opt/stack/
timeout=
File "/opt/stack/
caller, name, kwargs, timeout=timeout, local=local)^M
File "/opt/stack/
service, action, kwargs, timeout=timeout, local=local, retry=retry)^M
File "/opt/stack/
result = client.
File "/usr/local/
return self.prepare(
File "/usr/local/
retry=
File "/usr/local/
timeout=
File "/usr/local/
retry=retry)^M
File "/usr/local/
raise result^M
DataServiceErro
Traceback (most recent call last):^M
^M
File "/usr/local/
res = self.dispatcher
^M
File "/usr/local/
return self._do_
^M
File "/usr/local/
result = func(ctxt, **new_args)^M
^M
File "/opt/stack/
return self.ds_
^M
File "/opt/stack/
raise exception.
^M
DataServiceError: failed to synchronize_
Full log attached.
Encountered on commit eff5618aac492b3
summary: |
- 500 error (occasional) on datasource delete + 500 error on nova datasource delete |
description: | updated |
description: | updated |
description: | updated |
Changed in congress: | |
importance: | Undecided → Critical |
description: | updated |
Subsequent delete requests encountered the same error.