Bug 1384343 - Shutting down a Fedora 24 VM with --mode=agent fails when selinux is enabled
Summary: Shutting down a Fedora 24 VM with --mode=agent fails when selinux is enabled
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-13 07:39 UTC by Thomas Mårtensson
Modified: 2017-08-08 19:24 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-08 19:24:58 UTC
Type: Bug


Attachments (Terms of Use)

Description Thomas Mårtensson 2016-10-13 07:39:48 UTC
Description of problem:
When trying to shut down a Fedora 24 (server) running as a VM the shutdown command fails.

[root@server]# virsh shutdown fedora24-vm --mode=agent
error: Failed to shutdown domain fedora24-vm
error: internal error: unable to execute QEMU agent command 'guest-shutdown': child process has failed to shutdown

In the VM, we have 2 AVCs in the audit log:
[root@fedora24-vm ~]# grep avc /var/log/audit/audit.log
type=USER_AVC msg=audit(1476342993.479:150): pid=595 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=method_call interface=org.freedesktop.login1.Manager member=SetWallMessage dest=org.freedesktop.login1 spid=839 tpid=594 scontext=system_u:system_r:virt_qemu_ga_t:s0 tcontext=system_u:system_r:systemd_logind_t:s0 tclass=dbus  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'
type=USER_AVC msg=audit(1476342993.479:151): pid=595 uid=81 auid=4294967295 ses=4294967295 subj=system_u:system_r:system_dbusd_t:s0-s0:c0.c1023 msg='avc:  denied  { send_msg } for msgtype=method_call interface=org.freedesktop.login1.Manager member=ScheduleShutdown dest=org.freedesktop.login1 spid=839 tpid=594 scontext=system_u:system_r:virt_qemu_ga_t:s0 tcontext=system_u:system_r:systemd_logind_t:s0 tclass=dbus  exe="/usr/bin/dbus-daemon" sauid=81 hostname=? addr=? terminal=?'

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

[root@fedora24-vm ~]# qemu-ga --version
QEMU Guest Agent 2.6.2

[root@fedora24-vm ~]# rpm -qf /bin/qemu-ga
qemu-guest-agent-2.6.2-1.fc24.x86_64

[root@fedora24-vm ~]# rpm -qa|grep -i selinux | grep policy
selinux-policy-targeted-3.13.1-191.18.fc24.noarch
selinux-policy-devel-3.13.1-191.18.fc24.noarch
selinux-policy-3.13.1-191.18.fc24.noarch


How reproducible:

Steps to Reproduce:
1. Install a minimal Fedora 24 Server VM + qemu-guest-agent
2. Setup communication between server and qemu-ga inside the VM
3. Try to shut down the VM using 'virsh shutdown <domain> --mode=agent'

Actual results:
[root@server]# virsh shutdown <domain> --mode=agent
error: Failed to shutdown domain <domain>
error: Guest agent is not responding: QEMU guest agent is not available due to an error

Expected results:
[root@server]# virsh shutdown <domain> --mode=agent                                                                                            
Domain <domain> is being shutdown

Additional info:

Comment 1 Fedora End Of Life 2017-07-25 23:27:42 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2017-08-08 19:24:58 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.