Bug 1302466

Summary: HTTP 500 error, calamari cannot write to cthulhu.log
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Ken Dreyer (Red Hat) <kdreyer>
Component: CalamariAssignee: Christina Meno <gmeno>
Calamari sub component: Back-end QA Contact: ceph-qe-bugs <ceph-qe-bugs>
Status: CLOSED ERRATA Docs Contact:
Severity: urgent    
Priority: unspecified CC: ceph-eng-bugs, mlawrenc, racpatel, tganguly
Version: 1.3.2   
Target Milestone: rc   
Target Release: 1.3.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: RHEL: calamari-server-1.3.3-1.el7cp Ubuntu: calamari_1.3.3-2redhat1trusty Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-29 14:45:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
calamari.log none

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