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 1368341 - Virt-who still send mapping info to stage candlepin although run virt-who with --sam/--satellite6
Summary: Virt-who still send mapping info to stage candlepin although run virt-who wit...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who
Version: 7.3
Hardware: x86_64
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Nikos Moumoulidis
QA Contact: Eko
URL:
Whiteboard:
Depends On:
Blocks: 1409055
TreeView+ depends on / blocked
 
Reported: 2016-08-19 06:34 UTC by Liushihui
Modified: 2019-10-28 07:20 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1409055 (view as bug list)
Environment:
Last Closed: 2018-10-30 10:47:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin virt-who pull 151 0 None closed 1368341: Warn that --sam/--satellite6 are unused & deprecated ENT-251 2020-03-09 22:08:46 UTC
Red Hat Product Errata RHBA-2018:3169 0 None None None 2018-10-30 10:48:02 UTC

Description Liushihui 2016-08-19 06:34:39 UTC
Description of problem:
When system registered to stage candlepin, run virt-who with --sam/satellite6 in CLI,virt-who still can send mapping info to stage candlepin.

Version-Release number of selected component (if applicable):
virt-who-0.17-7.el7.noarch
subscription-manager-1.17.10-1.el7.x86_64
python-rhsm-1.17.6-1.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Register system to stage candlepin
2. Run virt-who in CLI with --sam/--satellite6
[root@cloud-qe-16-vm-03 ~]# virt-who --hyperv --hyperv-owner=8036391 --hyperv-env=Library --hyperv-server=10.73.5.203 --hyperv-username=administrator --hyperv-password=Welcome1 -o -d --sam
or 
[root@cloud-qe-16-vm-03 ~]# virt-who --hyperv --hyperv-owner=8036391 --hyperv-env=Library --hyperv-server=10.73.5.203 --hyperv-username=administrator --hyperv-password=Welcome1 -o -d --satellite6
2016-08-19 02:19:54,065 [virtwho.init INFO] MainProcess(15478):MainThread @main.py:main:160 - Using configuration "env/cmdline" ("hyperv" mode)
2016-08-19 02:19:54,066 [virtwho.init INFO] MainProcess(15478):MainThread @main.py:main:162 - Using reporter_id='cloud-qe-16-vm-03.idmqe.lab.eng.bos.redhat.com-41e2151a02208a886d33766e1c88c11e'
2016-08-19 02:19:54,109 [virtwho.env_cmdline DEBUG] MainProcess(15478):MainThread @hyperv.py:__init__:472 - Hyper-V url: http://10.73.5.203:5985/wsman
2016-08-19 02:19:54,115 [virtwho.env_cmdline DEBUG] HyperV-1(15485):MainThread @virt.py:run:364 - Virt backend 'env/cmdline' started
2016-08-19 02:19:54,761 [virtwho.env_cmdline DEBUG] HyperV-1(15485):MainThread @hyperv.py:retry_ntlm_negotitate:64 - Using NTLM authentication
2016-08-19 02:19:55,382 [virtwho.env_cmdline DEBUG] HyperV-1(15485):MainThread @hyperv.py:retry_ntlm_authenticate:77 - Sending NTLM authentication data
2016-08-19 02:19:55,706 [virtwho.env_cmdline DEBUG] HyperV-1(15485):MainThread @hyperv.py:retry_ntlm_authenticate:100 - NTLM authentication successful
2016-08-19 02:19:55,715 [virtwho.env_cmdline DEBUG] HyperV-1(15485):MainThread @hyperv.py:getHostGuestMapping:520 - Unable to enumerate using root/virtualization namespace, trying root/virtualization/v2 namespace
2016-08-19 02:20:02,162 [virtwho.env_cmdline DEBUG] HyperV-1(15485):MainThread @virt.py:enqueue:357 - Report for config "env/cmdline" gathered, putting to queue for sending
2016-08-19 02:20:02,166 [virtwho.env_cmdline DEBUG] HyperV-1(15485):MainThread @virt.py:run:385 - Virt backend 'env/cmdline' stopped after sending one report
2016-08-19 02:20:02,193 [virtwho.main DEBUG] MainProcess(15478):MainThread @subscriptionmanager.py:_connect:123 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2016-08-19 02:20:02,737 [virtwho.main DEBUG] MainProcess(15478):MainThread @subscriptionmanager.py:hypervisorCheckIn:171 - Checking if server has capability 'hypervisor_async'
2016-08-19 02:20:03,279 [virtwho.main DEBUG] MainProcess(15478):MainThread @subscriptionmanager.py:hypervisorCheckIn:183 - Server does not have 'hypervisors_async' capability
2016-08-19 02:20:03,280 [virtwho.main INFO] MainProcess(15478):MainThread @subscriptionmanager.py:hypervisorCheckIn:194 - Sending update in hosts-to-guests mapping for config "env/cmdline": 1 hypervisors and 2 guests found
2016-08-19 02:20:03,281 [virtwho.main DEBUG] MainProcess(15478):MainThread @subscriptionmanager.py:hypervisorCheckIn:195 - Host-to-guest mapping: {
    "564D900A-2E82-672D-2CB7-C17F0B3FF876": [
        {
            "guestId": "EBBF4A99-85AD-0947-AB31-45DD18FE96E5", 
            "state": 1, 
            "attributes": {
                "active": 1, 
                "virtWhoType": "hyperv"
            }
        }, 
        {
            "guestId": "3A830D1F-AC88-EA45-94D2-9AF69CCEAE6D", 
            "state": 1, 
            "attributes": {
                "active": 1, 
                "virtWhoType": "hyperv"
            }
        }
    ]
}
2016-08-19 02:20:03,873 [virtwho.main DEBUG] MainProcess(15478):MainThread @executor.py:send_report:101 - Report for config "env/cmdline" sent
2016-08-19 02:20:03,875 [virtwho.main DEBUG] MainProcess(15478):MainThread @__main__.py:main:19 - virt-who terminated
2016-08-19 02:20:03,876 [virtwho.main DEBUG] MainProcess(15478):MainThread @executor.py:terminate:303 - virt-who is shutting down

Actual results:
virt-who can report host/guest associations to stage candlepin.

Expected results:
Virt-who shouldn't report host/guest associations to stage candlepin since virt-who run with --sam/--satellite6, it should show some remind info. such as:
"--sam/--satellite6 is not supported on stage candlepin, exiting"

Additional info:

Comment 1 Radek Novacek 2016-08-23 11:23:33 UTC
I don't understand why virt-who should threat stage candlepin differently. It uses the same API.

Is there any reason why should virt-who behave differently with stage candlepin?

Comment 2 Liushihui 2016-08-30 06:21:09 UTC
Radek, As I noticed that "--satellite6/--sam" option hasn't taken any effect, virt-who can send mapping info to the registered server no matter what server options has been specified in the CLI command. Meanwhile, these two options' functions are different from it on the virt-who man page.

please see the instances as the following:
1. Register to stage candlepin, run virt-who with "--satellite6/--sam", virt-who can send mapping info to stage candlepin.
# virt-who --sam -o -d 
# virt-who --satellite6 -o -d 
2. Register to SAM, run virt-who with "--satellite6/--sam", virt-who can send mapping info to SAM.
# virt-who --sam -o -d 
# virt-who --satellite6 -o -d 
3. Register to Satellite6, run virt-who with "--satellite6/--sam", virt-who can send mapping info to Satellite6.

However, in the virt-who man page ,I notice these two options explanation as the following, There are two differences.
1. It hasn't reminded with "--satellite6/--sam" can reported mapping to stage candlepin. 
2. It hasn't reminded with "--satellite6" can reported to SAM.
# man virt-who
--satellite6 Report host/guest associations to the Satellite 6 server
--sam  Report host/guest associations to the Subscription Asset Manager or Satellite 6 [default]

Therefore, I suggest two types of updating.
1. Update the virt-who man page to make it the same as the actual result
--satellite6 Report host/guest associations to the SAM, Satellite 6 server or Stage Candlepin.
--sam  Report host/guest associations to the SAM,Satellite 6 server or Stage Candlepin.[default]
2. Remove --sam/satellite6 since it hasn't taken any effect.

Comment 3 Chris Snyder 2016-12-22 16:33:42 UTC
I believe the fix for this is to do one of the following:
1) Remove those options (as the APIs are the same either way)
2) Improve them to be useful.

My preference would be option 1.

Some brief investigation leads me to believe not much (aside from some config validation) is done with those options (--sam/--satellite6).

Comment 4 Chris Snyder 2017-06-08 21:04:37 UTC
After looking at this again, I still think the best solution will be to output a warning that the '--sam' and '--satellite6' options specify the default behaviour and as such are not actually used.

In addition to that change we should update the man page to reflect the fact that these options are the default behaviour and their use is deprecated.

Comment 5 yuefliu 2017-11-17 07:56:09 UTC
By checking with virt-who-0.21.0-1.el7.noarch, in virt-who man page there have been [Deprecated] warning for the options, but no related reminder info in rhsm log.

# man virt-who

   --sam  [Deprecated] Report host/guest associations to the Subscription Asset Manager or Satellite 6 [default]

   --satellite5 [Deprecated] Report host/guest associations to the Satellite 5 server

  --satellite6 [Deprecated] Report host/guest associations to the Satellite 6 server

Comment 12 errata-xmlrpc 2018-10-30 10:47:13 UTC
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/RHBA-2018:3169


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