Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
When virt-who run at xen mode, disable "env"/"owner" or set "env"/"owner" to null in /etc/virt-who.d/xxxx, virt-who still can be started.
If I disable VIRTWHO_XEN_ENV/VIRTWHO_XEN_OWNER in /etc/sysconfig/virt-who, virt-who started failed and feedback with error info "virt-who can't be started: Option --xen-env (or VIRTWHO_XEN_ENV environment variable) needs to be set"
If I run virt-who CLI without "--xen-env/--xen-owner" option, virt-who started failed and feedback with error info as before.
Version-Release number of selected component (if applicable):
virt-who-0.17-7.el7.noarch
subscription-manager-1.17.9-1.el7.x86_64
python-rhsm-1.17.5-1.el7.x86_64
How reproducible:
Always
Steps to Reproduce:
1. create the config fie in /etc/virt-who.d, make sure without env/owner option
[root@hp-z220-08 ~]# cat /etc/virt-who.d/xen
[xen]
type=xen
server=10.73.5.210
username=root
password=Welcome1
owner=ACME_Corporation
2. restart virt-who service and check virt-who's log
[root@hp-z220-08 ~]# service virt-who restart
Redirecting to /bin/systemctl restart virt-who.service
[root@hp-z220-08 ~]# service virt-who status
Redirecting to /bin/systemctl status virt-who.service
[root@hp-z220-08 ~]# tail -f /var/log/rhsm/rhsm.log
● 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: active (running) since Thu 2016-08-04 01:25:01 EDT; 14s ago
Main PID: 14059 (virt-who)
CGroup: /system.slice/virt-who.service
├─14059 /usr/bin/python2 /usr/bin/virt-who
└─14066 /usr/bin/python2 /usr/bin/virt-who
2016-08-04 01:24:56,717 [virtwho.main DEBUG] MainProcess(14039):MainThread @executor.py:terminate:303 - virt-who is shutting down
2016-08-04 01:25:01,904 [virtwho.init DEBUG] MainProcess(14059):MainThread @executor.py:__init__:65 - Using config named 'xen'
2016-08-04 01:25:01,904 [virtwho.init INFO] MainProcess(14059):MainThread @main.py:main:160 - Using configuration "xen" ("xen" mode)
2016-08-04 01:25:01,905 [virtwho.init INFO] MainProcess(14059):MainThread @main.py:main:162 - Using reporter_id='hp-z220-08.qe.lab.eng.nay.redhat.com-63e1ccb2df0242c98fa91794572d568b'
2016-08-04 01:25:01,906 [virtwho.main DEBUG] MainProcess(14059):MainThread @executor.py:run:171 - Starting infinite loop with 60 seconds interval
2016-08-04 01:25:01,935 [virtwho.xen DEBUG] Xen-1(14066):MainThread @virt.py:run:364 - Virt backend 'xen' started
2016-08-04 01:25:01,935 [virtwho.xen DEBUG] Xen-1(14066):MainThread @xen.py:_prepare:42 - Logging into XEN pools https://10.73.5.210
2016-08-04 01:25:02,016 [virtwho.xen DEBUG] Xen-1(14066):MainThread @xen.py:login:52 - XEN pool login successful with user root
2016-08-04 01:25:02,496 [virtwho.xen DEBUG] Xen-1(14066):MainThread @xen.py:getHostGuestMapping:80 - Control Domain 0e57a500-1ff6-464e-b863-fd8ee93f2738 is ignored
2016-08-04 01:25:02,496 [virtwho.xen DEBUG] Xen-1(14066):MainThread @virt.py:enqueue:357 - Report for config "xen" gathered, putting to queue for sending
2016-08-04 01:25:02,507 [virtwho.main DEBUG] MainProcess(14059):MainThread @subscriptionmanager.py:_connect:123 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2016-08-04 01:25:02,539 [virtwho.main DEBUG] MainProcess(14059):MainThread @subscriptionmanager.py:hypervisorCheckIn:171 - Checking if server has capability 'hypervisor_async'
2016-08-04 01:25:02,573 [virtwho.main DEBUG] MainProcess(14059):MainThread @subscriptionmanager.py:hypervisorCheckIn:183 - Server does not have 'hypervisors_async' capability
2016-08-04 01:25:02,573 [virtwho.main INFO] MainProcess(14059):MainThread @subscriptionmanager.py:hypervisorCheckIn:194 - Sending update in hosts-to-guests mapping for config "xen": 1 hypervisors and 0 guests found
2016-08-04 01:25:02,573 [virtwho.main DEBUG] MainProcess(14059):MainThread @subscriptionmanager.py:hypervisorCheckIn:195 - Host-to-guest mapping: {
"b27310f3-77ec-46ed-be4e-5609e85e280c": []
}
2016-08-04 01:25:02,618 [virtwho.main ERROR] MainProcess(14059):MainThread @executor.py:send:143 - Unable to send data: Communication with subscription manager failed with code 404: Couldn't find environment 'None'
Actual results:
Although virt-who will show error in log, virt-who can start normally.
Expected results:
Virt-who shouldn't be started when it with null env/owner. And the error info should the same as the following:
[root@hp-z220-08 ~]# service virt-who restart
Redirecting to /bin/systemctl restart virt-who.service
Job for virt-who.service failed because the control process exited with error code. See "systemctl status virt-who.service" and "journalctl -xe" for details.
[root@hp-z220-08 ~]# systemctl status virt-who.service
● 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 Thu 2016-08-04 01:14:42 EDT; 18s ago
Process: 13904 ExecStart=/usr/bin/virt-who (code=exited, status=1/FAILURE)
Main PID: 13904 (code=exited, status=1/FAILURE)
Status: "virt-who can't be started: Option `env` needs to be set in config `xen`"
Additional info:
When virt-who run at rhevm, esx and hyperv mode ,it hasn't this problem.
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.
https://rhn.redhat.com/errata/RHBA-2016-2387.html
Description of problem: When virt-who run at xen mode, disable "env"/"owner" or set "env"/"owner" to null in /etc/virt-who.d/xxxx, virt-who still can be started. If I disable VIRTWHO_XEN_ENV/VIRTWHO_XEN_OWNER in /etc/sysconfig/virt-who, virt-who started failed and feedback with error info "virt-who can't be started: Option --xen-env (or VIRTWHO_XEN_ENV environment variable) needs to be set" If I run virt-who CLI without "--xen-env/--xen-owner" option, virt-who started failed and feedback with error info as before. Version-Release number of selected component (if applicable): virt-who-0.17-7.el7.noarch subscription-manager-1.17.9-1.el7.x86_64 python-rhsm-1.17.5-1.el7.x86_64 How reproducible: Always Steps to Reproduce: 1. create the config fie in /etc/virt-who.d, make sure without env/owner option [root@hp-z220-08 ~]# cat /etc/virt-who.d/xen [xen] type=xen server=10.73.5.210 username=root password=Welcome1 owner=ACME_Corporation 2. restart virt-who service and check virt-who's log [root@hp-z220-08 ~]# service virt-who restart Redirecting to /bin/systemctl restart virt-who.service [root@hp-z220-08 ~]# service virt-who status Redirecting to /bin/systemctl status virt-who.service [root@hp-z220-08 ~]# tail -f /var/log/rhsm/rhsm.log ● 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: active (running) since Thu 2016-08-04 01:25:01 EDT; 14s ago Main PID: 14059 (virt-who) CGroup: /system.slice/virt-who.service ├─14059 /usr/bin/python2 /usr/bin/virt-who └─14066 /usr/bin/python2 /usr/bin/virt-who 2016-08-04 01:24:56,717 [virtwho.main DEBUG] MainProcess(14039):MainThread @executor.py:terminate:303 - virt-who is shutting down 2016-08-04 01:25:01,904 [virtwho.init DEBUG] MainProcess(14059):MainThread @executor.py:__init__:65 - Using config named 'xen' 2016-08-04 01:25:01,904 [virtwho.init INFO] MainProcess(14059):MainThread @main.py:main:160 - Using configuration "xen" ("xen" mode) 2016-08-04 01:25:01,905 [virtwho.init INFO] MainProcess(14059):MainThread @main.py:main:162 - Using reporter_id='hp-z220-08.qe.lab.eng.nay.redhat.com-63e1ccb2df0242c98fa91794572d568b' 2016-08-04 01:25:01,906 [virtwho.main DEBUG] MainProcess(14059):MainThread @executor.py:run:171 - Starting infinite loop with 60 seconds interval 2016-08-04 01:25:01,935 [virtwho.xen DEBUG] Xen-1(14066):MainThread @virt.py:run:364 - Virt backend 'xen' started 2016-08-04 01:25:01,935 [virtwho.xen DEBUG] Xen-1(14066):MainThread @xen.py:_prepare:42 - Logging into XEN pools https://10.73.5.210 2016-08-04 01:25:02,016 [virtwho.xen DEBUG] Xen-1(14066):MainThread @xen.py:login:52 - XEN pool login successful with user root 2016-08-04 01:25:02,496 [virtwho.xen DEBUG] Xen-1(14066):MainThread @xen.py:getHostGuestMapping:80 - Control Domain 0e57a500-1ff6-464e-b863-fd8ee93f2738 is ignored 2016-08-04 01:25:02,496 [virtwho.xen DEBUG] Xen-1(14066):MainThread @virt.py:enqueue:357 - Report for config "xen" gathered, putting to queue for sending 2016-08-04 01:25:02,507 [virtwho.main DEBUG] MainProcess(14059):MainThread @subscriptionmanager.py:_connect:123 - Authenticating with certificate: /etc/pki/consumer/cert.pem 2016-08-04 01:25:02,539 [virtwho.main DEBUG] MainProcess(14059):MainThread @subscriptionmanager.py:hypervisorCheckIn:171 - Checking if server has capability 'hypervisor_async' 2016-08-04 01:25:02,573 [virtwho.main DEBUG] MainProcess(14059):MainThread @subscriptionmanager.py:hypervisorCheckIn:183 - Server does not have 'hypervisors_async' capability 2016-08-04 01:25:02,573 [virtwho.main INFO] MainProcess(14059):MainThread @subscriptionmanager.py:hypervisorCheckIn:194 - Sending update in hosts-to-guests mapping for config "xen": 1 hypervisors and 0 guests found 2016-08-04 01:25:02,573 [virtwho.main DEBUG] MainProcess(14059):MainThread @subscriptionmanager.py:hypervisorCheckIn:195 - Host-to-guest mapping: { "b27310f3-77ec-46ed-be4e-5609e85e280c": [] } 2016-08-04 01:25:02,618 [virtwho.main ERROR] MainProcess(14059):MainThread @executor.py:send:143 - Unable to send data: Communication with subscription manager failed with code 404: Couldn't find environment 'None' Actual results: Although virt-who will show error in log, virt-who can start normally. Expected results: Virt-who shouldn't be started when it with null env/owner. And the error info should the same as the following: [root@hp-z220-08 ~]# service virt-who restart Redirecting to /bin/systemctl restart virt-who.service Job for virt-who.service failed because the control process exited with error code. See "systemctl status virt-who.service" and "journalctl -xe" for details. [root@hp-z220-08 ~]# systemctl status virt-who.service ● 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 Thu 2016-08-04 01:14:42 EDT; 18s ago Process: 13904 ExecStart=/usr/bin/virt-who (code=exited, status=1/FAILURE) Main PID: 13904 (code=exited, status=1/FAILURE) Status: "virt-who can't be started: Option `env` needs to be set in config `xen`" Additional info: When virt-who run at rhevm, esx and hyperv mode ,it hasn't this problem.