Bug 680284 - Don't create rundir in post installation script
Summary: Don't create rundir in post installation script
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Install/Uninstall
Version: 1.2.8
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Nathan Kinder
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks: 639035 389_1.2.8 680564
TreeView+ depends on / blocked
 
Reported: 2011-02-24 22:25 UTC by Nathan Kinder
Modified: 2015-12-07 17:10 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 680564 (view as bug list)
Environment:
Last Closed: 2015-12-07 17:10:56 UTC
Embargoed:


Attachments (Terms of Use)
0001-do-not-create-var-run-dirsrv-setup-will-create-it-in.patch (7.53 KB, patch)
2011-02-25 02:31 UTC, Rich Megginson
nhosoi: review+
nkinder: review+
Details | Diff

Description Nathan Kinder 2011-02-24 22:25:37 UTC
We currently create /var/run/dirsrv in the post-install scripts if it doesn't already exist.  This can cause problems with incorrect permissions when you run setup-ds.pl.  The issue is that setup-ds.pl will leave the owner alone if /var/run/dirsrv exists already and it will reset the group permissions only.  If a SuiteSpotGroup is not specified, the group permissions are set to none.  This will cause the instance to not have permission to write it's pidfile unless it is configured to run as root.

If we don't create /var/run/dirsrv at post-install, setup-ds.pl will create it with the proper permissions.

Comment 1 Rich Megginson 2011-02-25 02:31:15 UTC
Created attachment 480912 [details]
0001-do-not-create-var-run-dirsrv-setup-will-create-it-in.patch

Comment 2 Rich Megginson 2011-02-25 22:22:03 UTC
fedora rawhide:
commit 31909e6aa2f3550fd87fb316c95bb43752035b49
Author: Rich Megginson <rmeggins>
Date:   Thu Feb 24 15:44:15 2011 -0700

f15: commit 31909e6aa2f3550fd87fb316c95bb43752035b49
f14: commit 36b41d533e48a56782567185f71b30f201439124
f13: commit 7f60adcb57e5edbe1e9206d14eb09772f44c5dfb
el5: commit 9c6088654813d05b60d9b40f8f779ac81004bc38 and commit b5a7bced384e40f65be8a8d61ae05a8a61164bae

Comment 3 Jenny Severance 2011-05-16 16:52:23 UTC
Can u please add steps to verify? Thanks

Comment 4 Rich Megginson 2011-05-16 17:31:33 UTC
(In reply to comment #3)
> Can u please add steps to verify? Thanks

make sure the system is completely clean of 389 packages - make sure there are no /var/*/dirsrv directories.

yum install 389-ds-base

There should not be a /var/run/dirsrv directory after yum install - it should be created when you run setup-ds[-admin].pl

Comment 5 Amita Sharma 2011-05-25 09:19:31 UTC
make sure the system is completely clean of 389 packages - make sure there are
no /var/*/dirsrv directories.

[root@amsharma etc]# rpm -qa | grep 389
[root@amsharma var]# ls -l /var/run/dirsrv
ls: cannot access /var/run/dirsrv: No such file or directory


I got a segmentation fault here :( (not sure, because I was under /var???)
[root@amsharma var]# yum install 389-ds-base
Loaded plugins: changelog, downloadonly, refresh-packagekit, rhnplugin, verify

DS90                                                                                                                                  | 4.0 kB     00:00     
DS90/primary_db                                                                                                                       | 3.0 MB     00:29     
DS90debug                                                                                                                             | 3.0 kB     00:00     
DS90debug/primary_db                                                                                                                  | 483 kB     00:08     
Dep_DS90                                                                                                                              | 4.0 kB     00:00     
Dep_DS90/primary_db                                                                                                                   |  13 kB     00:00     
Segmentation fault

..............

[root@amsharma var]# 

Then Tried reinstalling the package -->
[root@amsharma var]# cd /
[root@amsharma /]#  yum install 389-ds-base
Freeing read locks for locker 0x3b6: 19846/140173401204480
Freeing read locks for locker 0x3b8: 19846/140173401204480
Freeing read locks for locker 0x3b9: 19846/140173401204480
Loaded plugins: changelog, downloadonly, refresh-packagekit, rhnplugin, verify
production-rhel-x86_64-workstation-6                                                                                                  | 1.5 kB     00:00     
production-rhel-x86_64-workstation-6/primary                                                                                          | 3.2 MB     00:43     
production-rhel-x86_64-workstation-6                                                                                                               4405/4405
production-rhel-x86_64-workstation-optional-6                                                                                         | 1.3 kB     00:00     
production-rhel-x86_64-workstation-optional-6/primary                                                                                 | 689 kB     00:06     
production-rhel-x86_64-workstation-optional-6                                                                                                      2602/2602
production-rhel-x86_64-workstation-servicedesk-6                                                                                      | 1.0 kB     00:00     
production-rhel-x86_64-workstation-servicedesk-6/primary                                                                              |  53 kB     00:00     
production-rhel-x86_64-workstation-servicedesk-6                                                                                                     158/158
production-rhel-x86_64-workstation-supplementary-6                                                                                    | 1.5 kB     00:00     
production-rhel-x86_64-workstation-supplementary-6/primary                                                                            |  40 kB     00:00     
production-rhel-x86_64-workstation-supplementary-6                                                                                                   101/101
production-rhn-tools-rhel-x86_64-workstation-6                                                                                        | 1.3 kB     00:00     
production-rhn-tools-rhel-x86_64-workstation-6/primary                                                                                | 6.6 kB     00:00     
production-rhn-tools-rhel-x86_64-workstation-6                                                                                                         31/31
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package 389-ds-base.x86_64 0:1.2.8.2-1.el6 will be installed
--> Processing Dependency: 389-ds-base-libs = 1.2.8.2-1.el6 for package: 389-ds-base-1.2.8.2-1.el6.x86_64
--> Processing Dependency: libslapd.so.0()(64bit) for package: 389-ds-base-1.2.8.2-1.el6.x86_64
--> Running transaction check
---> Package 389-ds-base-libs.x86_64 0:1.2.8.2-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================
 Package                                    Arch                             Version                                    Repository                      Size
=============================================================================================================================================================
Installing:
 389-ds-base                                x86_64                           1.2.8.2-1.el6                              DS90                           1.2 M
Installing for dependencies:
 389-ds-base-libs                           x86_64                           1.2.8.2-1.el6                              DS90                           355 k

Transaction Summary
=============================================================================================================================================================
Install       2 Package(s)

Total download size: 1.5 M
Installed size: 5.0 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): 389-ds-base-1.2.8.2-1.el6.x86_64.rpm                                                                                           | 1.2 MB     00:14     
(2/2): 389-ds-base-libs-1.2.8.2-1.el6.x86_64.rpm                                                                                      | 355 kB     00:06     
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                         70 kB/s | 1.5 MB     00:22     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 389-ds-base-libs-1.2.8.2-1.el6.x86_64                                                                                                     1/2 
  Installing : 389-ds-base-1.2.8.2-1.el6.x86_64                                                                                                          2/2 

Installed:
  389-ds-base.x86_64 0:1.2.8.2-1.el6                                                                                                                         

Dependency Installed:
  389-ds-base-libs.x86_64 0:1.2.8.2-1.el6                                                                                                                    

Complete!

[root@amsharma /]# 
Checking "/var/run/dirsrv directory after yum install"

[root@amsharma /]# ls -l /var/run/dirsrv
ls: cannot access /var/run/dirsrv: No such file or directory

Comment 6 Rich Megginson 2011-05-26 13:29:52 UTC
Not sure why yum core dumped.  You should probably file a bug against yum.  But the directory server bug has been verified.


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