Bug 241889

Summary: xm top just uses PATH, but sbin might not be in the users path
Product: Red Hat Enterprise Linux 5 Reporter: Richard W.M. Jones <rjones>
Component: xenAssignee: Richard W.M. Jones <rjones>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: bstein, katzj, xen-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-17 17:47:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 188171    
Bug Blocks:    

Description Richard W.M. Jones 2007-05-31 14:41:45 UTC
+++ This bug was initially created as a clone of Bug #188171 +++

Description of problem:
Fedora doesn't put /sbin and /usr/sbin into a non-root path, so if a user does
sudo /usr/sbin/xm top you get a python traceback (a simple command not found
error message, would also be much nicer).

Version-Release number of selected component (if applicable):
xen-3.0.1-4

How reproducible:
always

Comment 1 Richard W.M. Jones 2007-05-31 14:42:35 UTC
This is still happening in RHEL 5 nightly:

[root@localhost console]# /usr/sbin/xm top
Unexpected error: exceptions.OSError

Please report to xen-devel.com
Traceback (most recent call last):
  File "/usr/sbin/xm", line 10, in ?
    main.main(sys.argv)
  File "/usr/lib64/python2.4/site-packages/xen/xm/main.py", line 1460, in main
    rc = cmd(args)
  File "/usr/lib64/python2.4/site-packages/xen/xm/main.py", line 1037, in xm_top
    os.execvp('xentop', ['xentop'])
  File "/usr/lib64/python2.4/os.py", line 341, in execvp
    _execvpe(file, args)
  File "/usr/lib64/python2.4/os.py", line 379, in _execvpe
    func(fullname, *argrest)
OSError: [Errno 2] No such file or directory

but:

[root@localhost console]# PATH=/usr/sbin:$PATH xm top

(works)

Comment 2 Richard W.M. Jones 2008-01-17 17:47:56 UTC
Use virt-top instead of xm top.