Re: [libvirt] [PATCH] virsh: Fix domdisplay when domain only uses TLS

On Fri, Sep 27, 2013 at 05:43:50PM +0200, Christophe Fergeau wrote:
Hey Martin,
Your reply wasn't sent to the mailing list, I'm assuming this was unintentional.
Yes, sorry, that happened to me with 2 ACKs today :-(
On Fri, Sep 27, 2013 at 12:08:27PM +0200, Martin Kletzander wrote:
On Wed, Sep 25, 2013 at 05:59:54PM +0200, Christophe Fergeau wrote:
It's possible to create a domain which will only use a TLS port and will not have a non-TLS port set by using: <graphics type='spice' autoport='yes' defaultMode='secure'/> In such a setup, the 'graphics' node for the running domain will be: <graphics type='spice' tlsPort='5900' autoport='yes' listen='127.0.0.1' defaultMode='secure'>
However, cmdDomDisplay loops over all the 'graphics' node, and it ignores nodes which don't have a 'port' attribute. This means 'virsh domdisplay' will only return an empty string for domains as the one above.
This commit looks for both 'port' and 'tlsPort' before deciding to ignore a graphics node. It also makes sure 'port' is not printed when it's not set. This makes 'virsh domdisplay' return 'spice://127.0.0.1?tls-port=5900' for domains using only a TLS port.
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> --- tools/virsh-domain.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-)
ACK and OK for this release.
Thanks, I've pushed this to master.
This patch would also be a good candidate for the stable branch, is there some process to follow to get it in there?
IIRC, either let Cole know or, if you have the rights, feel free to just back-port it when it is a bug (which this is). Martin
participants (1)
-
Martin Kletzander