openshift-metal3 / dev-scripts

Scripts to automate development/test setup for openshift integration with https://github.com/metal3-io/
Apache License 2.0
92 stars 182 forks source link

Error: failed to dial libvirt: dial unix /var/run/libvirt/libvirt-sock: connect: no such file or directory #1635

Open YanhuiMa opened 4 months ago

YanhuiMa commented 4 months ago

In RHEL9, there will be following error:

level=error msg=Error: failed to dial libvirt: dial unix /var/run/libvirt/libvirt-sock: connect: no such file or directory level=error level=error msg= with provider["openshift/local/libvirt"], level=error msg= on main.tf line 1, in provider "libvirt": level=error msg= 1: provider "libvirt" { level=error level=error msg=failed to fetch Cluster: failed to generate asset "Cluster": failed to create cluster: failure applying terraform for "bootstrap" stage: error applying Terraform configs: failed to apply Terraform: exit status 1 level=error level=error msg=Error: failed to dial libvirt: dial unix /var/run/libvirt/libvirt-sock: connect: no such file or directory level=error level=error msg= with provider["openshift/local/libvirt"], level=error msg= on main.tf line 1, in provider "libvirt": level=error msg= 1: provider "libvirt" { level=error level=error +(utils.sh:1): create_cluster(): auth_template_and_removetmp +(utils.sh:858): auth_template_and_removetmp(): echo 4 +(utils.sh:859): auth_template_and_removetmp(): generate_auth_template +(utils.sh:319): generate_auth_template(): set +x

elfosardo commented 4 months ago

@YanhuiMa I use RHEL9/CentOSstream9 since a while now for my local environment and I encountered this error when you using old environments. You can either use a complete new machine, or as a workaround enable legacy mode in libvirt in this way:

YanhuiMa commented 4 months ago

@elfosardo Thank you! Maybe the issue is caused by lacking of virtproxyd. https://github.com/openshift-metal3/dev-scripts/pull/1636/files

psathyan commented 4 months ago

It would be helpful if we could address this issue either through #1636 or #1607

We have been inserting a patch with great success in d/s

https://github.com/openstack-k8s-operators/ci-framework/blob/main/roles/devscripts/files/proxy.patch