LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   vdsm service is failing to start (https://www.linuxquestions.org/questions/linux-newbie-8/vdsm-service-is-failing-to-start-4175510472/)

anindyameister 07-08-2014 06:40 AM

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 ?

kentyler 07-08-2014 04:48 PM

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

or

vdsm ALL=(ALL) ALL
Defaults:vdsm !requiretty

anindyameister 07-09-2014 02:23 AM

Quote:

Originally Posted by kentyler (Post 5200729)
vdsm ALL=(ALL) NOPASSWD:'/usr/share/vdsm/vdsm
Defaults:vdsm !requiretty

or

vdsm ALL=(ALL) ALL
Defaults:vdsm !requiretty

Still getting the same error.

kentyler 07-09-2014 08:27 AM

Did you make sure these are the last lines of the file? If not they will be overridden by the values that follow.

anindyameister 07-10-2014 05:24 AM

Quote:

Originally Posted by kentyler (Post 5201072)
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.

anindyameister 07-10-2014 06:07 AM

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


kentyler 07-11-2014 08:34 AM

Try putting this at the top instead of the bottom:

Defaults:vdsm !requiretty
Defaults:vdsm !syslog

anindyameister 07-14-2014 03:50 AM

Quote:

Originally Posted by kentyler (Post 5201072)
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.


All times are GMT -5. The time now is 11:17 AM.