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 copy of the URL in RemoteName #1044

Merged
merged 1 commit into from
Nov 3, 2023
Merged

Conversation

X-Cli
Copy link
Contributor

@X-Cli X-Cli commented Nov 3, 2023

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.

Copy link
Collaborator

@michaelbeaumont michaelbeaumont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@X-Cli sorry, I didn't mean to say we shouldn't include the pointer receiver change at all, I think it's better with (u ConnectionURI). feel free to add it back! If not I'll merge this in a few minutes

Fixes dmacvicar#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.
@michaelbeaumont
Copy link
Collaborator

Thanks @X-Cli!

@michaelbeaumont michaelbeaumont merged commit 49ba899 into dmacvicar:main Nov 3, 2023
4 checks passed
dmacvicar pushed a commit to jimnydev/terraform-provider-libvirt that referenced this pull request Sep 28, 2024
Co-authored-by: Florian Maury <pub-gitea@x-cli.eu>
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.

version 0.7.4 breaks qemu+ssh (libvirt-sock) connection
2 participants