Bug 1302382 - running remove-ds-admin.pl multiple times will make it so you cannot install DS
running remove-ds-admin.pl multiple times will make it so you cannot install DS
Product: Red Hat Directory Server
Classification: Red Hat
Component: Install/Uninstall (Show other bugs)
All Linux
medium Severity medium
: DS10.1
: ---
Assigned To: Noriko Hosoi
Viktor Ashirov
Aneta Šteflová Petrová
Depends On:
Blocks: 1334480
  Show dependency treegraph
Reported: 2016-01-27 11:41 EST by Eugene Keck
Modified: 2016-11-07 10:39 EST (History)
4 users (show)

See Also:
Fixed In Version: 389-admin-1.1.44-1.el7dsrv
Doc Type: Bug Fix
Doc Text:
setup-ds-admin.pl no longer fails after running remove-ds-admin.pl due to missing configuration files Previously, executing the remove-ds-admin.pl script removed files in the Administration Server's configuration directory if no backup was available for them. Consequently, if the user executed the setup-ds-admin.pl script after running remove-ds-admin.pl, setup-ds-admin.pl failed. The problem occurred in the following situations: * when remove-ds-admin.pl was executed repeatedly * when remove-ds-admin.pl was executed without executing the setup-ds-admin.pl first Instead of removing the files, remove-ds-admin.pl now overrides them from backup if a backup is available. As a result, the script no longer removes files that do not have a backup, and setup-ds-admin.pl no longer fails in this situation.
Story Points: ---
Clone Of:
: 1334480 (view as bug list)
Last Closed: 2016-11-07 10:39:36 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2665 normal SHIPPED_LIVE Red Hat Directory Server bug fix and enhancement update 2016-11-07 15:38:00 EST

  None (edit)
Description Eugene Keck 2016-01-27 11:41:29 EST
Description of problem:
If you happen to run remove-ds-admin.pl multiple times in a row you cannot install DS.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. /usr/sbin/setup-ds-admin.pl --silent --file=/root/setup.inf
2. /usr/sbin/remove-ds-admin.pl -f -d -a -y
3. /usr/sbin/remove-ds-admin.pl -f -d -a -y
4. /usr/sbin/setup-ds-admin.pl --silent --file=/root/setup.inf

Actual results:
NMC_Status: 1
NMC_ErrInfo: Cannot open file /etc/dirsrv/admin-serv/console.conf for reading
Could not update the httpd engine configuration.
Failed to create and configure the admin server

Expected results:
The admin server was successfully started.
Admin server was successfully created, configured, and started.
Exiting . . .

Additional info:
What is happening when you run setup-ds-admin.pl twice. It removes the 4 files

# ls -l /etc/dirsrv/admin-serv/
total 48
-rw-r--r--. 1 root root  3936 Jun  8  2015 admserv.conf
-rw-r--r--. 1 root root  4466 Jun  8  2015 console.conf
-rw-r--r--. 1 root root 26738 Jun  8  2015 httpd.conf
-rw-r--r--. 1 root root  4505 Jun  8  2015 nss.conf

and there no backup directory to copy back to /etc/dirsrv/admin-serv/. One way to handle this is.  Do not make a backup but have a direcroty with the 4 default configs and it would copy them to /etc/dirsrv/admin-serv/ before it edits them.
Comment 1 Marc Sauton 2016-02-01 12:56:13 EST
as a workaround, re-installing 389-admin will add back the missing config files when no backup exists
Comment 2 Marc Sauton 2016-02-15 12:34:46 EST
note I forgot to post/save last week..:
Viktor Ashirov pointed me to those known references (thanks):

bz 1229445 - [DOC -- known issue] remove-ds-admin.pl removes files in the rpm


 If the remove-ds-admin.pl script is executed without an installed Admin server, it removes configuration files that were installed from the RPM package. As a consequence, subsequently run setup-ds-admin.pl script terminates without creating the configuration file backups. To work around this problem, run the yum reinstall 389-admin command to recover the missing files. 

with this workaround, GSS is trying to close the sf case number 01572443
Comment 4 Simon Pichugin 2016-09-08 15:13:48 EDT
Build tested:

Steps to verify:
1. Install an instance with setup-ds-admin.pl
2. remove-ds-admin.pl -f -d -a -y
3. remove-ds-admin.pl -f -d -a -y
4. Install an install second time with setup-ds-admin.pl:

Result output:
The admin server was successfully started.
Admin server was successfully created, configured, and started.
Exiting . . .

Marking as verified.
Comment 6 Noriko Hosoi 2016-10-13 13:38:51 EDT
Your new relnote looks good.  Thanks, Aneta!
Comment 8 errata-xmlrpc 2016-11-07 10:39:36 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.