Incorrect response on GET services request with 'X-Configuration-Session: None'

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

Bug Description

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

Actual result:
We get the following traceback:
2014-01-16 10:12:38.188 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 47, in get_data
    env_description = get_description(environment_id, session_id)
  File "/usr/local/lib/python2.7/dist-packages/muranoapi/db/services/environments.py", line 156, in get_environment_description
    if SessionServices.validate(session):
  File "/usr/local/lib/python2.7/dist-packages/muranoapi/db/services/sessions.py", line 96, in validate
    current_env = unit.query(Environment).get(session.environment_id)
AttributeError: 'NoneType' object has no attribute 'environment_id'

Tags: verified
Changed in murano:
importance: Undecided → Medium
milestone: none → 0.4.1
summary: - Traceback in response body
+ Incorrect response on GET services request
summary: - Incorrect response on GET services request
+ Incorrect response on GET services request with 'X-Configuration-
+ Session: None'
Changed in murano:
assignee: nobody → Timur Sufiev (tsufiev-x)
status: New → Confirmed
Revision history for this message
Ekaterina Chernova (efedorova) wrote :

Please check again with postman. I got 404 as expected

Changed in murano:
status: Confirmed → Incomplete
Revision history for this message
Ekaterina Chernova (efedorova) wrote :

Previos comment was for another bug, this one is reproduced
But please check first with non-exstent sessions -not None (it also reproduced)

Changed in murano:
status: Incomplete → In Progress
assignee: Timur Sufiev (tsufiev-x) → Ekaterina Fedorova (efedorova)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano-api (release-0.4)

Fix proposed to branch: release-0.4
Review: https://review.openstack.org/67846

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano-api (release-0.4)

Reviewed: https://review.openstack.org/67846
Committed: https://git.openstack.org/cgit/stackforge/murano-api/commit/?id=6018a9c554a2ce17280bd6fe78be3fecc31a9054
Submitter: Jenkins
Branch: release-0.4

commit 6018a9c554a2ce17280bd6fe78be3fecc31a9054
Author: Ekaterina Fedorova <email address hidden>
Date: Mon Jan 20 18:51:33 2014 +0400

    Catch AttributeError in case of incorrect session_id

    Change-Id: I310e85b96a8afab3dce3330cbb171b97a2410130
    Closes-Bug: 1269749

Changed in murano:
status: In Progress → Fix Committed
tags: added: verified
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano-api (master)

Reviewed: https://review.openstack.org/72378
Committed: https://git.openstack.org/cgit/stackforge/murano-api/commit/?id=968296bf7eebbb6b7bce3557e63fa99fceab900b
Submitter: Jenkins
Branch: master

commit 968296bf7eebbb6b7bce3557e63fa99fceab900b
Author: Ekaterina Fedorova <email address hidden>
Date: Mon Jan 20 13:01:37 2014 +0400

    Cherry-pick the following commits from release-0.4

    * Fix errors in infrastructure
     blueprinr one-style-config
     1) Update sample config - remove non-existing directory
     2) Add 0.4.1 version
     3) Rename config file to sample
     Fixes-Bug: 1270734

    * Catch AttributeError in case of incorrect session_id
     Closes-Bug: 1269749

    * Fixed issue with copy configuration files.
     Closes-Bug: #1271079

    * Add translation support

     Use openstack.common.gettextutils for translation
     Closes-Bug: #1267514

    * Fix name for syslog_log_facility param

    * Update requirements for a release-0.4.1

    * Handle incorrect env_id
     Closes-Bug: 1227154

    * Import _ not implicit

    Change-Id: I2744eaeef369220c5a8dabb027ba40622be9d155

Changed in murano:
status: Fix Committed → Fix Released
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.