Traceback in response when try to get list of services for nonexistent environment

Bug #1269756 reported by Sergey Murashov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Invalid
Medium
Ekaterina Chernova

Bug Description

Steps to reproduce:
1. Install murano from 0.4 branch
2. Send GET request to http://<murano-url>:8082/environments/None/services, with correct parameter in headers : "X-Configuration-Session: <valid-session-id>"

Actual result:
We get the following traceback:
2014-01-16 10:25:41.395 7087 DEBUG muranoapi.api.v1.services [-] Services:Get <EnvId: None, Path: /services> get /usr/local/lib/python2.7/dist-packages/muranoapi/api/v1/services.py:44
2014-01-16 10:25:41.412 7087 INFO eventlet.wsgi [-] Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 384, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py", line 539, in __call__
    return self.app(env, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/muranoapi/openstack/common/wsgi.py", line 194, in __call__
    response = req.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1260, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/muranoapi/openstack/common/wsgi.py", line 378, in __call__
    action_result = self.execute_action(action, request, **action_args)
  File "/usr/local/lib/python2.7/dist-packages/muranoapi/openstack/common/wsgi.py", line 392, in execute_action
    return self.dispatch(self.controller, action, request, **action_args)
  File "/usr/local/lib/python2.7/dist-packages/muranoapi/openstack/common/wsgi.py", line 401, in dispatch
    return method(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/muranoapi/api/v1/services.py", line 35, in f_normalize_path
    return f(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/muranoapi/api/v1/services.py", line 51, in get
    result = CoreServices.get_data(environment_id, path, session_id)
  File "/usr/local/lib/python2.7/dist-packages/muranoapi/db/services/core_services.py", line 57, in get_data
    srv['status'] = get_status(environment_id, srv['id'])
  File "/usr/local/lib/python2.7/dist-packages/muranoapi/db/services/core_services.py", line 41, in get_service_status
    return EnvironmentServices.get_status(environment_id)
  File "/usr/local/lib/python2.7/dist-packages/muranoapi/db/services/environments.py", line 66, in get_status
    SessionState.deploying)
  File "/usr/local/lib/python2.7/dist-packages/muranoapi/db/services/sessions.py", line 52, in get_sessions
    Session.version == environment.version
AttributeError: 'NoneType' object has no attribute 'version'

Changed in murano:
importance: Undecided → Medium
milestone: none → 0.4.1
assignee: nobody → Ekaterina Fedorova (efedorova)
Changed in murano:
status: New → In Progress
Revision history for this message
Ekaterina Chernova (efedorova) wrote :

Please check again with postman. I got 404 as expected

Changed in murano:
status: In Progress → Incomplete
Revision history for this message
Sergey Murashov (smurashov) wrote :

Yes, you're right, I get 404 response code too

Changed in murano:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.