Bug 1469021 - SELinux blocks systemd-nspawn
SELinux blocks systemd-nspawn
Status: NEW
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
27
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-10 05:30 EDT by Ferry Huberts
Modified: 2017-11-16 15:05 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-07-12 08:55:49 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ferry Huberts 2017-07-10 05:30:22 EDT
Description of problem:
SELinux blocks systemd-nspawn

I have a Fedora 25 x64 Jenkins build machine.
It builds RPMs with mock, which uses systemd-nspawn.
These builds fail under the current policy, while they succeeded under a previous policy.



Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-225.18.fc25.noarch
selinux-policy-targeted-3.13.1-225.18.fc25.noarch
systemd-231-17.fc25.x86_64
mock-1.4.2-1.fc25.noarch


How reproducible:
always


Steps to Reproduce:
1. see description
2.
3.

Actual results:
fail

DEBUG util.py:606:  child environment: None
DEBUG util.py:533:  Executing command: ['/usr/bin/systemd-nspawn', '-q', '-M', '61d6d0878d144554837f64551aa1f62c', '-D', '/var/lib/mock/fedora-25-x86_64-gradle-upstream.5JzSZZVEsj/root', '-a', '--setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin', '--setenv=PROMPT_COMMAND=printf "\\033]0;<mock-chroot>\\007"', '--setenv=SHELL=/bin/bash', '--setenv=PS1=<mock-chroot> \\s-\\v\\$ ', '--setenv=HOSTNAME=mock', '--setenv=HOME=/builddir', '--setenv=TERM=vt100', '--setenv=LANG=en_US.UTF-8', '/usr/sbin/userdel', '-r', '-f', 'mockbuild'] with env {'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'PROMPT_COMMAND': 'printf "\\033]0;<mock-chroot>\\007"', 'SHELL': '/bin/bash', 'PS1': '<mock-chroot> \\s-\\v\\$ ', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'TERM': 'vt100', 'LANG': 'en_US.UTF-8'} and shell False
DEBUG util.py:307:  Unsharing. Flags: 134217728
DEBUG util.py:450:  Failed to register machine: Connection timed out
DEBUG util.py:450:  Parent died too early
DEBUG util.py:588:  Child return code was: 1

No AVCs


Expected results:
success

Additional info:

# groups jenkins
jenkins : jenkins mock
Comment 1 Ferry Huberts 2017-07-10 05:31:33 EDT
Setting 'setenforce 0' fixes the build, but is obviously not preferred
Comment 2 Ferry Huberts 2017-07-12 05:13:02 EDT
Might also be systemd-nspawn itself.
I did see some (parts of) jobs succeed and other fail while SELinux was in enforcing.
Comment 3 Ferry Huberts 2017-07-12 08:55:49 EDT
strange things are happening.
closing until I have a better idea of what is going on.
Comment 4 Ferry Huberts 2017-07-27 05:11:11 EDT
Ok, there might be a bad interaction here between systemd-nspawn and SELinux.
It failed again for me and setting SELinux to NOT enforcing fixed it again.
Comment 7 Fedora End Of Life 2017-11-16 14:31:11 EST
This message is a reminder that Fedora 25 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 25. 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 '25'.

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 25 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.

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