Bug 1226332 - virt-who does not correctly report to Satellite 6 when using multiple types of source (RHEV and VMware)
Summary: virt-who does not correctly report to Satellite 6 when using multiple types o...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Candlepin
Version: 6.0.8
Hardware: All
OS: Linux
unspecified
high vote
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Chris Roberts
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-29 13:08 UTC by Alexander Rydekull
Modified: 2019-08-12 14:04 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 09:15:50 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1501 normal SHIPPED_LIVE Red Hat Satellite 6.2 Capsule and Server 2016-07-27 12:28:58 UTC

Description Alexander Rydekull 2015-05-29 13:08:39 UTC
Description of problem:
We have configured virt-who to connect to both RHEV and VMware.

VMware information does not appear inside Satellite 6, we can see the logs showing reports going from virt-who to satellite and foreman log giving a 200 ok, but it seems like its only the RHEV-information and not the vmware-information.

Version-Release number of selected component (if applicable):
RHEL7, Sat 6.0.8, virt-who-0.11-5.el7.noarch

How reproducible:
Always

Steps to Reproduce:
1. Install Sat6, virt-who
2. Configure virt-who to connect to satellite, rhev and vmware
3. Start services

Actual results:
VMware did not appear

Expected results:
VMware hosts to appear

Additional info:
After a while, looking at the issue, all vmware hosts suddently appeared so it indicates that something is wrong. Since our interval was set to 600 seconds from the start and we lowered it to 200 seconds. And it took well over an hour for stuff to appear.

Comment 1 Alexander Rydekull 2015-05-29 13:10:36 UTC
# grep -v \# /etc/sysconfig/virt-who
VIRTWHO_BACKGROUND=1
VIRTWHO_DEBUG=1
VIRTWHO_INTERVAL=200

###############################
# cat /etc/virt-who.d/*
[rhev-tst]
type=rhevm
server=https://rhevm.domain:443
username=admin@internal
encrypted_password=
owner=Org
env=Library

[sat6]
type=satellite
satellite-server=sat6.domain
satellite-username=virt-who
satellite-encrypted_password=

[vmware]
type=esx
server=vcenter.domain
username=user@DOMAIN
encrypted_password=
owner=Org
env=Library

###############################
Output from /var/log/rhsm/rhsm.log

2015-05-29 14:23:08,018 [DEBUG]  @virtwho.py:83 - Using config named 'rhev-tst'
2015-05-29 14:23:08,021 [DEBUG]  @virtwho.py:83 - Using config named 'vmware'
2015-05-29 14:23:08,021 [INFO]  @virtwho.py:460 - Using configuration "rhev-tst" ("rhevm" mode)
2015-05-29 14:23:08,021 [INFO]  @virtwho.py:460 - Using configuration "vmware" ("esx" mode)
2015-05-29 14:23:08,021 [DEBUG]  @virtwho.py:170 - Starting infinite loop with 200 seconds interval
2015-05-29 14:23:08,891 [INFO]  @subscriptionmanager.py:119 - Sending update in hosts-to-guests mapping: {'c5d3aefc-b829-4bec-a56f-a5fd5a0cda61': ['5e9b6847-4e94-470f-9a41-376fb0d5eca9', 'c9f1720f-0b04-471e-84da-ca479ad6d929', 'c6c4cc54-f071-4ad3-84a2-6c5262315457', '4d776310-6187-46bf-aa4e-5837f603d802', 'bc11d8c1-d7c7-4ac8-bbf2-85bde0f153be', '20877bbd-3520-4477-962c-3e204ccde102', 'b9b848cc-c0c8-452c-bff3-bb4f22ecc47e', '8efe5450-d3f3-4130-8557-647e3dd0247b', '64bd50e4-cc40-4dad-945a-dfa083651237', 'de3afff1-ea30-496b-a0a9-1f2a710ec544', 'b2aae82f-1416-4e01-b320-276b6364fe72', '55d4fd1a-8fb2-4064-b72c-8b09217af2c6', '6d0f92f1-5c12-4d21-8172-0329c81ead55'], '1e1f9d8b-45cd-4ac2-909a-cc218de3f1ed': ['440c77f7-d694-4747-b5e7-deed9e3a0e61', '327fbbed-fc73-4649-8b63-964238165afc', '5e053e01-e273-4100-8a16-ce11eb458767', 'd7632ddf-8da7-4283-8fac-94b66b63998b', 'fe52a386-645c-4098-871d-27d893c45d0f', '56a97618-6e60-40ec-a115-15a2f7d1d321'], 'a28654f2-f5f9-40b5-864b-340af6922585': ['95313510-633b-4f14-924d-26146c29b58f', '62db84a5-178e-4d35-8364-372c06010cea', '6c158c29-7e54-4c30-b469-331c6b7caf85', 'a03bed57-b2e6-44d8-9dec-05fff31060e6', 'f99586ec-d1a5-4f56-9451-8fcbfec7c753', 'd17727a2-8d11-4e23-9990-b6ff26e2dc77', '98b4f509-37f3-430c-ac0b-fc75f4fbd98d', 'a7973a0e-dd1c-4959-a429-d71d84490971', '9c2c0cb9-dde9-4220-b77d-376888608c56', '1873831b-dad9-448b-99b4-6a4dfc613b24', '3504b5fb-7da7-45c3-b47a-5f6a85567cb6', 'be9c0f0d-a102-4e63-8c14-c5672e0e5bdf', 'f4bf2b83-935a-46f5-8f9e-5e8407cebd11', 'e9e3c5a1-71fe-4a0f-a359-a5f64fa76bab'], '1acbe922-e39e-4139-8d0c-33f777fbdd9a': ['c76e3885-887f-4c1f-a106-846f1aafd2a5', 'd819087d-9db1-4eac-9ec0-b299b3001d31', '286fc5ec-eccd-4211-8582-f29bf4503484', '2cb59cc1-00a6-41a6-9cdb-34334aefc6cc', 'f1054353-e207-4e49-9d74-6949153aef43', 'cf9cbccb-efeb-4103-b956-1e876144e264', '356423d2-5202-4067-b09a-eff7b4c54ea2', 'c34705dc-65b3-4fcb-afbb-8664b23d5c9e', 'd6a4190f-5de1-4b24-9f67-7cfeb134a3ea', '72f37d72-8426-4644-a098-700ef5121605', 'ecf81ba4-bb03-4b63-884d-dfd9d5f52377', '7279e7df-bf8a-4581-8d29-83482863fe65', 'e90d3f34-7b46-47b3-a375-6dec52351375', 'cc23f06e-871d-41c4-93b0-a3034d751301', '693d59ff-224c-48d9-8072-69c375a986a3', 'e2d11c99-88f1-450a-a213-c20864cb3c15']}

###############################
Output from /var/log/foreman/production.log

Processing by Katello::Api::Rhsm::CandlepinProxiesController#server_status as JSON
Completed 200 OK in 165ms (Views: 0.8ms | ActiveRecord: 0.0ms)
Processing by Katello::Api::Rhsm::CandlepinProxiesController#hypervisors_update as JSON
  Parameters: {"c5d3aefc-b829-4bec-a56f-a5fd5a0cda61"=>["5e9b6847-4e94-470f-9a41-376fb0d5eca9", "c9f1720f-0b04-471e-84da-ca479ad6d929", "c6c4cc54-f071-4ad3-84a2-6c5262315457", "4d776310-6187-46bf-aa4e-5837f603d802", "bc11d8c1-d7c7-4ac8-bbf2-85bde0f153be", "20877bbd-3520-4477-962c-3e204ccde102", "b9b848cc-c0c8-452c-bff3-bb4f22ecc47e", "8efe5450-d3f3-4130-8557-647e3dd0247b", "64bd50e4-cc40-4dad-945a-dfa083651237", "de3afff1-ea30-496b-a0a9-1f2a710ec544", "b2aae82f-1416-4e01-b320-276b6364fe72", "55d4fd1a-8fb2-4064-b72c-8b09217af2c6", "6d0f92f1-5c12-4d21-8172-0329c81ead55"], "1e1f9d8b-45cd-4ac2-909a-cc218de3f1ed"=>["440c77f7-d694-4747-b5e7-deed9e3a0e61", "327fbbed-fc73-4649-8b63-964238165afc", "5e053e01-e273-4100-8a16-ce11eb458767", "d7632ddf-8da7-4283-8fac-94b66b63998b", "fe52a386-645c-4098-871d-27d893c45d0f", "56a97618-6e60-40ec-a115-15a2f7d1d321"], "a28654f2-f5f9-40b5-864b-340af6922585"=>["95313510-633b-4f14-924d-26146c29b58f", "62db84a5-178e-4d35-8364-372c06010cea", "6c158c29-7e54-4c30-b469-331c6b7caf85", "a03bed57-b2e6-44d8-9dec-05fff31060e6", "f99586ec-d1a5-4f56-9451-8fcbfec7c753", "d17727a2-8d11-4e23-9990-b6ff26e2dc77", "98b4f509-37f3-430c-ac0b-fc75f4fbd98d", "a7973a0e-dd1c-4959-a429-d71d84490971", "9c2c0cb9-dde9-4220-b77d-376888608c56", "1873831b-dad9-448b-99b4-6a4dfc613b24", "3504b5fb-7da7-45c3-b47a-5f6a85567cb6", "be9c0f0d-a102-4e63-8c14-c5672e0e5bdf", "f4bf2b83-935a-46f5-8f9e-5e8407cebd11", "e9e3c5a1-71fe-4a0f-a359-a5f64fa76bab"], "1acbe922-e39e-4139-8d0c-33f777fbdd9a"=>["c76e3885-887f-4c1f-a106-846f1aafd2a5", "d819087d-9db1-4eac-9ec0-b299b3001d31", "286fc5ec-eccd-4211-8582-f29bf4503484", "2cb59cc1-00a6-41a6-9cdb-34334aefc6cc", "f1054353-e207-4e49-9d74-6949153aef43", "cf9cbccb-efeb-4103-b956-1e876144e264", "356423d2-5202-4067-b09a-eff7b4c54ea2", "c34705dc-65b3-4fcb-afbb-8664b23d5c9e", "d6a4190f-5de1-4b24-9f67-7cfeb134a3ea", "72f37d72-8426-4644-a098-700ef5121605", "ecf81ba4-bb03-4b63-884d-dfd9d5f52377", "7279e7df-bf8a-4581-8d29-83482863fe65", "e90d3f34-7b46-47b3-a375-6dec52351375", "cc23f06e-871d-41c4-93b0-a3034d751301", "693d59ff-224c-48d9-8072-69c375a986a3", "e2d11c99-88f1-450a-a213-c20864cb3c15"], "owner"=>"Org", "env"=>"Library"}
Completed 200 OK in 488ms (Views: 9.2ms | ActiveRecord: 4.0ms)

Comment 2 RHEL Product and Program Management 2015-05-29 13:12:28 UTC
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.

Comment 4 Bryan Kearney 2015-05-29 15:07:05 UTC
Please try testing this with two virt whos, one per each virt-fabric.

Comment 6 Alexander Rydekull 2015-06-04 08:00:55 UTC
We have tested by starting to virt-who on the Satellite (actually requires you to copy and modify virt-who to change the PID, since virt-who doesnt seem to support supplying a speciific configuration on the command-line).

[root@sat6 ~]# diff /usr/bin/virt-who /usr/bin/virt-who2
9c9
<     exec /usr/bin/python /usr/share/virt-who/virtwho.py "$@"
---
>     exec /usr/bin/python /usr/share/virt-who/virtwho2.py "$@"
[root@sat6 ~]# diff /usr/share/virt-who/virtwho.py /usr/share/virt-who/virtwho2.py
65c65
< PIDFILE = "/var/run/virt-who.pid"
---
> PIDFILE = "/var/run/virt-who2.pid"

So its running virt-who.py towards RHEV and virt-who2.py towards VMware.

With that being said. Running it like this, it just doesn't seem like its working properly either.
1. It doesnt seem to follow the set interval
2. I sort of dont see alot of output from virtwho.py in the log

[root@sat6 ~]# grep -i INTERVAL /etc/sysconfig/virt-who 
#VIRTWHO_INTERVAL=0
VIRTWHO_INTERVAL=600
[root@sat6 ~]# grep virtwho /var/log/rhsm/rhsm.log | sed 's/: .*//g'
2015-06-03 07:47:42,918 [INFO]  @virtwho2.py:161 - Updated host
2015-06-03 07:47:42,919 [INFO]  @virtwho2.py:161 - Updated host
2015-06-03 07:47:42,919 [INFO]  @virtwho2.py:161 - Updated host
2015-06-03 07:47:42,919 [INFO]  @virtwho2.py:161 - Updated host
2015-06-03 11:02:31,876 [INFO]  @virtwho2.py:161 - Updated host
2015-06-03 11:02:31,877 [INFO]  @virtwho2.py:161 - Updated host
2015-06-03 11:02:31,877 [INFO]  @virtwho2.py:161 - Updated host
2015-06-03 11:02:31,877 [INFO]  @virtwho2.py:161 - Updated host
2015-06-03 12:39:51,363 [INFO]  @virtwho2.py:161 - Updated host
2015-06-03 12:39:51,364 [INFO]  @virtwho2.py:161 - Updated host
2015-06-03 14:17:49,540 [INFO]  @virtwho2.py:161 - Updated host
2015-06-03 14:17:49,541 [INFO]  @virtwho2.py:161 - Updated host
2015-06-03 14:17:49,541 [INFO]  @virtwho2.py:161 - Updated host
2015-06-03 15:54:48,021 [INFO]  @virtwho2.py:161 - Updated host
2015-06-03 15:54:48,022 [INFO]  @virtwho2.py:161 - Updated host
2015-06-03 17:33:09,848 [INFO]  @virtwho2.py:161 - Updated host
2015-06-03 17:33:09,849 [INFO]  @virtwho2.py:161 - Updated host
2015-06-03 19:09:55,170 [INFO]  @virtwho2.py:161 - Updated host
2015-06-03 19:09:55,170 [INFO]  @virtwho2.py:161 - Updated host
2015-06-04 00:01:05,137 [INFO]  @virtwho2.py:161 - Updated host
2015-06-04 00:01:05,137 [INFO]  @virtwho2.py:161 - Updated host
2015-06-04 00:01:05,137 [INFO]  @virtwho2.py:161 - Updated host
2015-06-04 00:01:05,138 [INFO]  @virtwho2.py:161 - Updated host
2015-06-04 08:07:33,517 [INFO]  @virtwho2.py:161 - Updated host
2015-06-04 08:07:33,518 [INFO]  @virtwho2.py:161 - Updated host
2015-06-04 09:44:42,078 [INFO]  @virtwho2.py:161 - Updated host
2015-06-04 09:44:42,078 [INFO]  @virtwho2.py:161 - Updated host

So, no, I dont see that like its working. Looking at this, the only thing I can see making it possible is running virt-who on multiple machines.

Comment 7 William Poteat 2015-08-10 15:31:38 UTC
You really should not try to run 2 virt-who instances at one time on the same machine.

That said, the current build of virt-who tagged into Satellite should be able to run against more than one type of hypervisor. Please retest with the current build.

Comment 8 William Poteat 2015-08-10 15:35:33 UTC
Also, those entries in /etc/sysconfig/virt-who are not config entries. They are examples of environment variables. You need to set them in the environment.

Comment 11 errata-xmlrpc 2016-07-27 09:15:50 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-2016:1501


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