Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1056554

Summary: vdsm-tool vdsm-id - fails via ssh if run as root because of sudo has no tty
Product: Red Hat Enterprise Virtualization Manager Reporter: Alon Bar-Lev <alonbl>
Component: vdsmAssignee: Yaniv Bronhaim <ybronhei>
Status: CLOSED ERRATA QA Contact: Leonid Natapov <lnatapov>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: aberezin, adahms, bazulay, danken, gklein, iheim, lpeer, pstehlik, ybronhei, yeylon
Target Milestone: ---   
Target Release: 3.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, the vdsm-tool command would fail on certain actions when run as the root user. This was caused by the logic used by the vdsm-tool command, whereby 'sudo' would be added to actions requiring root privileges, causing those actions to fail. Now, the logic used in the vdsm-tool command has been revised so that 'sudo' is not added to actions when the vdsm-tool command is being run as the root user.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-09 13:27:58 UTC 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:
Bug Depends On:    
Bug Blocks: 1054759    

Description Alon Bar-Lev 2014-01-22 13:10:31 UTC
using sudo requires tty and other unwanted side effects if already running as root.

for example using vdsm-tool vdsm-id under root produces an error as sudo fails because of lack of tty.

unsure if there are other issues similar to this one.

see bug#1054759

Comment 1 Leonid Natapov 2014-02-12 12:30:05 UTC
fixed. vdsm-4.14.1-3.el6.x86_64.

[root@green-vdsb ~]# vdsm-tool vdsm-id
[root@green-vdsb ~]#

Comment 2 Yaniv Bronhaim 2014-05-18 15:07:03 UTC
Andrew, this fix doesn't enhance anything, it fixes a bug which caused by wrong execution of sudo statement. if user already root and we're adding "sudo" to the command we run, it requires specific configuration under /etc/sudoers which vdsm doesn't configure. the fix here just prevents this bug by not adding "sudo" if user is already root (which how vdsm-tool execute some commands, such as vdsm-id). only if running as vdsm user we configure specific sudoers entries for specific commands during vdsm installation.

thanks for filling the doc-text!

Comment 3 Andrew Dahms 2014-05-18 22:31:05 UTC
Hi Yaniv,

Thank you for your feedback and for the explanation!

I have updated the doct text now - would you be able to take a quick look at let me know if you feel it is more accurate now?

Kind regards,


Comment 4 Yaniv Bronhaim 2014-05-19 06:07:32 UTC
Great now. thanks!

Comment 5 errata-xmlrpc 2014-06-09 13:27:58 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.