Bug 431276

Summary: Starting multiple times ipa_kpasswd and ipa_wegui starts multiple instances
Product: [Retired] freeIPA Reporter: Simo Sorce <ssorce>
Component: ipa-serverAssignee: Rob Crittenden <rcritten>
Status: CLOSED ERRATA QA Contact: Chandrasekar Kannan <ckannan>
Severity: low Docs Contact:
Priority: low    
Version: 1.0CC: benl
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: freeipa-2.0.0-1.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 429034    
Attachments:
Description Flags
create pid files in /var/run, start ipa_webgui as root and drop privs none

Description Simo Sorce 2008-02-01 22:40:11 UTC
Description of problem:
service ipa_kpasswd/ipa_wegui start run multiple times will start multiple
instances of said daemon

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

How reproducible:
always

Steps to Reproduce:
1. service ipa_kpasswd start
2. service ipa_kpasswd start
3. see that there are 2 daemons running
  
Actual results:
2 daemons running

Expected results:
second time service start fails

Additional info:

Comment 1 Rob Crittenden 2008-02-06 15:17:09 UTC
The issue is that neither creates a pid file in /var/run

Doing this in ipa_webgui is going to be a little tricky since it never gets root
privileges so can't write to /var/run.

Comment 2 Rob Crittenden 2008-02-06 16:03:49 UTC
Created attachment 294118 [details]
create pid files in /var/run, start ipa_webgui as root and drop privs

Comment 3 Rob Crittenden 2008-02-06 20:58:04 UTC
Committed in changeset 626

Comment 4 Yi Zhang 2008-05-28 21:52:55 UTC
QA Verified on May 28, 2008 (Yi)

Build used: May 28, 2008 (i386)

ipaserver[05/28/08 14:47] service ipa_kpasswd start
Starting ipa_kpasswd:                                      [  OK  ]
ipaserver[05/28/08 14:47] service ipa_kpasswd start
Starting ipa_kpasswd: 
ipaserver[05/28/08 14:47] 
ipaserver[05/28/08 14:47] service ipa_kpasswd start
Starting ipa_kpasswd: 
ipaserver[05/28/08 14:47] service ipa_kpasswd start
Starting ipa_kpasswd: 
ipaserver[05/28/08 14:47] ps -elf | grep ipa_kpasswd
5 S root      5597     1  0  78   0 -  1271 -      14:47 ?        00:00:00
ipa_kpasswd
0 S root      5639  3450  0  78   0 -   973 pipe_w 14:47 pts/0    00:00:00 grep
ipa_kpasswd

=====================================================
ipaserver[05/28/08 14:47] service ipa_webgui status
ipa_webgui (pid 4636) is running... 
ipaserver[05/28/08 14:48] service ipa_webgui start
Starting ipa_webgui: 
ipaserver[05/28/08 14:48]  
ipaserver[05/28/08 14:48] service ipa_webgui start
Starting ipa_webgui: 
ipaserver[05/28/08 14:48] 
ipaserver[05/28/08 14:48] service ipa_webgui start
Starting ipa_webgui: 
ipaserver[05/28/08 14:48] 
ipaserver[05/28/08 14:48] ps -elf | grep ipa_webgui
5 S apache    4636     1  0  75   0 - 44094 stext  11:55 ?        00:00:04
/usr/bin/python -E /usr/sbin/ipa_webgui
0 S root      5694  3450  0  77   0 -   973 pipe_w 14:48 pts/0    00:00:00 grep
ipa_webgui
ipaserver[05/28/08 14:48]