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

Connection to libvirt fails with provider version 0.6.9 #865

Closed
ebal opened this issue Jun 30, 2021 · 2 comments · Fixed by #867
Closed

Connection to libvirt fails with provider version 0.6.9 #865

ebal opened this issue Jun 30, 2021 · 2 comments · Fixed by #867

Comments

@ebal
Copy link

ebal commented Jun 30, 2021

System Information

Linux distribution

archlinux

Terraform version

$ terraform -v

Terraform v1.0.1
on linux_amd64
+ provider registry.terraform.io/dmacvicar/libvirt v0.6.9
+ provider registry.terraform.io/hashicorp/http v2.1.0
+ provider registry.terraform.io/hashicorp/template v2.2.0

Provider and libvirt versions

./terraform-provider-libvirt -version
terraform-provider-libvirt 0.6.9


$ libvirtd -V
libvirtd (libvirt) 7.3.0

https://github.com/dmacvicar/terraform-provider-libvirt/releases/download/v0.6.9/terraform-provider-libvirt_0.6.9_linux_amd64.zip

Description of Issue/Question

Upgraded my local machine from v0.6.3 to v0.6.9 and authentication has stopped working.
Reverting to v0.6.3 (same terraform files) works fine again.

Setup

$ cat Provider.tf 
terraform {
  required_version = ">= 1.0"

  required_providers {
    libvirt = {
      source  = "dmacvicar/libvirt"
      version = "0.6.9"
    }
    http = {
      source  = "hashicorp/http"
      version = "2.1.0"
    }
  }
}

provider "libvirt" {
  uri = "qemu:///system"
}
$ terraform init

Initializing the backend...

Initializing provider plugins...
- Finding latest version of hashicorp/template...
- Finding dmacvicar/libvirt versions matching "0.6.9"...
- Finding hashicorp/http versions matching "2.1.0"...
- Installing hashicorp/template v2.2.0...
- Installed hashicorp/template v2.2.0 (signed by HashiCorp)
- Installing dmacvicar/libvirt v0.6.9...
- Installed dmacvicar/libvirt v0.6.9 (unauthenticated)
- Installing hashicorp/http v2.1.0...
- Installed hashicorp/http v2.1.0 (signed by HashiCorp)

Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run "terraform init" in the future.

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

terraform plan -out terraform.out && terraform apply terraform.out
╷
│ Error: failed to connect: authentication required
│ 
│   with provider["registry.terraform.io/dmacvicar/libvirt"],
│   on Provider.tf line 16, in provider "libvirt":
│   16: provider "libvirt" {
│ 
╵

@invidian
Copy link
Contributor

invidian commented Jul 2, 2021

See also digitalocean/go-libvirt#139 and 1a86985.

invidian added a commit to invidian/terraform-provider-libvirt that referenced this issue Jul 2, 2021
To bring polkit authentication.

Closes dmacvicar#865

Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
invidian added a commit to invidian/terraform-provider-libvirt that referenced this issue Jul 2, 2021
To bring back polkit authentication support.

Closes dmacvicar#865

Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
@dmacvicar
Copy link
Owner

v0.6.10 should be available soon from the registry with the Polkit fix from @invidian

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

Successfully merging a pull request may close this issue.

3 participants