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

fix(libvirt): properly establish TLS connections using dialers.NewTLS #1156

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jgooge
Copy link

@jgooge jgooge commented Feb 24, 2025

fix(libvirt): Resolve TLS connection issue with Terraform provider

The previous method directly passed the full uri (e.g.,qemu+tls://node.example.coml/system) URI into libvirt.NewWithDialer(u).

This means it was trying to interpret the full URI (including qemu+tls://) in a way that the go-libvirt library does not support natively.

  • Use dialers.NewTLS(host) to properly establish a TLS connection instead of relying on ConnectToURI
  • Extract hostname correctly from the URI to avoid connection failures.

This fixes #1155 where Terraform hangs indefinitely when using qemu+tls:// URIs.

@jgooge jgooge marked this pull request as ready for review February 24, 2025 06:05
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 this pull request may close these issues.

Terraform Plan hangs when using the TLS URI
1 participant