Bug 1304534

Summary: virt-who 1.15 on Satellite does not report errors when not working
Product: Red Hat Enterprise Linux 7 Reporter: Kathryn Dixon <kdixon>
Component: virt-whoAssignee: Radek Novacek <rnovacek>
Status: CLOSED NOTABUG QA Contact: Li Bin Liu <liliu>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: christopher.stanley, hsun, kdixon, ovasik, sgao, shihliu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-14 07:01:43 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 Kathryn Dixon 2016-02-03 22:52:46 UTC
Description of problem:



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Kathryn Dixon 2016-02-03 23:04:30 UTC
Description of problem:

installed virt-who 1.15 from the satellite tools repository, and configured on a satellite 6 that is registered to itself.

Then filling out the /etc/sysconfig/virt-who file with the appropriate information (pointing to vmware) you get successfuly mapping to host.

Then after registering a client and auto-attaching it does pull up the virtual subscription from the correct hypervisors .. however it goes yellow and then after 24 hours it would go red or grab some other random sku.

What we discovered was the vmware team has set up a filter so the user in the /etc/sysconfig/virt-who file could only see the 3 hypervisors that we would need. 

Once we removed this filter in vmware ( how this was set up will be attached to the bug) we were able to restart virt-who and immedately attach attach a rhel system and it was green good to go.

Our question is why did this filtering in vmware ( which seems to be a supported way since it was read only access) cause our client system to go yellow then red. What is strange is that the /var/log/rhsm/rhsm.log on the client/satellite never really showed us any errors that would suggest that there was something wrong ( when we had the filter rule in vmware)

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. in vmware environment follow the attachment instructions.
2. have virt-who 1.15 from sat-tools repo installed and configured on the satellite
3. after the hypervisor shows up (and subscription attached) try to register and subscription a client under that hypervisor, either with auto attach or by the pool id ( for the derived sku) .. it will stay yello for 24 hours then fall off.

Actual results:

Client does not register to virtual sku, and var/log/rhsm/rhsm.log doesnt show us why 

Expected results:

To use the filter rule in vmware, so only certain hypervisors show up in the webui. 

Additional info:

Attaching further information.

Comment 5 Radek Novacek 2016-02-04 15:10:36 UTC
Correct me if I'm wrong but it seems like correct behavior to me. With the filter active, three hypervisors were being reported, all of them without guests:

Sending update in hosts-to-guests mapping: {
    "4c4c4544-0038-4b10-8037-b3c04f513232": [], 
    "4c4c4544-0038-4c10-8035-b3c04f513232": [], 
    "4c4c4544-0038-4c10-8036-b3c04f513232": []
}

So the guests didn't get associated to any hypervisor and turned yellow and then red because of it.

When the filter get changed, all the guests were reported and turned green.

Only problem is that the filter was probably somehow incorrect because those hypervisors didn't report any guests. After changing the filter, guests appears in the log.

Can you please create the filter using following guide:

https://rnovacek.fedorapeople.org/virt-who/vsphereperm/

Comment 6 Christopher Stanley 2016-02-04 17:02:55 UTC
(In reply to Radek Novacek from comment #5)
> Correct me if I'm wrong but it seems like correct behavior to me. With the
> filter active, three hypervisors were being reported, all of them without
> guests:
> 
> Sending update in hosts-to-guests mapping: {
>     "4c4c4544-0038-4b10-8037-b3c04f513232": [], 
>     "4c4c4544-0038-4c10-8035-b3c04f513232": [], 
>     "4c4c4544-0038-4c10-8036-b3c04f513232": []
> }
> 
> So the guests didn't get associated to any hypervisor and turned yellow and
> then red because of it.
> 
> When the filter get changed, all the guests were reported and turned green.
> 
> Only problem is that the filter was probably somehow incorrect because those
> hypervisors didn't report any guests. After changing the filter, guests
> appears in the log.
> 
> Can you please create the filter using following guide:
> 
> https://rnovacek.fedorapeople.org/virt-who/vsphereperm/

Yes, we have confirmed that there is no difference in permissions or anything for that matter. The only difference is that before it had access to only 3 hosts (one of which was the one the server we were registering was residing on) now it has access to all hosts. Regardless of the situation, we have quadruple checked and confirmed that before and after have the same read-only access permissions. It is weird, because with the filter virt-who is unable to see that the server is residing on one of the 3 hosts, without it - it works fine. I will follow your guide instead and post back my results.

Comment 7 Kathryn Dixon 2016-02-04 18:25:30 UTC
(In reply to Radek Novacek from comment #5)
> Correct me if I'm wrong but it seems like correct behavior to me. With the
> filter active, three hypervisors were being reported, all of them without
> guests:
> 
> Sending update in hosts-to-guests mapping: {
>     "4c4c4544-0038-4b10-8037-b3c04f513232": [], 
>     "4c4c4544-0038-4c10-8035-b3c04f513232": [], 
>     "4c4c4544-0038-4c10-8036-b3c04f513232": []
> }
> 
> So the guests didn't get associated to any hypervisor and turned yellow and
> then red because of it.
> 
> When the filter get changed, all the guests were reported and turned green.
> 
> Only problem is that the filter was probably somehow incorrect because those
> hypervisors didn't report any guests. After changing the filter, guests
> appears in the log.
> 
> Can you please create the filter using following guide:
> 
> https://rnovacek.fedorapeople.org/virt-who/vsphereperm/

Those 3 hypervisors that we had through the vmware filter, are the same ones that are working now without the filter.

With the filter, we could register the client and auto attach it would NEVER go green, and never show a proper error as too why. The client "minion" connected to the same hypervisor before and after the filter.

Comment 8 Radek Novacek 2016-02-09 07:31:27 UTC
Also please note that there are following options that can be used to limit what hypervisors virt-who reports:

filter_host_uuids
    Only hosts which uuid (or hostname or hwuuid, based on hypervisor_id) is specified in comma-separated list in this option will be reported. Put the value into the double-quotes if it contains special characters (like comma).

exclude_host_uuids
     Hosts which uuid (or hostname or hwuuid, based on hypervisor_id) is specified in comma-separated list in this option will NOT be reported. Put the value into the double-quotes if it contains special  characters (like comma).

filter_host_parents
    Only hosts which parent (usually ComputeResource) name is specified in comma-separated list in this option will be reported. Put the name into the double-quotes if  it  contains  special  characters  (like comma).

exclude_host_parents
    Hosts which parent (usually ComputeResource) name is specified in comma-separated list in this option will NOT be reported. Put the name into the double-quotes if it contains special characters (like comma).

Comment 9 Radek Novacek 2016-04-21 09:21:30 UTC
Christopher, have you managed to try following suggested guide? Was the result different this time?

Comment 10 Radek Novacek 2016-05-31 05:55:11 UTC
Any update on this?

Comment 11 Kathryn Dixon 2016-06-16 23:17:41 UTC
(In reply to Radek Novacek from comment #10)
> Any update on this?

I think the problem was actually us using virt-who 1.15 .. it disappeared from the repos, and we will re do it .14 latest.

Thank you

Comment 12 Radek Novacek 2016-07-14 07:01:43 UTC
Please reopen this bug if you manage to reproduce the issue with either 0.14 or 0.17 versions of virt-who. Thanks.

Comment 13 Red Hat Bugzilla 2023-09-14 03:17:16 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days