LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-08-2014, 07:40 AM   #1
anindyameister
Member
 
Registered: Oct 2012
Posts: 47

Rep: Reputation: Disabled
vdsm service is failing to start


I am currently evaluating Red Hat Enterprise Virtualization and have managed to set up the management server and the bare metal hypervisor. Now I'm trying to add a regular box running RHEL server 6.5 to the data center as a host. The add new host process starts fine and installs all the packages successfully. But after a certain time it fails saying network communication failure. From the engine.log I figured out this was caused by vdsmd service not restarting properly on the target. And indeed when I manually try to start the service at the host itself, it fails.
Code:
# service vdsmd status
VDS daemon is not running, and its watchdog is running
# service vdsmd start
vdsm: already running                                      [  OK  ]
vdsm start                                                 [  OK  ]
# service vdsmd status
VDS daemon is not running, and its watchdog is running
The "/var/log/messages" file has the following error

Code:
Jul  8 16:34:46  respawn: slave '/usr/share/vdsm/vdsm --pidfile /var/run/vdsm/vdsmd.pid' died too quickly, respawning slave
Jul  8 16:34:47 python: vdsm user could not manage to run sudo operation: (stderr: ['sudo: sorry, you must have a tty to run sudo']). Verify sudoer rules configuration
I tried commenting out and removing the "Defaults requiretty" line in "/etc/sudoers" file, but I keep getting the same error.

As i'm evaluating RHEV, i am not entitled to red hat support and have to fix it myself. Any ideas on what to do ?
 
Old 07-08-2014, 05:48 PM   #2
kentyler
Member
 
Registered: Dec 2008
Location: Cleveland Ohio
Distribution: CentOS
Posts: 235

Rep: Reputation: 36
vdsm ALL=(ALL) NOPASSWD:'/usr/share/vdsm/vdsm
Defaults:vdsm !requiretty

or

vdsm ALL=(ALL) ALL
Defaults:vdsm !requiretty
 
Old 07-09-2014, 03:23 AM   #3
anindyameister
Member
 
Registered: Oct 2012
Posts: 47

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kentyler View Post
vdsm ALL=(ALL) NOPASSWD:'/usr/share/vdsm/vdsm
Defaults:vdsm !requiretty

or

vdsm ALL=(ALL) ALL
Defaults:vdsm !requiretty
Still getting the same error.
 
Old 07-09-2014, 09:27 AM   #4
kentyler
Member
 
Registered: Dec 2008
Location: Cleveland Ohio
Distribution: CentOS
Posts: 235

Rep: Reputation: 36
Did you make sure these are the last lines of the file? If not they will be overridden by the values that follow.
 
Old 07-10-2014, 06:24 AM   #5
anindyameister
Member
 
Registered: Oct 2012
Posts: 47

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kentyler View Post
Did you make sure these are the last lines of the file? If not they will be overridden by the values that follow.
Yes I did.
 
Old 07-10-2014, 07:07 AM   #6
anindyameister
Member
 
Registered: Oct 2012
Posts: 47

Original Poster
Rep: Reputation: Disabled
The manager added the line "#includedir /etc/sudoers.d" at the end of the sudoers file and the directory has a file with custom vdsm rules

Code:
cat /etc/sudoers.d/50_vdsm


Cmnd_Alias VDSM_LIFECYCLE = \
    /usr/sbin/dmidecode, \
    /usr/share/vdsm/mk_sysprep_floppy, \
    /sbin/service ksmtuned *, \
    /sbin/service ksm *, \
    /usr/share/vdsm/prepare-vmchannel
Cmnd_Alias VDSM_STORAGE = /bin/mount, /bin/umount, \
    /sbin/fsck -p *, \
    /sbin/tune2fs -j *, \
    /sbin/mkfs -q -j *, \
    /usr/bin/kill, \
    /bin/chown vdsm\:qemu *, \
    /bin/chown vdsm\:kvm *, \
    /bin/mv /etc/iscsi/iscsid.conf /etc/iscsi/iscsid.conf.*, \
    /bin/mv /etc/multipath.conf *, \
    /bin/cp * /etc/iscsi/iscsid.conf, \
    /sbin/service iscsid *, \
    /usr/bin/vdsm-tool service-restart multipathd, \
    /usr/bin/vdsm-tool service-reload multipathd, \
    /sbin/iscsiadm *, \
    /sbin/lvm, \
    /bin/cat /sys/block/*/device/../../*, \
    /bin/cat /sys/devices/platform/host*, \
    /bin/cat /etc/iscsi/iscsid.conf, \
    /bin/cat /etc/multipath.conf, \
    /bin/dd of=/sys/class/scsi_host/host*/scan, \
    /bin/dd, \
    /usr/sbin/persist /etc/multipath.conf, \
    /usr/sbin/unpersist /etc/multipath.conf, \
    /bin/cp /etc/multipath.conf *, \
    /bin/cp * /etc/multipath.conf, \
    /sbin/multipath, \
    /usr/bin/setsid /usr/bin/ionice -c ? -n ? /bin/su vdsm -s /bin/sh -c /usr/libexec/vdsm/spmprotect.sh*, \
    /sbin/service vdsmd *, \
    /sbin/reboot -f

vdsm  ALL=(ALL) NOPASSWD: VDSM_LIFECYCLE, VDSM_STORAGE
Defaults:vdsm !requiretty
Defaults:vdsm !syslog
 
Old 07-11-2014, 09:34 AM   #7
kentyler
Member
 
Registered: Dec 2008
Location: Cleveland Ohio
Distribution: CentOS
Posts: 235

Rep: Reputation: 36
Try putting this at the top instead of the bottom:

Defaults:vdsm !requiretty
Defaults:vdsm !syslog
 
Old 07-14-2014, 04:50 AM   #8
anindyameister
Member
 
Registered: Oct 2012
Posts: 47

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kentyler View Post
Did you make sure these are the last lines of the file? If not they will be overridden by the values that follow.
Okay, I have fixed the issue. The problem was with nsswitch, the linux box was configured to lookup sudo users against ldap directory, and had the below entry in "/etc/nsswitch.conf"

Code:
sudoers: files ldap

when I changed the order to "ldap files" everything started to work normally, but that somewhat doesn't makes sense sisnce the existing entry was supposed to make sudo search local file before ldap lookup. The main issue is fixed, but the mystery of "files ldap" not working remains.
 
  


Reply

Tags
rhel 6


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
puppet needs to stop a service, do something, then start the service edwardcode Programming 1 12-03-2012 02:58 PM
Network service failing to start manutdfan1988 Linux - Networking 4 03-05-2011 04:14 PM
dhcpd service keeps failing in CentOS 5.4 linux_newb Linux - Networking 2 01-21-2010 11:52 AM
FREECOM USB drive crashed Proftp failing to start as a service j.smith1981 Linux - Server 1 05-03-2009 07:10 AM
failing to run svnserve as a service wslyhbb Linux - Server 6 06-16-2007 09:14 PM


All times are GMT -5. The time now is 07:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration