[libvirt PATCH 0/2] rpc: Fix virt-ssh-helper detection

See patch 1 for details. Andrea Bolognani (2): rpc: Fix virt-ssh-helper detection news: Mention virt-ssh-helper detection fix NEWS.rst | 6 ++++++ src/rpc/virnetclient.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) -- 2.26.2

When trying to figure out whether virt-ssh-helper is available on the remote host, we mistakenly look for the helper by the name it had while the feature was being worked on instead of the one that was ultimately picked, and thus end up using the netcat fallback every single time. Fixes: f8ec7c842df9e40c6607eae9b0223766cb226336 Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- src/rpc/virnetclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index c6591ecdfc..2eabacd6e8 100644 --- a/src/rpc/virnetclient.c +++ b/src/rpc/virnetclient.c @@ -453,7 +453,7 @@ virNetClientSSHHelperCommand(virNetClientProxy proxy, switch (proxy) { case VIR_NET_CLIENT_PROXY_AUTO: - return g_strdup_printf("sh -c 'which virt-nc 1>/dev/null 2>&1; " + return g_strdup_printf("sh -c 'which virt-ssh-helper 1>/dev/null 2>&1; " "if test $? = 0; then " " %s; " "else" -- 2.26.2

On Mon, Oct 26, 2020 at 7:30 PM Andrea Bolognani <abologna@redhat.com> wrote:
When trying to figure out whether virt-ssh-helper is available on the remote host, we mistakenly look for the helper by the name it had while the feature was being worked on instead of the one that was ultimately picked, and thus end up using the netcat fallback every single time.
Fixes: f8ec7c842df9e40c6607eae9b0223766cb226336 Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- src/rpc/virnetclient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/rpc/virnetclient.c b/src/rpc/virnetclient.c index c6591ecdfc..2eabacd6e8 100644 --- a/src/rpc/virnetclient.c +++ b/src/rpc/virnetclient.c @@ -453,7 +453,7 @@ virNetClientSSHHelperCommand(virNetClientProxy proxy,
switch (proxy) { case VIR_NET_CLIENT_PROXY_AUTO: - return g_strdup_printf("sh -c 'which virt-nc 1>/dev/null 2>&1; " + return g_strdup_printf("sh -c 'which virt-ssh-helper 1>/dev/null 2>&1; " "if test $? = 0; then " " %s; " "else" -- 2.26.2
Reviewed-by: Neal Gompa <ngompa13@gmail.com> -- 真実はいつも一つ!/ Always, there's only one truth!

Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- NEWS.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 3587bc2c13..5bd8ed1c91 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -46,6 +46,12 @@ v6.9.0 (unreleased) Relying on the "Description" field caused queries to fail on non-"en-US" systems. The queries have been updated to avoid using localized strings. + * rpc: Fix ``virt-ssh-helper`` detection + + libvirt 6.8.0 failed to correctly detect the availability of the new + ``virt-ssh-helper`` command on the remote host, and thus always used the + fallback instead; this has now been fixed. + v6.8.0 (2020-10-01) =================== -- 2.26.2

On Mon, Oct 26, 2020 at 7:31 PM Andrea Bolognani <abologna@redhat.com> wrote:
Signed-off-by: Andrea Bolognani <abologna@redhat.com> --- NEWS.rst | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/NEWS.rst b/NEWS.rst index 3587bc2c13..5bd8ed1c91 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -46,6 +46,12 @@ v6.9.0 (unreleased) Relying on the "Description" field caused queries to fail on non-"en-US" systems. The queries have been updated to avoid using localized strings.
+ * rpc: Fix ``virt-ssh-helper`` detection + + libvirt 6.8.0 failed to correctly detect the availability of the new + ``virt-ssh-helper`` command on the remote host, and thus always used the + fallback instead; this has now been fixed. +
v6.8.0 (2020-10-01) =================== -- 2.26.2
Reviewed-by: Neal Gompa <ngompa13@gmail.com> -- 真実はいつも一つ!/ Always, there's only one truth!

On Tue, Oct 27, 2020 at 12:28:43AM +0100, Andrea Bolognani wrote:
See patch 1 for details.
Andrea Bolognani (2): rpc: Fix virt-ssh-helper detection news: Mention virt-ssh-helper detection fix
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
participants (3)
-
Andrea Bolognani
-
Daniel P. Berrangé
-
Neal Gompa