#3751 MONITOR: Do not use two configuration databases
Closed by fidencio. Opened by lslebodn.
SSSD/ lslebodn/sssd ldb_1.4  into  master

Download 3751.patch

confdb was initialized twice in monitor. The 1st time in
load_configuration and the 2nd time in server_setup.

libldb-1.4.0 contains stricter checking of PID which created db.
ldb_tdb: Prevent ldb_tdb reuse after a fork()

We may relax this restriction in the future, but for now do not assume
that the caller has done a tdb_reopen_all() at the right time.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>

It did not cause any problem when sssd was stared in interactive mode
(used by systemd) But it cause failures in daemon mode which is used
in cwrap integration

[sssd] [ldb] (0x4000): Destroying timer event 0x5555557b1d30 "ltdb_timeout"
[sssd] [ldb] (0x4000): Ending timer event 0x5555557cbdd0 "ltdb_callback"
[sssd] [server_setup] (0x0400): CONFDB: /var/lib/sss/db/config.ldb
[sssd] [ldb] (0x0010): Failed to unlock db: ../ldb_tdb/ldb_tdb.c:147: Reusing ldb opend by pid 28889 in process 28893
/ Protocol error
[sssd] [confdb_get_param] (0x0020): Failed to get [krb5_rcache_dir] from [config/sssd], error [5] (Input/output error)
[sssd] [confdb_get_string] (0x0020): Failed to get [krb5_rcache_dir] from [config/sssd], error [5] (Input/output error)

rebased onto d74a754310b4b44ded71ba8f8bd91af0ded6d9b7

Patch looks good and I've fired an internal CI build.

I'll get back to it as soon as I have the results and push the patch.

CI: http://vm-031.${abc}/logs/job/89/83/summary.html

master:
a887e33

Pull-Request has been closed by fidencio

master:
a887e33

BTW The original patch https://pagure.io/SSSD/sssd/pull-request/3751.patch contained a little bit more in commit message. May I know why some parts were removed?

It is not very polite to modify it without asking for permissions from the author.

Lukáš,

Sorry if I ended up removing something by mistake while merging your patch. It was not intentional, at all.

I appreciated that you've brought it to my attention and I'll double-check next time I'm accepting some patch. Thanks a lot for both your contribution and your comment.

Metadata