[libvirt] [PATCH 2/3] virt-aa-helper: Call virCommandRawStatus()

Ján Tomko jtomko at redhat.com
Mon Aug 19 13:07:09 UTC 2019


On Mon, Aug 19, 2019 at 12:01:41PM +0200, Andrea Bolognani wrote:
>The way we're processing the return status, using WIFEXITED() and
>friends, only works when we have the raw return status; however,
>virCommand defaults to processing the return status for us. Call
>virCommandRawStatus() before virCommandRun() so that we get the raw
>return status and the logic can actually work.
>
>This results in guest startup failures caused by AppArmor issues
>being reported much earlier: for example, if virt-aa-helper exits
>with an error we're now reporting
>
>  error: internal error: cannot load AppArmor profile 'libvirt-b20e9a8e-091a-45e0-8823-537119e98bc6'
>
>instead of the misleading
>
>  error: internal error: Process exited prior to exec: libvirt:
>  error : unable to set AppArmor profile 'libvirt-b20e9a8e-091a-45e0-8823-537119e98bc6'
>  for '/usr/bin/qemu-system-x86_64': No such file or directory
>
>Signed-off-by: Andrea Bolognani <abologna at redhat.com>
>---
> src/security/virt-aa-helper.c | 1 +
> 1 file changed, 1 insertion(+)
>

Suggested-by: Ján Tomko <jtomko at redhat.com>
Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- 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/20190819/3115d6b9/attachment-0001.sig>


More information about the libvir-list mailing list