#457 dirsrv init script returns 0 even when few or all instances fail to start
Closed: wontfix None Opened 11 years ago by rmeggins.

https://bugzilla.redhat.com/show_bug.cgi?id=856657 (Red Hat Enterprise Linux 6)

Description of problem:

[root@test webapps]# service dirsrv status
dirsrv oss is stopped
[root@test webapps]# service dirsrv start
Starting dirsrv:
    oss...[11/Sep/2012:13:11:57 +0300] startup - The default password storage
scheme SSHA could not be read or was not found in the file
/etc/dirsrv/slapd-oss/dse.ldif. It is mandatory.
                                                           [FAILED]
  *** Warning: 1 instance(s) failed to start
[root@test webapps]# echo $?
0

The init script doesn't manage the case where one or *all* the defined
instances fail to start for any reason and returns 0 in any case.
I reviewed the LSB and it does not seem to specify the behaviour for a
multiple-instances service like this is. So I'm not sure about what value it
should return in case just a sub-set of the instances fail to start.
Anyway I would consider reasonable that it return a value !=0 at least if all
the instances fail.

Version-Release number of selected component (if applicable):
389-ds-base-1.2.10.2-20.el6_3

How reproducible:
Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
I'll try to propose a patch for this in the next few days

proposed patch to make the init script fail with exit=1 if all instances fail to start
initscript-exit-code.diff

Send out for review. Thanks for the patch lvilla!

Changed patch to report error(1) if at least one instance fails to start.

git merge
wrappers/initscript.in | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

[mareynol@localhost ds]$ git push origin master
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 539 bytes, done.
Total 4 (delta 3), reused 0 (delta 0)
To ssh://git.fedorahosted.org/git/389/ds.git
daa43b7..ef48c93 master -> master

Metadata Update from @lvilla:
- Issue assigned to mreynolds
- Issue set to the milestone: 1.2.11.15

7 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/457

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

3 years ago

Login to comment on this ticket.

Metadata