noseka1 / openshift-auto-upi

OpenShift Automated User-Provided Infrastructure
Apache License 2.0
98 stars 51 forks source link

[Libvirt] qemu+ssh requires root password #25

Closed hashnao closed 3 years ago

hashnao commented 4 years ago
description of the issue

When the remote access to the KVM host is enabled with qemu+ssh , the root password is required more than thirty times depending on the number hosts during the installation. It's not a major issue, but I think I need to add a description about placing the secret key in the helper host and the public key in the KVM host so that password authentication is not required during the installation.

Steps To Reproduce
libvirt:
  libvirt_connection_uri: 'qemu+ssh://root@192.168.150.1/system'
  domain_template: files/libvirt/domain.xml
  pool_name: default
  network_name: openshift
  template_name: RHCOS
Current Result

The root password is required as follows after the openshift_libvirt_pxe.yml playbook started.

TASK [openshift_libvirt_pxe : Create virtual machines that don't exist] *************************************************************************************************************
included: /home/cloud-user/openshift-auto-upi/roles/openshift_libvirt_pxe/tasks/deploy_host.yml for helper
included: /home/cloud-user/openshift-auto-upi/roles/openshift_libvirt_pxe/tasks/deploy_host.yml for helper
included: /home/cloud-user/openshift-auto-upi/roles/openshift_libvirt_pxe/tasks/deploy_host.yml for helper
included: /home/cloud-user/openshift-auto-upi/roles/openshift_libvirt_pxe/tasks/deploy_host.yml for helper
included: /home/cloud-user/openshift-auto-upi/roles/openshift_libvirt_pxe/tasks/deploy_host.yml for helper
included: /home/cloud-user/openshift-auto-upi/roles/openshift_libvirt_pxe/tasks/deploy_host.yml for helper
included: /home/cloud-user/openshift-auto-upi/roles/openshift_libvirt_pxe/tasks/deploy_host.yml for helper

TASK [openshift_libvirt_pxe : Create a volume] **************************************************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Create a virtual machine bootstrap.ocp4.tt.testing] ***************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Power on virtual machine bootstrap.ocp4.tt.testing] ***************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Create a volume] **************************************************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Create a virtual machine master1.ocp4.tt.testing] *****************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Power on virtual machine master1.ocp4.tt.testing] *****************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Create a volume] **************************************************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Create a virtual machine master2.ocp4.tt.testing] *****************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Power on virtual machine master2.ocp4.tt.testing] *****************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Create a volume] **************************************************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Create a virtual machine master3.ocp4.tt.testing] *****************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Power on virtual machine master3.ocp4.tt.testing] *****************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Create a volume] **************************************************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Create a virtual machine infra1.ocp4.tt.testing] ******************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Power on virtual machine infra1.ocp4.tt.testing] ******************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Create a volume] **************************************************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Create a virtual machine infra2.ocp4.tt.testing] ******************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Power on virtual machine infra2.ocp4.tt.testing] ******************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Create a volume] **************************************************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Create a virtual machine app1.ocp4.tt.testing] ********************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_libvirt_pxe : Power on virtual machine app1.ocp4.tt.testing] ********************************************************************************************************
root@192.168.150.1's password: 
root@192.168.150.1's password: 
root@192.168.150.1's password: 
changed: [helper]

TASK [openshift_common : Waiting since 06:51:28 AM for SSH on OpenShift hosts] 
Expected Result

The root password or passphrase authentication is not required by generating and placing ssh key without a passphrase.

Additional Information
noseka1 commented 4 years ago

This documentation can be added to the comment in the inventory/group_vars/all/infra/libvirt.yml.sample

hashnao commented 4 years ago

@noseka1 Fore sure, I've added the comments in the file.