Skip to content

Issue 6099 - systemd = False has no effect - #6101

Draft
vashirov wants to merge 1 commit into
389ds:mainfrom
vashirov:i6099
Draft

vashirov wants to merge 1 commit into
389ds:mainfrom
vashirov:i6099

Conversation

@vashirov

Copy link
Copy Markdown
Member

Bug Description:
systemd = False doesn't override with_systemd = 1 from defaults.inf when used with dscreate. It is only effective when setup is running in a containerized environment (via dscontainer). But for some special use cases it's important that DS installation runs without systemd.

Fix Description:
Remove the condition for overriding systemd flag.
systemd option is not exposed in the default template, it's listed there only when --advanced flag is used, so it should not affect regular installations.

Fixes: #6099

Bug Description:
`systemd = False` doesn't override `with_systemd = 1` from
`defaults.inf` when used with `dscreate`. It is only effective when
setup is running in a containerized environment (via `dscontainer`).
But for some special use cases it's important that DS installation runs
without systemd.

Fix Description:
Remove the condition for overriding systemd flag.
`systemd` option is not exposed in the default template, it's listed
there only when `--advanced` flag is used, so it should not affect
regular installations.

Fixes: 389ds#6099
@vashirov

Copy link
Copy Markdown
Member Author

dscreate tests in the basic test suite fail because of the assert in the try..except block, it prevents finalizer to run to clean up and remove the instance before the next test. Working on the tests fix...

@vashirov

Copy link
Copy Markdown
Member Author

This uncovered another issue: server can't be stopped, if it was created with systemd = False. ns-slapd keeps running, because lib389 has no idea that the override existed when the instance was created, and tries to stop it using systemd (because with_systemd = 1 is in the defaults.inf). And we don't expose this in .dsrc.

@mwhahaha

Copy link
Copy Markdown

@vashirov Any update on this? I'm hitting this trying to bootstrap an instance running in a container that mounts host directories and this change seems to be what I need.

@vashirov

Copy link
Copy Markdown
Member Author

@mwhahaha, sorry, no updates, this fell through the cracks. I will check it next week.

@mwhahaha

Copy link
Copy Markdown

No worries. Actually I looked into this further and there are some other minor issues when running in a container. The pid file is hardcoded to /data/run/slapd-localhost.pid and some other minor stuff. I ended up taking the existing dscontainer script and creating something based off it to handle our environment instead. From a manual configuration for container standpoint, we need the start = false and systemd = false to both work as that's what dscontainer does when trying to initialize fresh instances.

@progier389 progier389 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aadhikar

Copy link
Copy Markdown
Contributor

@vashirov Hey, can you please rebase and merge it?

@vashirov
vashirov marked this pull request as draft July 21, 2026 07:44
@vashirov

Copy link
Copy Markdown
Member Author

@aadhikar, no, it's not ready and not tested properly yet. I converted it to draft, do not merge it yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dscreate: "start = False" and "systemd = False" have no effect

4 participants