[libvirt] [PATCH 8/8] qemu: error out when vnc vncTLSx509secretUUID is unsupported

Ján Tomko jtomko at redhat.com
Fri Jan 18 15:17:09 UTC 2019


On Thu, Jan 17, 2019 at 11:27:06AM -0500, John Ferlan wrote:
>
>
>On 1/16/19 2:41 AM, Ján Tomko wrote:
>> Add a capability check to qemuDomainDefValidate.
>>
>> Signed-off-by: Ján Tomko <jtomko at redhat.com>
>> ---
>>  src/qemu/qemu_domain.c | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>
>If it were to be added, this should be merged w/ previous.
>
>I think it's pointless due to the check in qemuBuildTLSx509BackendProps
>which eventually gets called during qemuBuildGraphicsVNCCommandLine by
>qemuBuildTLSx509CommandLine.
>

The idea was to report an error even at define-time (due to its presence
in the *Validate function), but I forgot to add a check that VNC
graphics is actually used in the domain.

Having the capability checks done in the validation phase lets us report
an error as soon as possible and do less capability checking in the
*Build functions, at the expense of repeating some logic.

Jano

>All this does is be more specific to VNC...  Could have similar checks
>with/for Chardev, StorageSource, and Migration to be more specific for
>each and then remove the check in qemuBuildTLSx509BackendProps if the
>"issue" was that the message there is too generic.
>
>But I think the better change is to qemuBuildTLSx509BackendProps in
>order to print the @tlspath or the @tlsalias in the error message in
>order to which one failed, e.g. "tls-creds-x509 for %s not supported by
>this QEMU binary".
>
>John
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190118/4218d630/attachment-0001.sig>


More information about the libvir-list mailing list