On Wednesday, February 24, 2016 14:57:20 William Brown wrote:
Please do *not* use /etc/init.d scripts. You *must* use "service
> Invoking this (via an ansible shell command) fails to work correctly as
> - name: Start Dirsrv
> shell: nohup screen -d -m /usr/sbin/start-dirsrv
> So even trying to nohup + using screen to "background" it, it still shuts
> down immediately after that 'shell' stanza is done.
> Even this fails: nohup screen -d -m /usr/sbin/start-dirsrv & disown
Yes, because this process forks into the background. You would expect it to
Yes, I expect it to fork to the background, but thought that maybe it was
still connected to the forground...somehow.
That log shows a clean slapd shutdown, not a termination or crash.
What happens if you use the ansible service module with -vvvv IE:
- name: Start dirsrv
action: service enabled=yes state=restarted
I will set it up and run it again, but the same thing happened. That's how I
originally found it. Actually, I did it with 'ipa' as the service, and the
dirsrv part was stopping right away. The direct invocation of the startup
scripts were subsequent trouble shooting.
Have you got any esoteric arguments in say /etc/sysconfig/dirsrv? Are
adding extra cli args like -d 0 to ns-slapd? (That would certainly break it
No. Just the defaults + whatever IPA installer adds.
Are you running your ansible playbooks at sudo? Trying to start
without privileges would cause issues.
Yes, it's all as sudo (installation of packages and all other root-requiring
Can you see anything in /var/log/messages?
I'll check, but if I remember correctly, no.
When you use ansible to control ipa rather than dirsrv directly, does
have the same issue?
Yes, that's how I originally found the issue.
I think the issue is not with dirsrv at all, but with your ansible
environment and how you are trying to start / stop the services....
This is a bog-standard ansible environment. Not sure what I would be doing
wrong. All other services started by Ansible remain running after it
Joshua J. Kugler - Fairbanks, Alaska
Azariah Enterprises - Programming and Website Design
joshua(a)azariah.com - Jabber: pedahzur(a)gmail.com
PGP Key: http://pgp.mit.edu/