Bug 1211435
Summary: | it should show error msg when giving an wrong env and owner which are not exist in Satellite server | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Liushihui <shihliu> |
Component: | virt-who | Assignee: | Jiri Hnidek <jhnidek> |
Status: | CLOSED ERRATA | QA Contact: | Eko <hsun> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.5 | CC: | bbuckingham, csnyder, ehelms, jcallaha, jhnidek, ldai, mmccune, ovasik, rbalakri, sgao, tomckay, yuefliu |
Target Milestone: | pre-dev-freeze | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: |
Cause:
When virt-who is configured to report to a Satellite instance and the values specified for 'owner' and/or 'env' do not exist in the Satellite instance, virt-who could silently fail.
Consequence:
Updated host-guest mappings required for consumption of host-based subscriptions may not be available to the appropriate guests.
Fix:
Virt-who will check for correct values of 'owner' and 'env' when reporting to Satellite 6 and output an error message in the logs should the 'owner' or 'env' not exist.
Result:
Virt-who users should be more easily able to discover issues when configuring virt-who to report to Satellite 6.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2018-04-10 16:19:53 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Liushihui
2015-04-14 01:58:56 UTC
I don't see where is the problem. virt-who in sat6 mode requires both owner and env to be set - either as commandline options or as environment variables (in /etc/sysconfig/virt-who). When these options are not supplied or are empty, virt-who fails to run. I think this is correct behaviour. Am I missing something? Radek, Actually, virt-who seems hasn't use the owner and env which configured on /etc/sysconfig/virt-who or command line, it just send the host/guest mapping to owner or env which system has registered. For example: system has been registered to "Default_Organization", no matter which owner or env set on configure file or command line, virt-who will send the host/guest mapping to the "Default_Organization",it seems the env and owner which configured in config file hasn't take effect. Meanwhile, In SAM1.4.1, in this situation, virt-who will show some error log which remind the configure is wrong when the configure env and owner isn't the same as it has registered. If owner and env will be used on satellite6, it should show error message when the configure is wrong. what's your opinion? [root@hp-z220-03 libvirt-test-API]# subscription-manager identity system identity: 2b7d110a-3be9-451d-bfa2-07e26d57d22f name: hp-z220-03.qe.lab.eng.nay.redhat.com org name: Default Organization org ID: Default_Organization Reproduce this issue as As it hasn't this problem on SAM1.4.1. it only exist on satellite6.1.0. Therefore, Reassign this bug to satellite6.1.0. Reproduce this issue as the following steps: Version-Release number of selected component (if applicable): subscription-manager-1.14.5-1.el6.x86_64 python-rhsm-1.14.2-1.el6.x86_64 virt-who-0.12-5.el6.noarch katello-headpin-1.4.3.28-1.el6sam_splice.noarch candlepin-0.9.6.5-1.el6sam.noarch Satellite-6.1.0-RHEL-7-20150417.0 How reproducible: Always Steps to Reproduce: 1.Register system to Satellite server, the owner is "Default_Organization" , the env is "Library" [root@rhel6 ~]# subscription-manager identity system identity: a83a17c7-a07f-436e-a2f3-f4312e746407 name: rhel6.7-20150415.redhat.com org name: Default Organization org ID: Default_Organization environment name: Library 2. Configure the different env and owner which isn't exist on Satellite. # cat /etc/virt-who.d/virt [test-esx1] type=esx server=10.66.79.68 username=Administrator #encrypted_password=07928b0a0b0caa7c6e3b5915466210bd password=qwer1234P! owner=aaa env=aaa 3. Restart virt-who service # service virt-who restart # tail -f /var/log/rhsm/rhsm.log Result: virt-who will send host/guest mapping to "Default_Organization" which is different from its config Expected result: As virt-who's configure is wrong ,It should show some error log,it can't send the host/guest mapping to "Default_Organization" Since this issue was entered in Red Hat Bugzilla, the release flag has been set to ? to ensure that it is properly evaluated for this release. Need to have discussions on how this should behave. This bug is still exist on Satellite-6.2.0-RHEL-7-20161205.0. Run virt-who with wrong env or owner, virt-who still send host/guest mapping info to defualt_org. Satellite version: satellite-6.2.5-1.0.el6sat.noarch katello-3.0.0-14.el6sat.noarch candlepin-0.9.54.14-1.el6.noarch foreman-1.11.0.59-1.el6sat.noarch Reproduced process: 1. Register system to satellite6.2 [root@hp-nehalem-02 ~]# subscription-manager identity system identity: 1f0ce4d0-d105-4eb2-a337-a0cf325d0cf9 name: hp-nehalem-02.rhts.eng.bos.redhat.com org name: Default Organization org ID: Default_Organization environment name: Library 2. Run virt-who with wrong env/owner: [root@hp-nehalem-02 ~]# virt-who --xen --xen-owner=xxxxxxx --xen-env=Library --xen-server=10.73.131.133 --xen-username=root --xen-password=Welcome1 -o -d 3. Check virt-who's log on terminal 4. Go to satellite webUI, check Default_Organization's hosts Result: Virtwho still can send mapping to org Default_Organization. It can show the xen hypervisor on satellite webUI under Default_Organization It still exist on satellite6.2.7-sp2. It still exist on RHEL-7.4-20170330.n.1 I suspect this might be to do with virt-who using the consumer cert of the local system for auth. Moving to the virt-who component for investigation. Moving to MODIFIED as the fix has been merged upstream and will be included in the rebase on upstream. Verified the bug with virt-who-0.21.0-1.el7.noarch, when configure virt-who against Satellite6.2/6.3 by CLI or /etc/virt-who.d/test.conf or /etc/sysconfig/virt-who with wrong owner or/and env, virt-who will fail to run the hypervisor with Error like below and send other available hypervisors successfully. 2017-11-03 09:49:39,913 [virtwho.destination_-5765656196432590097 ERROR] MainProcess(119707):Thread-5 @virt.py:_send_data:640 - Error during hypervisor checkin: Cannot send data to: Default_Organization, because owner from configuration: xxxxxx is different Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/virtwho/virt/virt.py", line 623, in _send_data options=self.options) File "/usr/lib/python2.7/site-packages/virtwho/manager/subscriptionmanager/subscriptionmanager.py", line 238, in hypervisorCheckIn connection = self._connect(report.config) File "/usr/lib/python2.7/site-packages/virtwho/manager/subscriptionmanager/subscriptionmanager.py", line 204, in _connect self._check_owner_lib(kwargs, config) File "/usr/lib/python2.7/site-packages/virtwho/manager/subscriptionmanager/subscriptionmanager.py", line 123, in _check_owner_lib (owner_id, config['owner']) ManagerError: Cannot send data to: Default_Organization, because owner from configuration: xxxxxx is different 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://access.redhat.com/errata/RHEA-2018:0895 |