Bug 2187095

Summary: VirtualDomain: redundant white-space with migrateuri
Product: Red Hat Enterprise Linux 9 Reporter: lejeczek <peljasz>
Component: resource-agentsAssignee: Oyvind Albrigtsen <oalbrigt>
Status: CLOSED NOTABUG QA Contact: cluster-qe <cluster-qe>
Severity: high Docs Contact:
Priority: unspecified    
Version: CentOS StreamCC: agk, bstinson, cluster-maint, fdinitto, jwboyer, nwahl
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-28 07:27:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description lejeczek 2023-04-16 17:18:58 UTC
Description of problem:

Hi guys.
With 'migrateuri' in use, generated URI contains an extra, redundant white-space.
eg.
-> $ pcs resource update node1 attr migrateuri=?no_verify=1

results in (with some more attr set)
virsh --connect=qemu:///system --quiet migrate --live --unsafe node1 qemu+tls://dzien.direct/system ?no_verify=1

and it should be, or what I would expect:
virsh --connect=qemu:///system --quiet migrate --live --unsafe node1 qemu+tls://dzien.direct/system?no_verify=1

Version-Release number of selected component (if applicable):

resource-agents-4.10.0-36.el9.x86_64

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Reid Wahl 2023-04-16 19:13:47 UTC
migrateuri is added to the command line as a separate token separated by a space: https://github.com/ClusterLabs/resource-agents/blame/v4.10.0/heartbeat/VirtualDomain#L1013

The virsh(1) man page suggests that the migrateuri is supposed to be a full URI, starting with a prefix. So it should be able to stand on its own after the space. See also: https://libvirt.org/migration.html#migration-using-only-unix-sockets

"?no_verify=1" looks like an incomplete URI.

Comment 2 Reid Wahl 2023-04-16 19:18:04 UTC
Perhaps what you want is to set remoteuri (to something like remoteuri='qemu+tls://%n/system?no_verify=1' -- I haven't tried that yet so it may need tweaking).

Comment 3 lejeczek 2023-04-18 14:39:15 UTC
Yes, it does the trick.
btw. something like cluster_map similar or identical to what for eg. ocf_heartbeat_galera has would really do the trick - perhaps an enhancement in the future.

Comment 4 lejeczek 2023-04-18 14:39:50 UTC
So, not a bug.