Bug 1413775
Summary: | rabbitmqctl rotate_logs issues with selinux in OSP 9 and 10 | ||
---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Andreas Karis <akaris> |
Component: | rabbitmq-server | Assignee: | Peter Lemenkov <plemenko> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Udi Shkalim <ushkalim> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 9.0 (Mitaka) | CC: | akaris, apevec, chjones, dabarzil, fdinitto, jeckersb, jjoyce, lhh, mflusche, michele, mwinkler, plemenko, sclewis, srevivo |
Target Milestone: | --- | Keywords: | Triaged, ZStream |
Target Release: | 9.0 (Mitaka) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-07-20 08:59:32 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: | |||
Bug Depends On: | |||
Bug Blocks: | 1426600 |
Description
Andreas Karis
2017-01-16 23:34:38 UTC
OSP 9: [root@undercloud9 ~]# grep logrotate /var/log/messages Jan 16 12:42:21 undercloud9 logrotate: ALERT exited abnormally with [1] [root@undercloud9 ~]# grep logrotate /var/log/audit/audit.log type=AVC msg=audit(1484588529.273:324): avc: denied { bind } for pid=25741 comm="su" scontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tcontext=system_u:system_r:logrotate_t:s0-s0:c0.c1023 tclass=netlink_selinux_socket type=SYSCALL msg=audit(1484588529.273:324): arch=c000003e syscall=49 success=no exit=-13 a0=3 a1=7ffc72ec5610 a2=c a3=1 items=0 ppid=25727 pid=25741 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=5 comm="su" exe="/usr/bin/su" subj=system_u:system_r:logrotate_t:s0-s0:c0.c1023 key=(null) type=USER_AVC msg=audit(1484588529.274:325): pid=25741 uid=0 auid=0 ses=5 subj=system_u:system_r:logrotate_t:s0-s0:c0.c1023 msg='avc: can't open netlink socket: 13 (Permission denied) exe="/usr/bin/su" sauid=0 hostname=? addr=? terminal=?' type=ANOM_ABEND msg=audit(1484588529.274:326): auid=0 uid=0 gid=0 ses=5 subj=system_u:system_r:logrotate_t:s0-s0:c0.c1023 pid=25741 comm="su" reason="memory violation" sig=6 [root@undercloud9 ~]# date -d @1484588529 Mon Jan 16 12:42:09 EST 2017 Peter, Here are the details with selinux in permissive mode; I changed logrotate to roll the rabbit log every hour so we don't have to wait. [root@undercloud10 ~]# cat /var/log/audit/audit.log |audit2allow #============= logrotate_t ============== allow logrotate_t epmd_port_t:tcp_socket name_connect; allow logrotate_t rabbitmq_port_t:tcp_socket name_connect; allow logrotate_t rabbitmq_var_lib_t:dir { read write }; allow logrotate_t rabbitmq_var_lib_t:file { getattr open read }; allow logrotate_t security_t:security compute_av; allow logrotate_t self:passwd passwd; allow logrotate_t self:process setrlimit; [root@undercloud10 ~]# getenforce Permissive I've finally got a patch for SELinux against Fedora Rawhide. I'll provide a build as soon as it will be approved by upstream and merged. Hopefully soon enough. It seems that it takes a lot of time to move these patches through the upstream selinux-policy repository, so I decided to switch to a more short path and push them into openstack-selinux repository. Expect a proper solution soon. This issue is fixed in openstack-selinux-0.8.14-1.el7ost which is available for all RHOS-10, RHOS-11, RHOS-12, RHOS-13. |