Bug 870139

Summary: 3.2 - No proper log when vdsm service fails to initialize due to permission error on logger (vdsm.log)
Product: Red Hat Enterprise Virtualization Manager Reporter: vvyazmin <vvyazmin>
Component: vdsmAssignee: Yaniv Bronhaim <ybronhei>
Status: CLOSED CURRENTRELEASE QA Contact: Leonid Natapov <lnatapov>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: bazulay, cpelland, danken, dyasny, hateya, iheim, lpeer, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---Keywords: EasyFix
Target Release: 3.2.0   
Hardware: x86_64   
OS: All   
Whiteboard: infra
Fixed In Version: vdsm-4.10.2-3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 915537    

Description vvyazmin@redhat.com 2012-10-25 15:56:30 UTC
Description of problem:
No proper log when vdsm service fails to initialize due to permission error on logger (vdsm.log)

Version-Release number of selected component (if applicable):
RHEVM 3.1 - SI22

RHEVM: rhevm-3.1.0-22.el6ev.noarch
VDSM: vdsm-4.9.6-39.0.el6_3.x86_64
LIBVIRT: libvirt-0.9.10-21.el6_3.5.x86_64
QEMU & KVM: qemu-kvm-rhev-0.12.1.2-2.295.el6_3.2.x86_64
SANLOCK: sanlock-2.3-4.el6_3.x86_64

How reproducible:
100%

Steps to Reproduce:
1. 
  
Actual results:
No description or reason in logs found, when VDSM service failed to start.
In my case VDSM service failed to start from the fact that Logger has wrong permission.
When I manually start vdsm service, I get “OK”, although this wrong status

Expected results:
In vdsm.log shoud alwase be a reason of failure VDSM service. 


Additional info:

Comment 4 Yaniv Bronhaim 2012-11-08 09:52:35 UTC
My fix for that:
http://gerrit.ovirt.org/#/c/9118 - it adds verification for the log file permissions before starting vdsm service.

Comment 5 Yaniv Bronhaim 2012-11-26 15:24:45 UTC
Some bugs with my solution: It doesn't verify the mode of the file and selinux permissions. Danken suggested another solution that raises another bug issue in coreutils (https://bugzilla.redhat.com/show_bug.cgi?id=879215).

We are still trying to find alternative or a fix for that coreutil bug.

Alternative like checking the permissions via vdsm process (and not by vdsmd script) won't help because the user can't receive reports about the failure without using log file (we can report to another log file though, but I don't know which), I prefer to stick with danken suggestion until the coreutil issue will be solved.

Comment 6 Antoni Segura Puimedon 2012-11-26 15:30:56 UTC
About the alternative in the last paragraph... Could we log it to the syslog using:
    http://docs.python.org/2/library/syslog.html

Comment 7 Yaniv Bronhaim 2012-12-04 12:38:36 UTC
Still no news from https://bugzilla.redhat.com/show_bug.cgi?id=879215

So I posted http://gerrit.ovirt.org/#/c/9700/ (notice that by default assert message is being reported to syslog)

And after fixing the su bug we'll add - http://gerrit.ovirt.org/#/c/9118/

Comment 14 Haim 2013-03-05 14:37:41 UTC
Mar  5 16:37:22 cheetah01 respawn: slave '/usr/share/vdsm/vdsm' died too quickly, respawning slave
Mar  5 16:37:22 cheetah01 python: error in accessing vdsm log file

Comment 15 Itamar Heim 2013-06-11 08:41:24 UTC
3.2 has been released

Comment 16 Itamar Heim 2013-06-11 08:41:27 UTC
3.2 has been released

Comment 17 Itamar Heim 2013-06-11 08:41:27 UTC
3.2 has been released

Comment 18 Itamar Heim 2013-06-11 08:48:48 UTC
3.2 has been released