Project

General

Profile

Actions

Feature #26600

closed

Don't duplicate host record when hypervisor_id changes in virt-who report

Added by Jonathon Turel over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1410601

Description of problem:
for a hypervisor mode, if configure hypervisor_id option to 3 different values(uuid, hostname, hwuuid), it will create 3 entries for the same hypervisor, it should keep an unique entry no matter what hypervisor_id configured.

Version-Release number of selected component (if applicable):
virt-who-0.17-10.el7sat.noarch
subscription-manager-1.17.15-1.el7.x86_64
python-rhsm-1.17.9-1.el7.x86_64
Satellite-6.2.0-RHEL-7-20161219.0/

How reproducible:
always

Steps to Reproduce:
1. configure virt-who for esx mode /etc/virt-who.d/, make sure set hypervisor_id to uuid,such as:
type=esx
hypervisor_id=hostname
owner=Default_Organization
env=Library
server=10.73.130.242
username=
password=Welcome1!

2. restart virt-who service and check the hypervisor should be sent with uuid:
Host-to-guest mapping: {
"ff9f4d56-f277-a538-9b51-103919b67710": [],
"20024d56-9faa-4267-75c9-0623ef215a23": [ {
"guestId": "422d664a-db1c-2773-462a-d5f308888a54",
"state": 1,
"attributes": {
"active": 1,
"virtWhoType": "esx"
}
}, {
"guestId": "422dbb1d-c5ef-4d58-86f8-fd799f056a9b",
"state": 5,
"attributes": {
"active": 0,
"virtWhoType": "esx"
}
}
]
}

3. check the content host in Satellite webUI, the hypervisors should be registered with uuid:
virt-who-ff9f4d56-f277-a538-9b51-103919b67710-1
virt-who-20024d56-9faa-4267-75c9-0623ef215a23-1

4. change the hypervisor_id to hostname, restart virt-who service, and make sure the hypervisor should be sent with hostname:
Host-to-guest mapping: {
"bootp-73-131-189.rhts.eng.pek2.redhat.com": [],
"bootp-73-130-246.rhts.eng.pek2.redhat.com": [ {
"guestId": "422d664a-db1c-2773-462a-d5f308888a54",
"state": 1,
"attributes": {
"active": 1,
"virtWhoType": "esx"
}
}, {
"guestId": "422dbb1d-c5ef-4d58-86f8-fd799f056a9b",
"state": 5,
"attributes": {
"active": 0,
"virtWhoType": "esx"
}
}
]
}

5. check the content host in Satellite webUI, the hypervisors should be registered with hostname again, but the old uuid entries still exist.
hostname entry:
virt-who-bootp-73-130-246.rhts.eng.pek2.redhat.com-1
virt-who-bootp-73-131-189.rhts.eng.pek2.redhat.com-1

uuid entry:
virt-who-ff9f4d56-f277-a538-9b51-103919b67710-1
virt-who-20024d56-9faa-4267-75c9-0623ef215a23-1

6. change the hypervisor_id to hwuuid, restart virt-who service, and make sure the hypervisor should be sent with hwuuid:
Host-to-guest mapping: {
"host-9": [],
"host-14": [ {
"guestId": "422d664a-db1c-2773-462a-d5f308888a54",
"state": 1,
"attributes": {
"active": 1,
"virtWhoType": "esx"
}
}, {
"guestId": "422dbb1d-c5ef-4d58-86f8-fd799f056a9b",
"state": 5,
"attributes": {
"active": 0,
"virtWhoType": "esx"
}
}
]

7. check the content host in Satellite webUI, the hypervisors should be registered with hwuuid again, but the old uuid entries still exist, now we have three different entries for the same hypervisor:
hwuuid entry:
virt-who-host-14-1
virt-who-host-9-1

hostname entry:
virt-who-bootp-73-130-246.rhts.eng.pek2.redhat.com-1
virt-who-bootp-73-131-189.rhts.eng.pek2.redhat.com-1

uuid entry:
virt-who-ff9f4d56-f277-a538-9b51-103919b67710-1
virt-who-20024d56-9faa-4267-75c9-0623ef215a23-1

Actual results:
for the same hypervisor, will create 3 different entries in Satellite WebUI

Expected results:
for the same hypervisor, no matter what I change the different hypervisor_id value, it should keep the unique entry. for example:
if hypervisor_id=uuid, send the uuid entry to satellite, delete other entries.
if hypervisor_id=hostname, send the hostname entry to satellite, delete other entries.
if hypervisor_id=hwuuid, send the hwuuid entry to satellite, delete other entries.

Actions #1

Updated by Jonathon Turel over 5 years ago

  • Subject changed from make sure there is only one entry in content host for the same hypervisor when configure hypervisor_id for uuid or hostname or hwuuid to Don't duplicate host record when hypervisor_id changes in virt-who report
  • Assignee set to Jonathon Turel
  • Target version set to Katello 3.12.0
Actions #2

Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/8076 added
Actions #3

Updated by Jonathon Turel over 5 years ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by Samir Jha over 5 years ago

  • Triaged changed from No to Yes
Actions #5

Updated by The Foreman Bot over 5 years ago

  • Pull request https://github.com/Katello/katello/pull/8081 added
Actions

Also available in: Atom PDF