Bug 1492081 - starting pki-tomcatd service crashes FreeIPA installation in container on Fedora 26
Summary: starting pki-tomcatd service crashes FreeIPA installation in container on Fed...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-15 12:17 UTC by Standa Laznicka
Modified: 2018-05-29 12:12 UTC (History)
20 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2018-05-29 12:12:12 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
container journal tail (15.35 KB, text/plain)
2017-09-15 12:17 UTC, Standa Laznicka
no flags Details
pki-ca-spawn log (140.87 KB, text/plain)
2017-09-15 12:28 UTC, Standa Laznicka
no flags Details

Description Standa Laznicka 2017-09-15 12:17:53 UTC
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.

Comment 1 Standa Laznicka 2017-09-15 12:28:03 UTC
Created attachment 1326445 [details]
pki-ca-spawn log

Comment 3 Fraser Tweedale 2017-09-18 01:25:11 UTC
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

Comment 4 Fraser Tweedale 2017-09-18 02:11:55 UTC
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.

Comment 5 Standa Laznicka 2017-09-18 07:55:15 UTC
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.

Comment 6 Standa Laznicka 2017-09-19 06:39:53 UTC
Adding the "Regression" keyword, this worked in Fedora 25 container.

Comment 7 Jan Pazdziora (Red Hat) 2017-09-21 14:07:33 UTC
Potentially related: https://bugzilla.redhat.com/show_bug.cgi?id=1449201#c7.

Comment 8 Fedora End Of Life 2018-05-03 08:49:00 UTC
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.

Comment 9 Jan Pazdziora (Red Hat) 2018-05-09 09:49:08 UTC
Was this "fixed" by not running unconfined seccomp?

Comment 10 Fedora End Of Life 2018-05-29 12:12:12 UTC
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.


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