#9942 Replica installation: failure in replica conncheck
Closed: fixed by rjeffman. Opened by frenaud.

Clone of https://issues.redhat.com/browse/RHEL-148282

The replica installation fails in the replica-conncheck phase. This step connects to the master and executes a command on the master, that is handled by apache server. The httpd server is using dbus and oddjob to start a process but dbus does not recognize the ipaapi user that is trying to run the command.

The issue happens because the ipaapi user is now created using systemd-sysusers in the %post server section:

%post server
# NOTE: systemd specific section
    /bin/systemctl --system daemon-reload 2>&1 || :
# END
if [ $1 -gt 1 ] ; then
    /bin/systemctl condrestart certmonger.service 2>&1 || :
fi
/bin/systemctl reload-or-try-restart dbus
/bin/systemctl reload-or-try-restart oddjobd
%sysusers_create %{_sysusersdir}/ipa.conf 

but the creation happens AFTER dbus and oddjob are restarted. As a result, when the httpd server tries to call dbus, Dbus is not aware of the user ipaapi.

The fix is to call sysusers_create before restarting oddjob and dbus.


Note that we didn't detect the issue because the CI always install ipa-server-trust-ad package which performs a restart of oddjob.

Metadata Update from @frenaud:
- Custom field rhbz adjusted to https://issues.redhat.com/browse/RHEL-148282

Metadata Update from @frenaud:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/8173

master:

  • 059aa3f60feabae2f2595d6cc0a8b8435a87f517 Spec file: create the systemd-sysusers before oddjob and dbus restart

ipa-4-12:

  • 2491e09acf1fe10edabb4063bbb5862e10e41728 Spec file: create the systemd-sysusers before oddjob and dbus restart

ipa-4-13:

  • df379acfeec6322276d93e5843c79c2a6fad8663 Spec file: create the systemd-sysusers before oddjob and dbus restart

Metadata Update from @rjeffman:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata