Bug 1338633 - Calamari APIs returns 500 for some of the APIs
Summary: Calamari APIs returns 500 for some of the APIs
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat
Component: Calamari
Version: 2.0
Hardware: All
OS: Linux
Target Milestone: rc
: 2.0
Assignee: Christina Meno
QA Contact: ceph-qe-bugs
Depends On:
Blocks: 1343229
TreeView+ depends on / blocked
Reported: 2016-05-23 07:41 UTC by rakesh
Modified: 2016-08-23 19:39 UTC (History)
4 users (show)

Fixed In Version: calamari-server-1.4.1-1.el7cp
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-08-23 19:39:08 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1755 0 normal SHIPPED_LIVE Red Hat Ceph Storage 2.0 bug fix and enhancement update 2016-08-23 23:23:52 UTC

Description rakesh 2016-05-23 07:41:21 UTC
Description of problem:
when we try to do "GET" on the following calamari APIs we get the 500 server error: 

1. api/v2/key 
2. api/v2/cluster/<fsid>/log	
3. api/v2/grains
4. api/v2/info

Comment 2 Christina Meno 2016-05-25 21:02:31 UTC
api/v2/key AND api/v2/grains are deprecated in 1.4 -- I need to update the docs

I will investigate log and info. I don't consider either of these must haves for 2.0

Comment 5 Christina Meno 2016-06-09 04:37:24 UTC
/log gives this error 

2016-06-08 23:36:29,771 - ERROR - django.request Internal Server Error: /api/v2/cluster/fab72f8e-cb80-4ba4-b917-932345798252/log
Traceback (most recent call last):
  File "/opt/calamari/venv/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/opt/calamari/venv/lib/python2.7/site-packages/rest_framework/viewsets.py", line 78, in view
    return self.dispatch(request, *args, **kwargs)
  File "/opt/calamari/venv/lib/python2.7/site-packages/calamari_rest_api-0.1-py2.7.egg/calamari_rest/views/rpc_view.py", line 91, in dispatch
    return super(RPCViewSet, self).dispatch(request, *args, **kwargs)
  File "/opt/calamari/venv/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 77, in wrapped_view
    return view_func(*args, **kwargs)
  File "/opt/calamari/venv/lib/python2.7/site-packages/rest_framework/views.py", line 399, in dispatch
    response = self.handle_exception(exc)
  File "/opt/calamari/venv/lib/python2.7/site-packages/calamari_rest_api-0.1-py2.7.egg/calamari_rest/views/rpc_view.py", line 108, in handle_exception
    return super(RPCViewSet, self).handle_exception(exc)
  File "/opt/calamari/venv/lib/python2.7/site-packages/rest_framework/views.py", line 396, in dispatch
    response = handler(request, *args, **kwargs)
  File "/opt/calamari/venv/lib/python2.7/site-packages/calamari_rest_api-0.1-py2.7.egg/calamari_rest/views/v2.py", line 1000, in get_cluster_log
    results = self.client.get_server_log(mon_fqdn, "ceph/{name}.log".format(name=name), lines)
  File "/opt/calamari/venv/lib/python2.7/site-packages/zerorpc/core.py", line 260, in <lambda>
    return lambda *args, **kargs: self(method, *args, **kargs)
  File "/opt/calamari/venv/lib/python2.7/site-packages/zerorpc/core.py", line 245, in __call__
    return self._process_response(request_event, bufchan, timeout)
  File "/opt/calamari/venv/lib/python2.7/site-packages/calamari_rest_api-0.1-py2.7.egg/calamari_rest/views/rpc_view.py", line 55, in _process_response
    result = super(ProfiledRpcClient, self)._process_response(request_event, bufchan, timeout)
  File "/opt/calamari/venv/lib/python2.7/site-packages/zerorpc/core.py", line 220, in _process_response
    reply_event, self._handle_remote_error)
  File "/opt/calamari/venv/lib/python2.7/site-packages/zerorpc/patterns.py", line 44, in process_answer
    raise exception
RemoteError: Traceback (most recent call last):
  File "/opt/calamari/venv/lib/python2.7/site-packages/zerorpc/core.py", line 147, in _async_task
    raise NameError(event.name)
NameError: get_server_log

Comment 8 Harish NV Rao 2016-06-16 09:13:40 UTC
GET" on the following calamari APIs do not return server error 500 in calamari-server-1.4.1-1.el7cp.x86_64

1. api/v2/key 
2. api/v2/cluster/<fsid>/log	
3. api/v2/grains
4. api/v2/info

Original issue is fixed. I have noticed slight discrepancy in the output of "info" for which I will file a separate defect.

Comment 10 errata-xmlrpc 2016-08-23 19:39:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.