-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dscreate: "start = False" and "systemd = False" have no effect #6099
Comments
Over time, the general['systemd'] call has been handled sanely, then commented out, then commented back in but inside the containerised if. It looks like the work to create dscontainer broke dscreate. |
It would really help us to understand your use case and how do you want to use automation. If I add
Do you also want the service remain disabled? Also,
Because it's an implementation detail and it's not supposed to be controlled by the user. It's present in the |
The automation of the directory server happens inside a systemd service, which is set using systemd's "Before" functionality to run before dirsrv@test (actually dirsrv@%i, but you get the idea). dscreate creates a problem because hidden under the hood, ignoring two explicit flags telling dscreate to absolutely do not do this, dscreate starts up the service using systemd on this line of the code: 389-ds-base/src/lib389/lib389/__init__.py Line 1112 in 91443ac
The service is indeed started - I know because it triggers a deadlock as below, and because the code tells me it's started:
We also have dscreate arbitrarily deciding that this particular instance should be started at next boot, which is none of dscreate's business. In our case we have "create a directory server but leave it in a disabled state". Obviously I can work around this by disabling the service afterwards, but this is ugly.
dscreate used to be a perl script, and has been replaced by the current python implementation. Unfortunately the python code didn't follow compatibility with the perl code, and this appears to be why things don't work. My biggest need is for the start flag to be properly implemented so the perl code behaviour returns. Systemd is currently needed, but beggars can't be choosers and if I have to manually recreate the missing systemd bit like tmpfiles.d config then so be it. |
Thank you for the clarification. This looks like a corner case to me and is definitely something we do not test against.
But with
Hyrum's law strikes again :)
I will submit a PR to fix the systemd override, but in the meantime you can set |
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
This should fix the systemd flag, that's perfect - much appreciated. The start flag does appear to be implemented, but it starts-with-stops rather than no start. 389-ds-base/src/lib389/lib389/instance/setup.py Line 1220 in 91443ac
By way of background, we've been configuring services inside systemd in a just-in-time fashion so that all systems start the same way on a clean boot every time. To do this, there is one service before the main service that writes config files (in 389ds case runs dscreate if needed), and one service after the main service that writes to the main service (creates/destroys backends, etc). Systemd's Before and After keeps everything running in the correct order. |
The suggest solution to set
during the build. I'm trying to create a barebones Docker image, but WITH all the custom plugin settings I want to use instead of having to orchestrate them outside of the container deployment. |
I think this line overwrites any changes I make to the defualts.
|
Also, it seems that setting
From this line 389-ds-base/src/lib389/lib389/__init__.py Line 1138 in 4fe22ec
389-ds-base/src/lib389/lib389/__init__.py Line 1119 in 4fe22ec
Is there no way to create a custom Docker image using |
Issue Description
When automating the configuration of 389ds, it is not possible to prevent the server being started via systemd's systemctl start.
This creates a deadlock as dscreate's hidden systemd calls collide with automation systemd.
Package Version and Platform:
Steps to Reproduce
Steps to reproduce the behavior:
Expected results
Systemd is not touched, 389ds is not started, exactly as the options require.
Additional context
This problem has come up a few times:
https://bugzilla.redhat.com/show_bug.cgi?id=1872910
#5452
The "systemd" option is broken because it's conditional on a variable called self.containerised:
389-ds-base/src/lib389/lib389/instance/setup.py
Line 950 in d379ac9
A search through the code for the "start" option shows that this option is never parsed.
The text was updated successfully, but these errors were encountered: