Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
YanhuiMa opened this issue Feb 28, 2024 · 3 comments

Comments

@YanhuiMa
Copy link

YanhuiMa commented Feb 28, 2024

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
Copy link
Member

@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:

  • add mode = "legacy" to /etc/libvirt/libvirt.conf
  • sudo systemctl restart libvirtd

@YanhuiMa
Copy link
Author

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

@psathyan
Copy link
Contributor

psathyan commented Mar 8, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants