Bug 1469246 - Replica install fails to configure IPA-specific temporary files/directories
Replica install fails to configure IPA-specific temporary files/directories
Status: MODIFIED
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipa (Show other bugs)
7.4
Unspecified Unspecified
high Severity unspecified
: rc
: ---
Assigned To: Petr Vobornik
ipa-qe
: Regression, ZStream
Depends On: 1467675
Blocks: 1470125
  Show dependency treegraph
 
Reported: 2017-07-10 13:37 EDT by Martin Babinsky
Modified: 2017-08-09 07:17 EDT (History)
15 users (show)

See Also:
Fixed In Version: ipa-4.5.0-21.el7
Doc Type: If docs needed, set a value
Doc Text:
Previously, when installing IdM replica, the installer incorrectly set the location and permissions of temporary directories. The IdM management framework requires these temporary directories to operate correctly. As a consequence, after rebooting the newly configured replica, the services tied to the management framework did not work and displayed non-specific error messages. To fix this bug, the installer now additionally adds a drop-in configuration file that re-creates the directory structure after rebooting. As a result, the IdM replica continues to work correctly after reboot.
Story Points: ---
Clone Of: 1467675
: 1470125 (view as bug list)
Environment:
Last Closed:
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)
Comment 3 Martin Babinsky 2017-07-10 13:59:48 EDT
This issue can be reproduced also on RPM based installs (no containers):

1.) install a master
2.) install a replica
3.) reboot a replica
4.) try to login to WebUI on the replica

Actual outcome:

login fails due to missing /var/run/ipa directory

Expected outcome:

login works and WebUI is fully functional.

Moreover, upon replica VM restart only directory server is running, all other services are stopped. When running `ipactl restart` I see the following error:

```
ipactl restart
Failed to get service list from file: Unknown error when retrieving list of services from file: [Errno 2] No such file or directory: '/var/run/ipa/services.list'
```

This is also caused by the missing configuration in /etc/tmpfiles.d. A proper solution would be to ship a ipa-specific configuration to /usr/lib/tmpfiles.d/ (where vendor-provided configuration should be placed anyway) via spec file instead of runtime shenanigans. We are adding ipaapi user in spec anyway so we should not encounter issues with missing directory owners anymore.
Comment 6 Alexander Bokovoy 2017-07-10 16:10:49 EDT
Note that the code in 38c66896de1769077cd5b057133606ec5eeaf62b first creates the temporary directory, then runs client installation, and then configures systemd-tmpfiles to re-create temporary directories on reboot.

However, in the case of replica, we do not configure systemd-tmpfiles to re-create temporary directories. Instead, we expect upgrade code to handle this.

It looks like in the case of a replica installation we never run upgrade routine at all.

So a potential workaround would be to explicitly run ipa-server-upgrade before rebooting a replica, with or without containers.
Comment 7 Martin Babinsky 2017-07-11 06:50:50 EDT
Upstream ticket:
https://pagure.io/freeipa/issue/7053
Comment 12 Pavel Vomacka 2017-07-12 08:17:36 EDT
Fixed upstream
ipa-4-5:
https://pagure.io/freeipa/c/76cc115c53c3a9c5f594083ff4c4452479070021

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