ENVIRONMENT: iso 511, job http://jenkins-product.srt.mirantis.net:8080/view/6.1_swarm/job/6.1.system_test.centos.services_ha/147/
EXPECTED RESULT: tests passed
ACTUAL RESULT: AttributeError: 'NoneType' object has no attribute 'to_wrapped_dict'
Sahara have this trace after cluster has "Active" state
2015-06-06T02:34:17.216892+00:00 debug: Running periodic task SaharaPeriodicTasks.update_job_statuses
2015-06-06T02:34:17.217744+00:00 debug: Updating job statuses
2015-06-06T02:34:17.227239+00:00 debug: Dynamic looping call <bound method SaharaPeriodicTasks.run_periodic_tasks of <sahara.service.periodic.SaharaPeriodicTasks object at 0x5363350>> sleeping for 45.00 seconds
2015-06-06T02:34:19.303751+00:00 debug: Removing headers from request environment: X-Service-Catalog,X-Identity-Status,X-Roles,X-Service-Roles,X-Domain-Name,X-Service-Domain-Name,X-Project-Id,X-Service-Project-Id,X-Project-Domain-Name,X-Service-Project-Domain-Name,X-User-Id,X-Service-User-Id,X-User-Name,X-Service-User-Name,X-Project-Name,X-Service-Project-Name,X-User-Domain-Id,X-Service-User-Domain-Id,X-Domain-Id,X-Service-Domain-Id,X-User-Domain-Name,X-Service-User-Domain-Name,X-Project-Domain-Id,X-Service-Project-Domain-Id,X-Role,X-User,X-Tenant-Name,X-Tenant-Id,X-Tenant
2015-06-06T02:34:19.304258+00:00 debug: Authenticating user token
2015-06-06T02:34:19.306133+00:00 debug: Returning cached token
2015-06-06T02:34:19.306978+00:00 debug: Authenticating service token
2015-06-06T02:34:19.308258+00:00 debug: Received request from user: user_id None, project_id None, roles None service: user_id None, project_id None, roles None
2015-06-06T02:34:19.311038+00:00 debug: Rest.route.decorator.handler, kwargs={'tenant_id': u'bb6de7692ce341fa875fa6827d49c7f1', 'cluster_id': u'f4b65049-1ad8-4e72-ad91-0ea84697a09b'}
2015-06-06T02:34:19.477917+00:00 err: Request aborted with status code 500 and message 'Internal Server Error'
2015-06-06T02:34:19.481968+00:00 err: Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/sahara/utils/api.py", line 89, in handler
return func(**kwargs)
File "/usr/lib/python2.6/site-packages/sahara/service/validation.py", line 80, in handler
return func(*args, **kwargs)
File "/usr/lib/python2.6/site-packages/sahara/api/v10.py", line 57, in clusters_get
return u.render(api.get_cluster(cluster_id).to_wrapped_dict())
AttributeError: 'NoneType' object has no attribute 'to_wrapped_dict'
2015-06-06T02:34:19.483564+00:00 info: 10.109.2.5 - - [06/Jun/2015 02:34:19] "GET /v1.1/bb6de7692ce341fa875fa6827d49c7f1/clusters/f4b65049-1ad8-4e72-ad91-0ea84697a09b HTTP/1.1" 500 247 0.179672
2015-06-06T02:34:20.054081+00:00 debug: Removing headers from request environment: X-Service-Catalog,X-Identity-Status,X-Roles,X-Service-Roles,X-Domain-Name,X-Service-Domain-Name,X-Project-Id,X-Service-Project-Id,X-Project-Domain-Name,X-Service-Project-Domain-Name,X-User-Id,X-Service-User-Id,X-User-Name,X-Service-User-Name,X-Project-Name,X-Service-Project-Name,X-User-Domain-Id,X-Service-User-Domain-Id,X-Domain-Id,X-Service-Domain-Id,X-User-Domain-Name,X-Service-User-Domain-Name,X-Project-Domain-Id,X-Service-Project-Domain-Id,X-Role,X-User,X-Tenant-Name,X-Tenant-Id,X-Tenant
2015-06-06T02:34:20.054645+00:00 debug: Authenticating user token
2015-06-06T02:34:20.055985+00:00 debug: Returning cached token
2015-06-06T02:34:20.057301+00:00 debug: Authenticating service token
2015-06-06T02:34:20.057932+00:00 debug: Received request from user: user_id None, project_id None, roles None service: user_id None, project_id None, roles None
LOGS: http://jenkins-product.srt.mirantis.net:8080/view/6.1_swarm/job/6.1.system_test.centos.services_ha/147/consoleFull
This is a known problem in Sahara, when two operations happen simultaneously:
* delete cluster
* get cluster
The second operation fails with Internal Server Error if cluster is deleted between validation and actual retrieval of cluster object from DB.
We need to workaround that in our OSTF test: we need it to handle 500 error here: /github. com/stackforge/ fuel-ostf/ blob/7c938648a2 46e0311d05e2372 ff43ef1eb2e2761 /fuel_health/ saharamanager. py#L259
https:/