Bug 2165774

Summary: Virt-who configuration shows errors which are related to SSH Connection
Product: Red Hat Satellite Reporter: Paulo Bernal <pbernal>
Component: Virt-who Configure PluginAssignee: Lucy Fu <lufu>
Status: CLOSED NOTABUG QA Contact: yanpliu <yanpliu>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.10.7CC: ahumbe, lufu, paji, pcreech, rlavi, wpinheir, yanpliu
Target Milestone: 6.14.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rubygem-foreman_virt_who_configure-0.5.15-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-24 06:17:03 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:
Bug Depends On: 2152221    
Bug Blocks:    

Description Paulo Bernal 2023-01-31 00:34:08 UTC
Description of problem:
virt-who configuration which is provided by Red Hat Satellite, contains some lines that make errors related to SSH Connection in RHV-H

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


How reproducible:


Steps to Reproduce:
1. Install RHV-H
2. Register RHV-H to Red Hat Satellite
3. Create virt-who configuration for libvirt
4. Deploy virt-who configuration into RHV-H

Actual results:
[virtwho.main ERROR] MainProcess(1900771):Thread-2 @libvirtd.py:_connect:288 - Error in libvirt backend
    Traceback (most recent call last):
      File "/usr/lib/python3.6/site-packages/virtwho/virt/libvirtd/libvirtd.py", line 284, in _connect
        v = libvirt.openAuth(url, auth, libvirt.VIR_CONNECT_RO)
      File "/usr/lib64/python3.6/site-packages/libvirt.py", line 148, in openAuth
        raise libvirtError('virConnectOpenAuth() failed')
    libvirt.libvirtError: Cannot recv data: Host key verification failed.: Connection reset by peer

Expected results:


Additional info:

Comment 3 Lucy Fu 2023-06-09 15:51:58 UTC
Created redmine issue https://projects.theforeman.org/issues/36499 from this bug

Comment 5 Lucy Fu 2023-06-12 18:03:33 UTC
Sample libvirt configuration.

[root@bootp-73-131-194 virt-who.d]# more virt-who-config-13.conf 
### This configuration file is managed via the virt-who configure plugin
### manual edits will be deleted.
[virt-who-config-13]
type=libvirt
hypervisor_id=hostname
owner=Default_Organization

server=qemu:///system

rhsm_hostname=devel.redhat.com
rhsm_username=virt_who_reporter_13
rhsm_encrypted_password=929146baad322d7762ea95ecc78dd54e63db1f3e72ec2c7b75294046c7127889
rhsm_prefix=/rhsm

Comment 6 Bryan Kearney 2023-06-12 20:02:40 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/36499 has been resolved.

Comment 11 Lucy Fu 2023-07-05 18:26:56 UTC
Create Config - select libvirt as the Hypervisor type. Set other options accordingly. 
Deploy the config as normal. 

The created config file for libvirt looks like in comment #5. 
No manual manipulation is required.