telefonicaid / orchestrator

Orchestrator groups all provision operations for IoT Platform that tipically implies several steps or several systems interaction.
GNU Affero General Public License v3.0
5 stars 5 forks source link

Problem Creating service #173

Closed amfgomez closed 6 years ago

amfgomez commented 6 years ago

Hello I am testing the new orchestrator version and I have found an error. the error appear in api and script.

The postman API: URL: http:/XXXXXX:XXXX/v1.0/service The postman body: { "DOMAIN_NAME":"admin_domain", "DOMAIN_ADMIN_USER":"cloud_admin", "DOMAIN_ADMIN_PASSWORD": "somepass", "DOMAIN_ADMIN_TOKEN": "somepass", "NEW_SERVICE_NAME":"test", "NEW_SERVICE_DESCRIPTION":" description", "NEW_SERVICE_ADMIN_USER":"admin_test", "NEW_SERVICE_ADMIN_PASSWORD":"somepass" }

The response: "(500, '')"

The script ./createNewService.py http keystone XXXX admin_domain cloud_admin somepass test dominio_test admin_test somepass http keypass XXXX

The response: time=2018-11-13T10:26:23.747Z | lvl=INFO | corr=0b50825b-c838-4fcf-b811-69d5ec4d60d5 | trans=0b50825b-c838-4fcf-b811-69d5ec4d60d5 | srv=None | subsrv=/ | comp=Orchestrator | op=orchestrator_core:createNewService() | msg=removing uncomplete created domain 950878f9830d4df48c132a180a50a9b5 {'code': 500, 'error': "(500, '')"}

AlvaroVega commented 6 years ago

It seems that an error 500 was received from your keystone.

amfgomez commented 6 years ago

the kestone logs do not show any error

amfgomez commented 6 years ago

I have used postman another time Traceback (most recent call last): File "/usr/lib64/python2.7/logging/init.py", line 851, in emit msg = self.format(record) File "/usr/lib64/python2.7/logging/init.py", line 724, in format return fmt.format(record) File "/usr/lib64/python2.7/logging/init.py", line 467, in format s = self._fmt % record.dict KeyError: 'correlator' Logged from file base.py, line 176

AlvaroVega commented 6 years ago

Which orchestrator version and S.O. are you using?

amfgomez commented 6 years ago

I have tested with orchestrator-2.1.1 and orchestrator-2.1.0 and the main problem is Keystone or someone configuration mistake.

Each time that I have executed the postman script to create a service. The Keystone has thrown the following error:

2018-11-13 15:03:58.318 204 INFO keystone.common.wsgi [req-822e1761-0edb-4a67-b7df-4591ae6503a9 - - - - -] POST http://keystone:5001/v3/OS-SCIM/Roles 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi [req-822e1761-0edb-4a67-b7df-4591ae6503a9 - - - - -] No JSON object could be decoded 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi Traceback (most recent call last): 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi File "/usr/lib/python2.7/site-packages/keystone/common/wsgi.py", line 248, in call 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi result = method(context, params) 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi File "/usr/lib/python2.7/site-packages/keystone/common/controller.py", line 161, in inner 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi utils.flatten_dict(policy_dict)) 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi File "/usr/lib/python2.7/site-packages/keystone/policy/backends/rules.py", line 77, in enforce 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi enforce(credentials, action, target) 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi File "/usr/lib/python2.7/site-packages/keystone/policy/backends/rules.py", line 69, in enforce 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi return _ENFORCER.enforce(action, target, credentials, extra) 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi File "/usr/lib/python2.7/site-packages/oslo_policy/policy.py", line 488, in enforce 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi self.load_rules() 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi File "/usr/lib/python2.7/site-packages/oslo_policy/policy.py", line 396, in load_rules 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi overwrite=self.overwrite) 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi File "/usr/lib/python2.7/site-packages/oslo_policy/policy.py", line 438, in _load_policy_file 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi rules = Rules.load_json(data, self.default_rule) 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi File "/usr/lib/python2.7/site-packages/oslo_policy/policy.py", line 256, in load_json 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi jsonutils.loads(data).items()) 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi File "/usr/lib/python2.7/site-packages/oslo_serialization/jsonutils.py", line 214, in loads 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi return json.loads(encodeutils.safe_decode(s, encoding), **kwargs) 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi File "/usr/lib64/python2.7/json/init.py", line 338, in loads 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi return _default_decoder.decode(s) 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi File "/usr/lib64/python2.7/json/decoder.py", line 366, in decode 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi File "/usr/lib64/python2.7/json/decoder.py", line 384, in raw_decode 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi raise ValueError("No JSON object could be decoded") 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi ValueError: No JSON object could be decoded 2018-11-13 15:03:58.319 204 ERROR keystone.common.wsgi

I have tested with keystone 1.5 and 1.4.5

AlvaroVega commented 6 years ago

Anyway this could be an error handling an error from keystone

amfgomez commented 6 years ago

The problem was Keypass, the new version of keypass do not set the database connection.

amfgomez commented 6 years ago

Than you very much