Bug 1056554 - vdsm-tool vdsm-id - fails via ssh if run as root because of sudo has no tty
Summary: vdsm-tool vdsm-id - fails via ssh if run as root because of sudo has no tty
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.4.0
Assignee: Yaniv Bronhaim
QA Contact: Leonid Natapov
URL:
Whiteboard: infra
Depends On:
Blocks: 1054759
TreeView+ depends on / blocked
 
Reported: 2014-01-22 13:10 UTC by Alon Bar-Lev
Modified: 2016-02-10 19:35 UTC (History)
10 users (show)

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.
Clone Of:
Environment:
Last Closed: 2014-06-09 13:27:58 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0504 0 normal SHIPPED_LIVE vdsm 3.4.0 bug fix and enhancement update 2014-06-09 17:21:35 UTC
oVirt gerrit 23721 0 None None None Never

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
1ec5e5ca-0d06-4ebc-964a-ba6ec71742ff
[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,

Andrew

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.

http://rhn.redhat.com/errata/RHBA-2014-0504.html


Note You need to log in before you can comment on or make changes to this bug.