[murano][service broker] Code 500 during getting latest status if service no longer exists

Bug #1518874 reported by Nikolay Starodubtsev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
High
Nikolay Starodubtsev

Bug Description

Steps:
1. Auth into cfapi service
2. Try no get latest status with non-present instance_id.

2015-11-16 16:41:53.320 30705 INFO eventlet.wsgi [req-81112add-cf3d-4884-bf48-1159b91946ad 6f28613fa3c44c14a0ff873f371d5b97 07934d745ebf4e07b86c06846b36b301 - - -] Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/eventlet/wsgi.py", line 454, in handle_one_response
    result = self.application(self.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/oslo_middleware/request_id.py", line 37, in __call__
    response = req.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1317, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1281, in call_application
    app_iter = application(self.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 "/opt/stack/murano/murano/common/wsgi.py", line 199, in __call__
    response = req.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1317, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1281, in call_application
    app_iter = application(self.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 "/opt/stack/murano/murano/common/wsgi.py", line 199, in __call__
    response = req.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1317, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1281, in call_application
    app_iter = application(self.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/keystonemiddleware/auth_token/__init__.py", line 455, in __call__
    response = req.get_response(self._app)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1317, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1281, in call_application
    app_iter = application(self.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 "/opt/stack/murano/murano/common/wsgi.py", line 199, in __call__
    response = req.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1317, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1281, 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 136, 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 "/opt/stack/murano/murano/common/wsgi.py", line 420, in __call__
    action_result = self.execute_action(action, request, **action_args)
  File "/opt/stack/murano/murano/common/wsgi.py", line 435, in execute_action
    return self.dispatch(self.controller, action, request, **action_args)
  File "/opt/stack/murano/murano/common/wsgi.py", line 444, in dispatch
    return method(*args, **kwargs)
  File "/opt/stack/murano/murano/api/v1/cloudfoundry/cfapi.py", line 172, in deprovision
    import pdb; pdb.set_trace()
  File "/opt/stack/python-muranoclient/muranoclient/v1/services.py", line 37, in f_normalize_path
    return f(*args, **kwargs)
  File "/opt/stack/python-muranoclient/muranoclient/v1/services.py", line 102, in delete
    return self._delete(path, headers=headers)
  File "/opt/stack/python-muranoclient/muranoclient/common/base.py", line 72, in _delete
    self.api.raw_request('DELETE', url, headers=headers)
  File "/opt/stack/python-muranoclient/muranoclient/common/http.py", line 280, in raw_request
    return self._http_request(url, method, **kwargs)
  File "/opt/stack/python-muranoclient/muranoclient/common/http.py", line 207, in _http_request
    raise exc.from_response(rest)
HTTPNotFound: 404 Not Found: The resource could not be found. (HTTP 404)
015-11-16 16:41:53.320 30705 INFO eventlet.wsgi [req-81112add-cf3d-4884-bf48-1159b91946ad 6f28613fa3c44c14a0ff873f371d5b97 07934d745ebf4e07b86c06846b36b301 - - -] 172.18.162.71 - - [16/Nov/2015 16:41:53] "DELETE /v2/service_instances/26b4e4463eef475cbd2dcfa7e603c77f?accepts_incomplete=true HTTP/1.1" 500 5663 9.608685

related upstream bug: https://bugs.launchpad.net/murano/+bug/1516749

Tags: area-murano
description: updated
Changed in mos:
importance: Undecided → High
summary: - [cf api][service broker] Code 500 during getting latest status if
+ [murano][service broker] Code 500 during getting latest status if
service no longer exists
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix proposed to openstack/murano (openstack-ci/fuel-8.0/liberty)

Fix proposed to branch: openstack-ci/fuel-8.0/liberty
Change author: Viktor Ryzhenkin <email address hidden>
Review: https://review.fuel-infra.org/14210

Changed in mos:
status: Confirmed → In Progress
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change abandoned on openstack/murano (openstack-ci/fuel-8.0/liberty)

Change abandoned by Nikolay Starodubtsev <email address hidden> on branch: openstack-ci/fuel-8.0/liberty
Review: https://review.fuel-infra.org/14210

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Change restored on openstack/murano (openstack-ci/fuel-8.0/liberty)

Change restored by Nikolay Starodubtsev <email address hidden> on branch: openstack-ci/fuel-8.0/liberty
Review: https://review.fuel-infra.org/14210
Reason: This patches is hard to merge to upstream s/liberty, because of some changs in service broker functionality

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/murano (openstack-ci/fuel-8.0/liberty)

Reviewed: https://review.fuel-infra.org/14210
Submitter: Pkgs Jenkins <email address hidden>
Branch: openstack-ci/fuel-8.0/liberty

Commit: d139d4e343c6d43c815424de4ea7f6b860646cf4
Author: Viktor Ryzhenkin <email address hidden>
Date: Fri Dec 4 14:05:10 2015

[cfapi] Prevent code 500 if instance, environment or service doesn't exists.

- Return 410 code if service/environment/instance_id doesn't exists
 as mentioned in cfapi service broker guide.
(https://docs.cloudfoundry.org/services/api.html#asynchronous-operations)

Change-Id: I07bfaf8465649c77d06b881b24c49bce3d8d75ed
Closes-Bug: #1518874

Changed in mos:
status: In Progress → Fix Committed
tags: added: murano
tags: added: area-murano
removed: murano
Revision history for this message
Victor Ryzhenkin (vryzhenkin) wrote :

Verified on:

VERSION:
  feature_groups:
    - mirantis
    - experimental
  production: "docker"
  release: "8.0"
  api: "1.0"
  build_number: "478"
  build_id: "478"
  fuel-nailgun_sha: "ae949905142507f2cb446071783731468f34a572"
  python-fuelclient_sha: "4f234669cfe88a9406f4e438b1e1f74f1ef484a5"
  fuel-agent_sha: "481ed135de2cb5060cac3795428625befdd1d814"
  fuel-nailgun-agent_sha: "b2bb466fd5bd92da614cdbd819d6999c510ebfb1"
  astute_sha: "b81577a5b7857c4be8748492bae1dec2fa89b446"
  fuel-library_sha: "420c6fa5f8cb51f3322d95113f783967bde9836e"
  fuel-ostf_sha: "ab5fd151fc6c1aa0b35bc2023631b1f4836ecd61"
  fuel-mirror_sha: "b62f3cce5321fd570c6589bc2684eab994c3f3f2"
  fuelmenu_sha: "fac143f4dfa75785758e72afbdc029693e94ff2b"
  shotgun_sha: "63645dea384a37dde5c01d4f8905566978e5d906"
  network-checker_sha: "9f0ba4577915ce1e77f5dc9c639a5ef66ca45896"
  fuel-upgrade_sha: "616a7490ec7199f69759e97e42f9b97dfc87e85b"
  fuelmain_sha: "6c6b088a3d52dd0eaf43d59f3a3a149c93a07e7e"

Changed in mos:
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.