Bug 1302382 - running remove-ds-admin.pl multiple times will make it so you cannot install DS
Summary: running remove-ds-admin.pl multiple times will make it so you cannot install DS
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Directory Server
Classification: Red Hat
Component: Install/Uninstall
Version: 10.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: DS10.1
: ---
Assignee: Noriko Hosoi
QA Contact: Viktor Ashirov
Aneta Šteflová Petrová
URL:
Whiteboard:
Depends On:
Blocks: 1334480
TreeView+ depends on / blocked
 
Reported: 2016-01-27 16:41 UTC by Eugene Keck
Modified: 2020-09-13 21:38 UTC (History)
4 users (show)

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.
Clone Of:
: 1334480 (view as bug list)
Environment:
Last Closed: 2016-11-07 15:39:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 1758 0 None None None 2020-09-13 21:38:47 UTC
Red Hat Product Errata RHBA-2016:2665 0 normal SHIPPED_LIVE Red Hat Directory Server bug fix and enhancement update 2016-11-07 20:38:00 UTC

Description Eugene Keck 2016-01-27 16:41:29 UTC
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):
389-admin-1.1.42-1.el7dsrv.x86_64


How reproducible:
Always


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_ErrType: 
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 17:56:13 UTC
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 17:34:46 UTC
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
https://bugzilla.redhat.com/show_bug.cgi?id=1229445

and
http://documentation-devel.engineering.redhat.com/site/documentation/en-US/Red_Hat_Directory_Server/10/html/Release_Notes/Release_Notes-Bugs_Addressed-Known_Issues.html

"
 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 19:13:48 UTC
Build tested:
389-admin-1.1.44-1.el7dsrv.x86_64

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 17:38:51 UTC
Your new relnote looks good.  Thanks, Aneta!

Comment 8 errata-xmlrpc 2016-11-07 15:39:36 UTC
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.

https://rhn.redhat.com/errata/RHBA-2016-2665.html


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