dmacvicar / terraform-provider-libvirt

Terraform provider to provision infrastructure with Linux's KVM using libvirt
Apache License 2.0
1.58k stars 456 forks source link

Fix copy of the URL in RemoteName #1044

Closed X-Cli closed 11 months ago

X-Cli commented 11 months ago

Fixes #1040

The copy performed in RemoteName was shallow and this corrupted the original URI that is used during the Dial() call made by the go-libvirt library.

The issue always existed but did not manifest when libvirt.New(conn) was used because the connection was established before the call to RemoteName. The problem manifested when the switch to libvirt.NewWithDialer was made, because the dialing is now made during the call to ConnectToURI, which receives as paramater the result of the call to RemoteName.

Please make sure you read the contributor documentation before opening a Pull Request.

michaelbeaumont commented 11 months ago

Thanks @X-Cli!