Bug 678715 - netstat loop fixes needed
Summary: netstat loop fixes needed
Keywords:
Status: CLOSED EOL
Alias: None
Product: Dogtag Certificate System
Classification: Retired
Component: Installer (pkicreate/pkiremove)
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthew Harmsen
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks: 679174
TreeView+ depends on / blocked
 
Reported: 2011-02-18 23:46 UTC by John Dennis
Modified: 2020-03-27 18:40 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 679174 (view as bug list)
Environment:
Last Closed: 2020-03-27 18:40:23 UTC


Attachments (Terms of Use)
better netstat loop behaviour (574 bytes, patch)
2011-02-18 23:54 UTC, John Dennis
mharmsen: review+
Details | Diff

Description John Dennis 2011-02-18 23:46:08 UTC
In the start_instance() function in file pki/base/common/scripts/functions

A loop was recently added to wait for the instance to fully initialize by using netstat to check socket availability.

There are a couple of minor problems which need fixing.

1) No check for previous status

The instance is started like this:

    $PKI_INSTANCE_INITSCRIPT start
    rv=$?

then the loop is entered. But if the initscript failed ($rv -ne 0) there is no point in looping for 30 seconds waiting for it to come up. The function should immediately return the failed error code.

2) If the loop is exhausted and no sockets were detected the function should return a failure error code.

Comment 1 John Dennis 2011-02-18 23:54:53 UTC
Created attachment 479632 [details]
better netstat loop behaviour

Comment 2 Matthew Harmsen 2011-02-22 00:31:10 UTC
TIP:

# cd pki

# svn status | grep -v ^$ | grep -v ^P | grep -v ^X | grep -v ^?
M       base/common/scripts/functions

# svn commit
Sending        base/common/scripts/functions
Transmitting file data .
Committed revision 1861.


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