When 1 datasource driver fails to load, say due to a bug, ideally the failure is contained and does not affect other functionality. But right now listing of drivers fail due to synchronizer.
Bug produced by introducing an error in murano_driver (any driver) into Congress (commit d2877b3db075ed045b87f5f25b350422011c9ed3), then running the following:
$ openstack congress datasource list
Internal server error (HTTP 500) (Request-ID: req-5ef047f7-971b-46b7-913b-e8ce65ca156d)
log:
2016-03-30 16:23:21.365 [00;36mINFO congress.api.application [[01;36mreq-5ef047f7-971b-46b7-913b-e8ce65ca156d [00;36madmin 7d641847cd9c489c8544b49d39c6f774[00;36m] [01;35m[00;36mHandling request 'GET /v1/data-sources' with CollectionHandler(/v1/data-sources$)[00m
2016-03-30 16:23:21.369 [00;32mDEBUG Synchronizer [[01;36mreq-5ef047f7-971b-46b7-913b-e8ce65ca156d [00;36madmin 7d641847cd9c489c8544b49d39c6f774[00;32m] [01;35m[00;32mSynchronizing running datasources[00m [00;33mfrom (pid=22461) synchronize_datasources /opt/stack/congress/congress/synchronizer.py:126[00m
2016-03-30 16:23:21.372 [00;36mINFO Synchronizer [[01;36mreq-5ef047f7-971b-46b7-913b-e8ce65ca156d [00;36madmin 7d641847cd9c489c8544b49d39c6f774[00;36m] [01;35m[00;36mConfigured datasource is not active, adding: {'description': None, 'enabled': True, 'driver': u'murano', 'config': {u'username': u'admin', u'tenant_name': u'admin', u'auth_url': u'http://192.168.218.145:5000/v2.0', u'password': u'***', u'poll_time': u'10'}, 'type': None, 'id': u'15665978-a351-4002-9122-ea8b87ba8917', 'name': u'murano'}[00m
2016-03-30 16:23:21.372 [00;32mDEBUG congress.managers.datasource [[01;36mreq-5ef047f7-971b-46b7-913b-e8ce65ca156d [00;36madmin 7d641847cd9c489c8544b49d39c6f774[00;32m] [01;35m[00;32madding datasource murano[00m [00;33mfrom (pid=22461) add_datasource /opt/stack/congress/congress/managers/datasource.py:65[00m
2016-03-30 16:23:21.372 [00;32mDEBUG congress.managers.datasource [[01;36mreq-5ef047f7-971b-46b7-913b-e8ce65ca156d [00;36madmin 7d641847cd9c489c8544b49d39c6f774[00;32m] [01;35m[00;32mcreating policy murano[00m [00;33mfrom (pid=22461) add_datasource /opt/stack/congress/congress/managers/datasource.py:82[00m
2016-03-30 16:23:21.373 [01;31mERROR congress.api.application [[01;36mreq-5ef047f7-971b-46b7-913b-e8ce65ca156d [00;36madmin 7d641847cd9c489c8544b49d39c6f774[01;31m] [01;35m[01;31mException caught for request: GET /v1/data-sources HTTP/1.0
Accept: application/json
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Type: text/plain
Host: 192.168.218.145:1789
User-Agent: python-congressclient
X-Auth-Token: 7ac787ae382141b5bf7d4d54bb773592
X-Domain-Id: None
X-Domain-Name: None
X-Identity-Status: Confirmed
X-Project-Domain-Id: default
X-Project-Domain-Name: Default
X-Project-Id: 7d641847cd9c489c8544b49d39c6f774
X-Project-Name: admin
X-Role: admin
X-Roles: admin
X-Service-Catalog: [{"endpoints": [{"adminURL": "http://192.168.218.145:9292", "region": "RegionOne", "internalURL": "http://192.168.218.145:9292", "publicURL": "http://192.168.218.145:9292"}], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://192.168.218.145:8004/v1/7d641847cd9c489c8544b49d39c6f774", "region": "RegionOne", "internalURL": "http://192.168.218.145:8004/v1/7d641847cd9c489c8544b49d39c6f774", "publicURL": "http://192.168.218.145:8004/v1/7d641847cd9c489c8544b49d39c6f774"}], "type": "orchestration", "name": "heat"}, {"endpoints": [{"adminURL": "http://192.168.218.145:6385", "region": "RegionOne", "internalURL": "http://192.168.218.145:6385", "publicURL": "http://192.168.218.145:6385"}], "type": "baremetal", "name": "ironic"}, {"endpoints": [{"adminURL": "http://192.168.218.145:8082", "region": "RegionOne", "internalURL": "http://192.168.218.145:8082", "publicURL": "http://192.168.218.145:8082"}], "type": "application-catalog", "name": "murano"}, {"endpoints": [{"adminURL": "http://192.168.218.145:8000/v1", "region": "RegionOne", "internalURL": "http://192.168.218.145:8000/v1", "publicURL": "http://192.168.218.145:8000/v1"}], "type": "cloudformation", "name": "heat-cfn"}, {"endpoints": [{"adminURL": "http://192.168.218.145:8080", "region": "RegionOne", "internalURL": "http://192.168.218.145:8080/v1/AUTH_7d641847cd9c489c8544b49d39c6f774", "publicURL": "http://192.168.218.145:8080/v1/AUTH_7d641847cd9c489c8544b49d39c6f774"}], "type": "object-store", "name": "swift"}, {"endpoints": [{"adminURL": "http://192.168.218.145:8774/v2/7d641847cd9c489c8544b49d39c6f774", "region": "RegionOne", "internalURL": "http://192.168.218.145:8774/v2/7d641847cd9c489c8544b49d39c6f774", "publicURL": "http://192.168.218.145:8774/v2/7d641847cd9c489c8544b49d39c6f774"}], "type": "compute_legacy", "name": "nova_legacy"}, {"endpoints": [{"adminURL": "http://192.168.218.145:8774/v2.1/7d641847cd9c489c8544b49d39c6f774", "region": "RegionOne", "internalURL": "http://192.168.218.145:8774/v2.1/7d641847cd9c489c8544b49d39c6f774", "publicURL": "http://192.168.218.145:8774/v2.1/7d641847cd9c489c8544b49d39c6f774"}], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://192.168.218.145:8776/v2/7d641847cd9c489c8544b49d39c6f774", "region": "RegionOne", "internalURL": "http://192.168.218.145:8776/v2/7d641847cd9c489c8544b49d39c6f774", "publicURL": "http://192.168.218.145:8776/v2/7d641847cd9c489c8544b49d39c6f774"}], "type": "volumev2", "name": "cinderv2"}, {"endpoints": [{"adminURL": "http://192.168.218.145:35357/v2.0", "region": "RegionOne", "internalURL": "http://192.168.218.145:5000/v2.0", "publicURL": "http://192.168.218.145:5000/v2.0"}], "type": "identity", "name": "keystone"}, {"endpoints": [{"adminURL": "http://192.168.218.145:1789/", "region": "RegionOne", "internalURL": "http://192.168.218.145:1789/", "publicURL": "http://192.168.218.145:1789/"}], "type": "policy", "name": "congress"}, {"endpoints": [{"adminURL": "http://192.168.218.145:9696/", "region": "RegionOne", "internalURL": "http://192.168.218.145:9696/", "publicURL": "http://192.168.218.145:9696/"}], "type": "network", "name": "neutron"}, {"endpoints": [{"adminURL": "http://192.168.218.145:8776/v1/7d641847cd9c489c8544b49d39c6f774", "region": "RegionOne", "internalURL": "http://192.168.218.145:8776/v1/7d641847cd9c489c8544b49d39c6f774", "publicURL": "http://192.168.218.145:8776/v1/7d641847cd9c489c8544b49d39c6f774"}], "type": "volume", "name": "cinder"}]
X-Tenant: admin
X-Tenant-Id: 7d641847cd9c489c8544b49d39c6f774
X-Tenant-Name: admin
X-User: admin
X-User-Domain-Id: default
X-User-Domain-Name: Default
X-User-Id: ef9b882b8aef4d998b94165024d20401
X-User-Name: admin[00m
2016-03-30 16:23:21.373 [01;31mERROR congress.api.application [[01;36mreq-5ef047f7-971b-46b7-913b-e8ce65ca156d [00;36madmin 7d641847cd9c489c8544b49d39c6f774[01;31m] [01;35m[01;31mTraceback (most recent call last):
File "/opt/stack/congress/congress/api/application.py", line 51, in __call__
response = handler.handle_request(request)
File "/opt/stack/congress/congress/api/webservice.py", line 404, in handle_request
return self.list_members(request)
File "/opt/stack/congress/congress/api/webservice.py", line 430, in list_members
context=self._get_context(request))
File "/opt/stack/congress/congress/api/datasource_model.py", line 74, in get_items
self.synchronizer.synchronize_datasources()
File "/opt/stack/congress/congress/synchronizer.py", line 161, in synchronize_datasources
update_db=False)
File "/opt/stack/congress/congress/managers/datasource.py", line 88, in add_datasource
raise exception.DatasourceNameInUse(value=req['name'])
DatasourceNameInUse: Datasource already in use with name murano
Fix proposed to branch: master /review. openstack. org/329772
Review: https:/