Bug 1302466 - HTTP 500 error, calamari cannot write to cthulhu.log
Summary: HTTP 500 error, calamari cannot write to cthulhu.log
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Calamari
Version: 1.3.2
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: rc
: 1.3.2
Assignee: Christina Meno
QA Contact: ceph-qe-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-28 00:07 UTC by Ken Dreyer (Red Hat)
Modified: 2016-02-29 14:45 UTC (History)
4 users (show)

Fixed In Version: RHEL: calamari-server-1.3.3-1.el7cp Ubuntu: calamari_1.3.3-2redhat1trusty
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-29 14:45:19 UTC
Embargoed:


Attachments (Terms of Use)
calamari.log (3.31 MB, text/plain)
2016-01-28 09:01 UTC, Tanay Ganguly
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0313 0 normal SHIPPED_LIVE Red Hat Ceph Storage 1.3.2 bug fix and enhancement update 2016-02-29 19:37:43 UTC

Description Ken Dreyer (Red Hat) 2016-01-28 00:07:34 UTC
Description of problem:
The calamari web application tries to write to cthulhu.log. This file is owned by root, but the web application is running as an unprivileged Apache UID.

Version-Release number of selected component (if applicable):
Calamari 1.3.2 (Ubuntu and RHEL)

How reproducible:
always

Steps to Reproduce:
1. Install calamari and set up according to instructions
2. Check the web server (http://calamari-node/)

Actual results:
The server returns an HTTP 500 error, and calamari.log indicates that the issue is a permissions problem writing to cthulhu.log.

Expected results:
The web application comes up as expected, and the user can log in

Workaround for RHEL:
sudo chown apache:apache /var/log/calamari/cthulhu.log

Workaround for Ubuntu:
sudo chown www-data:www-data /var/log/calamari/cthulhu.log

After running the chown command, the web app functions as expected.

Comment 1 Tanay Ganguly 2016-01-28 09:00:24 UTC
I am hitting the same issue.
But even applying the workaround, i am unable to see the Calamari web server.

sudo chown apache:apache /var/log/calamari/cthulhu.log

My setup is being upgraded from 1.3.1 Async to 1.3.2 (26th Build)

[ceph@cephqe4 ceph-config]$ rpm -qa |grep ceph
ceph-common-0.94.5-4.el7cp.x86_64
ceph-deploy-1.5.27.4-1.el7cp.noarch
[ceph@cephqe4 ceph-config]$ rpm -qa |grep calama
calamari-clients-1.3-2.el7cp.x86_64
calamari-server-1.3.2-2.el7cp.x86_64


I am seeing the below Error
---------------------------------------------------------------------------------

2016-01-28 08:11:27,692 - ERROR - django.request Internal Server Error: /dashboard/
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/django/contrib/auth/decorators.py", line 25, in _wrapped_view
    return view_func(request, *args, **kwargs)
  File "/opt/calamari/venv/lib/python2.7/site-packages/calamari_web-0.1-py2.7.egg/calamari_web/views.py", line 38, in dashboard
    clusters = client.list_clusters()
  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/zerorpc/core.py", line 217, in _process_response
    reply_event = bufchan.recv(timeout)
  File "/opt/calamari/venv/lib/python2.7/site-packages/zerorpc/channel.py", line 267, in recv
    event = self._input_queue.get(timeout=timeout)
  File "/opt/calamari/venv/lib/python2.7/site-packages/gevent/queue.py", line 200, in get
    result = waiter.get()
  File "/opt/calamari/venv/lib/python2.7/site-packages/gevent/hub.py", line 568, in get
    return self.hub.switch()
  File "/opt/calamari/venv/lib/python2.7/site-packages/gevent/hub.py", line 331, in switch
    return greenlet.switch(self)
LostRemote: Lost remote after 10s heartbeat

Comment 2 Tanay Ganguly 2016-01-28 09:01:13 UTC
Created attachment 1119074 [details]
calamari.log

Comment 3 Christina Meno 2016-02-01 23:24:46 UTC
https://github.com/ceph/calamari/tree/wip-fix-logging

Comment 4 Ken Dreyer (Red Hat) 2016-02-04 22:45:48 UTC
Fixed in v1.3.3 upstream

Comment 9 errata-xmlrpc 2016-02-29 14:45:19 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.

https://access.redhat.com/errata/RHBA-2016:0313


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