[Date Prev][Date Next]
Re: ITS#1679 gentle SIGHUP handling
Howard Chu writes:
> Yes, what you suggest can be done, but I think it may be more effort than
> it's worth. Much simpler just to go with the first idea. Set up a timer on
> the old slapd that makes it quit even if there are active sessions, the
> client can always reconnect and it'll get the new slapd.
Well, that doesn't give you reconfig restarts, you know.
I think that has to be done something like this:
1. tell slapd to do a "gentle stop".
2. slapd enters read-only mode (i.e. rejects future update operations).
3. slapd waits for currently active update operations to finish.
4. slapd flushes the database cache, or better, closes the database
and reopens it in readonly mode (can that be done fairly simply?)
5. slapd tells the user that the database now can be backed up. (e.g.
#1 could be an ldapmodify on "cn=Control" setting "readonly=on",
and that operation would wait to finish until after step #4.)
6. you back up the database and start a new slapd with the backup.
7. you tell old slapd that it may now stop. (kill -HUP, maybe.)
8. old slapd waits for current clients to finish, and stops when they
do or after a timeout.
Does that sound right?