Bug 719611 - virt-what should work as non-root
virt-what should work as non-root
Status: NEW
Product: Fedora
Classification: Fedora
Component: virt-what (Show other bugs)
23
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard W.M. Jones
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-07 09:16 EDT by Richard W.M. Jones
Modified: 2015-09-02 23:18 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
This patch directs fail() output to stderr (1.03 KB, patch)
2013-03-29 19:10 EDT, Todd Zullinger
no flags Details | Diff

  None (edit)
Description Richard W.M. Jones 2011-07-07 09:16:09 EDT
Description of problem:

virt-what has most of the information it needs even when
we run it as non-root (the only exception is SM-BIOS
info, but in recent kernels even some of that is available).

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

virt-what 1.11

How reproducible:

Always.

Steps to Reproduce:
1. $ virt-what
2.
3.
  
Actual results:

virt-what: this script must be run as root

Expected results:

Should produce some or all of the output, even when
run as non-root.

Additional info:

https://www.redhat.com/archives/virt-tools-list/2011-July/msg00011.html
Comment 1 Todd Zullinger 2013-03-29 17:34:22 EDT
At the least, this output belongs on stderr, not stdout.  Now when you run facter as non-root it will include this as the virtual fact:

$ facter virtual
virt-what: this script must be run as root

I see this was filed in 2011.  Any chance of it being fixed up?
Comment 2 Todd Zullinger 2013-03-29 19:10:24 EDT
Created attachment 718206 [details]
This patch directs fail() output to stderr

Here's a git formatted patch that directs output from the fail() function in virt-what to stderr.  If the concept and code (all 4 characters of it ;) is acceptable but you'd like it in another format, let me know.

Thanks!
Comment 3 Richard W.M. Jones 2013-04-02 11:29:50 EDT
The answer is, yes we should support root.  Note this is
only possible recently because dmidecode output is now
available in /sys:

$ cat /sys/class/dmi/id/
bios_date          board_vendor       chassis_version    product_version
bios_vendor        board_version      modalias           subsystem/
bios_version       chassis_asset_tag  power/             sys_vendor
board_asset_tag    chassis_serial     product_name       uevent
board_name         chassis_type       product_serial     
board_serial       chassis_vendor     product_uuid

Probably the simplest thing to get it working may be to
just cat all that lot together, but maybe there are
clever ways to go about it.

Patches are welcome.
Comment 4 Richard W.M. Jones 2013-04-02 11:31:38 EDT
(In reply to comment #3)
> The answer is, yes we should support root.

Um, NON-root even ...
Comment 5 Fedora End Of Life 2013-04-03 13:22:15 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19
Comment 6 Fedora End Of Life 2015-01-09 11:42:49 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 7 Jan Kurik 2015-07-15 11:15:14 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

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