Created attachment 1326441 [details] container journal tail Description of problem: pkispawn is unable to finish configuring the CA when run from a container as a part of a FreeIPA install process Version-Release number of selected component (if applicable): pki-server-10.3.5-12.fc26.noarch How reproducible: 100% Steps to Reproduce: 1. `# setenforce 0 # sorry` 2. `# domain=IPA.TEST; docker run -t --name freeipa-popelnice -h $HOSTNAME \ --tmpfs /run --tmpfs /tmp --security-opt seccomp:unconfined \ -v /dev/urandom:/dev/random:ro -v /opt/ipa-data/master:/data \ -v /sys/fs/cgroup:/sys/fs/cgroup:ro --cap-add=SYS_TIME \ -e DEBUG_NO_EXIT=1 freeipa/freeipa-server:fedora-26 \ --hostname $HOSTNAME --domain $domain --realm ${domain^^} \ -p milan_je_buh123 -a milan_je_buh123 --setup-dns --auto-forwarders \ --no-reverse -U` Actual results: """ ... Configuring certificate server (pki-tomcatd). Estimated time: 3 minutes 30 seconds [1/31]: creating certificate server user [2/31]: configuring certificate server instance ipa.ipaserver.install.cainstance.CAInstance: CRITICAL Failed to configure CA instance: Command '/usr/sbin/pkispawn -s CA -f /tmp/tmp7l7_TD' returned non-zero exit status 1 ipa.ipaserver.install.cainstance.CAInstance: CRITICAL See the installation logs and the following files/directories for more information: ipa.ipaserver.install.cainstance.CAInstance: CRITICAL /var/log/pki/pki-tomcat [error] RuntimeError: CA configuration failed. ipa.ipapython.install.cli.install_tool(Server): ERROR CA configuration failed. ipa.ipapython.install.cli.install_tool(Server): ERROR The ipa-server-install command failed. See /var/log/ipaserver-install.log for more information """ Expected results: The installation continues happily after configuring the certificate server instance. Additional info: Attaching pkispawn + in-container journal logs. Note the following line in journal: """ Sep 15 11:47:11 controller.ipa.test systemd[548]: pki-tomcatd: Failed at ste p KEYRING spawning /usr/bin/pkidaemon: Permission denied """ This one is preceded by some other systemd fails so this may just as well turn out to be a systemd or oci-systemd-hook bug.
Created attachment 1326445 [details] pki-ca-spawn log
Seems to be related to a change in systemd-233. Other programs are experiencing similar failures. https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1691096
More probably-relevant info: `` After further research, it turns out that in order to perform chown on keyrings, it requires the CAP_SYS_ADMIN capability. So containers (e.g. LXC) with that capability dropped will suffer from this even with the latest mainline kernel. '' Open issue https://github.com/systemd/systemd/issues/6281#issuecomment-314483247 A commit that adds a KeyringMode unit property that can turn off special keyring handling in systemd - merged, but not in any release yet: https://github.com/systemd/systemd/pull/6832/commits. Using this setting might provide a workaround if #6281 does not get fixed.
Thank you Fraser for the digging. I am throwing this BZ at the systemd guys because I guess the same issue would appear on RHEL once systemd-233 hits it. I'll be changing the title as well, guys, please note that the actual issue is triggered when the command "systemctl start pki-tomcatd" is run.
Adding the "Regression" keyword, this worked in Fedora 25 container.
Potentially related: https://bugzilla.redhat.com/show_bug.cgi?id=1449201#c7.
This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. 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 '26'. 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 26 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.
Was this "fixed" by not running unconfined seccomp?
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26 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.