Bug 435778

Summary: ds_removal: Error:The server '' is not reachable. Error: unknown error
Product: [Retired] 389 Reporter: Graham Leggett <minfrin>
Component: Install/UninstallAssignee: Rich Megginson <rmeggins>
Status: CLOSED CURRENTRELEASE QA Contact: Chandrasekar Kannan <ckannan>
Severity: low Docs Contact:
Priority: low    
Version: 1.1.0CC: benl, yzhang
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 8.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-04-29 23:02:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 249650, 452721    
Attachments:
Description Flags
diffs
none
cvs commit log none

Description Graham Leggett 2008-03-03 20:09:25 UTC
After suffering an install failure as per bug 435774, an attempt was made to use
ds_removal to remove the broken instance and try again.

This triggered the following unhandled error:

[root@gatekeeper fedora-ds]# ds_removal -s gatekeeper-domain-com -w password
Error:The server '' is not reachable.  Error: unknown error

The ds_removal script seems to make the bogus assumption that the instance being
removed was fully installed, and so fails if a sanity check on the instance fails.

The ds_removal script should be capable of removing an instance in any state of
brokenness or disarray.

Comment 3 Rich Megginson 2008-07-14 16:47:41 UTC
Created attachment 311731 [details]
diffs

Comment 4 Rich Megginson 2008-07-14 20:29:28 UTC
Created attachment 311772 [details]
cvs commit log

Reviewed by: nkinder (Thanks!)
Branch: HEAD
Fix Description: Added -f (force) flag to ds_removal.  The -f (force) flag
tells ds_removal to ignore errors and attempt to remove as much as possible. 
This is only suggested to be used if ds_removal without the -f flag fails, and
you really, really want to remove the ds.
Platforms tested: RHEL5, Fedora 8, Fedora 9
Flag Day: no
Doc impact: no

Comment 5 Fedora Update System 2008-09-04 19:47:19 UTC
fedora-ds-admin-1.1.6-1.fc8 has been submitted as an update for Fedora 8.
http://admin.fedoraproject.org/updates/fedora-ds-admin-1.1.6-1.fc8

Comment 6 Fedora Update System 2008-09-04 19:48:46 UTC
fedora-ds-admin-1.1.6-1.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/fedora-ds-admin-1.1.6-1.fc9

Comment 7 Fedora Update System 2008-09-11 16:56:06 UTC
fedora-ds-admin-1.1.6-1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2008-09-11 17:16:18 UTC
fedora-ds-admin-1.1.6-1.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Yi Zhang 2009-04-06 19:18:41 UTC
Test 1

1. make test server has no physical spaces left (in order to generate segmentation fault for ds install)
2. install DS (and of course, it will fail)
3. remove failed DS install without -f option : ds_removal

Test 2
4. repeat step 1,2
3. remove failed DS install with -f option: ds_removal

compare removal result : test 1 has error output, test 2 does not

Test result: PASS

======= remove without -f ======
[ install log ]
/usr/lib/dirsrv/slapd-mv32a-vm/ldif2db: line 25:  2731 Segmentation fault      ./ns-slapd ldif2db -D /etc/dirsrv/slapd-mv32a-vm "$@" 2>&1

Error: Could not create directory server instance 'mv32a-vm'.
Exiting . . .
Log file is '/tmp/setup53ts9n.log'

[remove without -f ]
[root@mv32a-vm slapd-mv32a-vm]# ds_removal -s mv32a-vm -w redhat123
Error:The server '' is not reachable.  Error: unknown error


after removal, the directory "slapd-mv32a-vm" renamed to "slapd-mv32a-vm.removed" and it contains the following files;
 cd slapd-mv32a-vm.removed/
[root@mv32a-vm slapd-mv32a-vm.removed]# ll
total 8
-rw------- 1 nobody nobody 0 Apr  6 11:59 cert8.db
-rw------- 1 nobody nobody 0 Apr  6 11:59 secmod.db

=========== remove with -f ===============
[DS install failed as expected]
[06/Apr/2009:12:09:46 -0700] - Writing to the errors log failed.  Exiting...
/usr/lib/dirsrv/slapd-mv32a-vm/ldif2db: line 25:  2791 Segmentation fault      ./ns-slapd ldif2db -D /etc/dirsrv/slapd-mv32a-vm "$@" 2>&1

Error: Could not create directory server instance 'mv32a-vm'.
Exiting . . .
Log file is '/tmp/setupX9UxmY.log'

[ remove with -f option ]
< DS81rpm >[root@mv32a-vm dirsrv]# ds_removal -s mv32a-vm -w redhat123 -f
< DS81rpm >[root@mv32a-vm dirsrv]# ls /etc/dirsrv/ -l
total 32
drwxr-xr-x 2 root   root   4096 Mar 27 14:18 admin-serv
drwxr-xr-x 2 root   root   4096 Mar 27 14:18 config
drwxr-xr-x 2 root   root   4096 Mar 27 14:18 schema
drwxrwx--- 2 nobody nobody 4096 Apr  6 12:11 slapd-mv32a-vm.removed
< DS81rpm >[root@mv32a-vm dirsrv]# ls slapd-mv32a-vm.removed/ -l
total 8
-rw------- 1 nobody nobody 0 Apr  6 12:09 cert8.db
-rw------- 1 nobody nobody 0 Apr  6 12:09 secmod.db


===> remove is clean, no error msg output. the final removing result is same as ds_removal without "-f" option

Comment 10 Chandrasekar Kannan 2009-04-29 23:02:37 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-0455.html