failed to connect: dial unix /var/run/libvirt/libvirt-sock: connect: no such file or directory
ahuston-0 opened this issue · comments
I'm getting the below error while running kubitect apply
, it looks like its related to this issue in terraform-provider-libvirt that started after the 0.7.4 release.
│ Error: failed to connect: dial unix /var/run/libvirt/libvirt-sock: connect: no such file or directory
│
│ with provider["registry.terraform.io/dmacvicar/libvirt"].devops-host,
│ on main.tf line 25, in provider "libvirt":
│ 25: provider "libvirt" {
│
╵
┌
│ Error: terraform plan failed: exit status 1
Here are the masked connection details I'm using in my kubitect.yml file
connection:
type: remote
user: devops
ip: 192.168.xxx.xxx
ssh:
port: xxx
keyfile: "/home/devops/.ssh/id_ed25519"
In the meantime, if anyone else is experiencing this, I was able to fix the issue by making the below change in kubitect 3.2.2 and then building the repo. I know that may not be a long term solution, but I'm doing a lot of creating and destroying of my cluster while prototyping the final design and this was blocking that.
diff --git a/embed/terraform/versions.tf b/embed/terraform/versions.tf
index 6ee579c..7d2a1bd 100644
--- a/embed/terraform/versions.tf
+++ b/embed/terraform/versions.tf
@@ -8,7 +8,7 @@ terraform {
required_providers {
libvirt = {
source = "dmacvicar/libvirt"
- version = "~> 0.7.1"
+ version = "0.7.1"
}
}
}
(END)
Hi @ahuston-0,
Thanks for pointing out the issue. Kubitect should use a specific version of libvirt terraform provider (as it is using a specific version of Terraform) to avoid such issues.
Could you open a PR with this change? I will make sure to include it in 3.2.3
and 3.3.0
.
Sure! will need a few hours but I can put something together.