RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1263119 - virt-who show error info in the log if "OWNER" or "ENV" is null in /etc/sysconfig/virt-who
Summary: virt-who show error info in the log if "OWNER" or "ENV" is null in /etc/sysc...
Keywords:
Status: CLOSED DUPLICATE of bug 1254843
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who
Version: 7.2
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Radek Novacek
QA Contact: Li Bin Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-15 07:28 UTC by Liushihui
Modified: 2016-12-01 00:34 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-22 13:35:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Liushihui 2015-09-15 07:28:35 UTC
Description of problem:
Configure virt-who as the following two error conditions in /etc/sysconfig/virt-who, Although failed to start virt-who service, virt-who show nothing in the log and terminal side.
1. no VIRTWHO_XXX_OWNER  or VIRTWHO_XXX_ENV in /etc/sysconfig/virt-who
2. configure "VIRTWHO_XXX_OWNER" or "VIRTWHO_XXX_ENV" to null in /etc/sysconfig/virt-who

Version-Release number of selected component (if applicable):
python-rhsm-1.15.4-4.el7.x86_64
subscription-manager-1.15.9-7.el7.x86_64
virt-who-0.14-7.el7.noarch
SAM-1.4.1-RHEL-6-20141113.0

How reproducible:
Always

Steps to Reproduce:
1. Register system to SAM.
2. Configure virt-who run at esx mode and configure "VIRTWHO_ESX_OWNER" or "VIRTWHO_ESX_ENV" to null.
# grep -v  "^#" /etc/sysconfig/virt-who
VIRTWHO_BACKGROUND=1
VIRTWHO_DEBUG=1
VIRTWHO_INTERVAL=5
VIRTWHO_ESX=1
VIRTWHO_ESX_OWNER=
VIRTWHO_ESX_ENV=Library
VIRTWHO_ESX_SERVER=10.66.78.2
VIRTWHO_ESX_USERNAME=administrator
VIRTWHO_ESX_PASSWORD=qwer1234P!
3. Restart virt-who service and check virt-who's log
[root@hp-z220-05 ~]# systemctl restart virt-who

[root@hp-z220-05 ~]# tail -f /var/log/rhsm/rhsm.log

Actual results:
There are two problems:
1. Although failed to start virt-who service, it hasn't show any error info in the terminal side, it should be the same bug as "bug 1243341"
2. It hasn't show any error info in the virt-who's log. customers will confuse to see virt-who's status unless run "systemctl status virt-who"

[root@hp-z220-05 ~]# systemctl status virt-who
● virt-who.service - Daemon for reporting virtual guest IDs to subscription-manager
   Loaded: loaded (/usr/lib/systemd/system/virt-who.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2015-09-15 14:57:42 CST; 11s ago
  Process: 27231 ExecStart=/usr/bin/virt-who (code=exited, status=1/FAILURE)
 Main PID: 27231 (code=exited, status=1/FAILURE)

Sep 15 14:57:41 hp-z220-05.qe.lab.eng.nay.redhat.com systemd[1]: Started Daemon for reporting virtual guest IDs to subscription-manager.
Sep 15 14:57:41 hp-z220-05.qe.lab.eng.nay.redhat.com systemd[1]: Starting Daemon for reporting virtual guest IDs to subscription-manager...
***********************It is show the reason*****************************
Sep 15 14:57:42 hp-z220-05.qe.lab.eng.nay.redhat.com virt-who[27231]: Option --esx-owner (or VIRTWHO_ESX_OWNER environment variable) ... set
**************************************************************************

Expected results:
When failed to start virt-who service, it should show error info in the log and terminal side

Additional info:
When "encrypted_password" isn't exist on system, restart virt-who service will show error info in the log as the following:
2015-09-15 14:55:49,609 [ERROR]  @virtwho.py:672 - [Errno 2] No such file or directory: '/var/lib/virt-who/key'

Comment 1 Radek Novacek 2015-09-15 08:21:32 UTC
This is caused by bug 1243341, marking it as duplicate.

*** This bug has been marked as a duplicate of bug 1243341 ***

Comment 2 Liushihui 2015-09-18 06:06:28 UTC
In the latest virt-who-0.14-8.el7.noarch, if "owner" or "env" have not been configured in /etc/virt-who.d/XXX, it will show error info in the log. please see it as the following. However, it won't generate any log if "owner" or "env" have not been configured in /etc/sysconfig/virt-who. I think it should show the same result on these two configure files in the same condition.

2015-09-18 02:02:02,352 [ERROR]  @virtwho.py:747 - Fatal error: Option `env` needs to be set in config `test-rhevm1`
Traceback (most recent call last):
  File "/usr/share/virt-who/virtwho.py", line 741, in <module>
    main()
  File "/usr/share/virt-who/virtwho.py", line 670, in main
    virtWho = VirtWho(logger, options)
  File "/usr/share/virt-who/virtwho.py", line 130, in __init__
    self.configManager = ConfigManager(self.logger, config_dir, smType=options.smType)
  File "/usr/share/virt-who/config.py", line 357, in __init__
    self._readConfig(parser)
  File "/usr/share/virt-who/config.py", line 364, in _readConfig
    config.checkOptions(self.smType, self.logger)
  File "/usr/share/virt-who/config.py", line 96, in checkOptions
    raise InvalidOption("Option `env` needs to be set in config `%s`" % (self.name))
InvalidOption: Option `env` needs to be set in config `test-rhevm1`

Comment 3 Radek Novacek 2015-09-22 13:35:06 UTC
Thanks for noticing, will fix together with bug 1254843.

*** This bug has been marked as a duplicate of bug 1254843 ***


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