Hi Neil,

I looked at the code as an Informix developer. I think so far it looks good. :)

But I have a few questions/comments:

- there seem to be 2 required parameters that are not quite clear to me, what
  they are for and what values they should have: LH_RS and HAS_RS (in file
  ids_config).
  Is it possible to put some comments into this file to better explain the
  purpose and possible/expected values for these two parameters?

- function check_start() (in file functions) seems to look for processes only
  (using pgrep). This may not give the right "picture" if there is more than
  one instance running on a machine.
  [ Running more than one instances of IDS, even different versions of IDS,
    may not be a very common thing, but is possible and perfectly legal. ]
  In a future version if HA-Informix it may be worth thinking about this.

- there is a similar "problem" with identifying SHM segments (ipcs ...).
  For one, there can be other SHM segments on a machine (with whatever
  user/group owners), independent of IDS and user/group "informix".
  But if there is more than one IDS instance running on a machine, then surely
  there are more SHM segments on the machine - and only some of them will
  belong to a particular IDS instance. Thus just doing "ipcs ..." will not
  necessarily find out the state of a particular IDS instance correctly.

  If you are interested, I can provide an algorithm to "reverse-engineer" the
  SHM-key into the IDS SERVERNUM (as specified in the $ONCONFIG file). This
  SERVERNUM is unambiguous for IDS instances (provided there is no Informix
  XPS, for which the algorithm is a bit different).

- removal of SHM segments (in function cleanup_ipc()) is not always that easy.
  As long as a process is still attached to an SHM segment, ipcrm will not 
really
  remove the SHM segment. Instead the attached process has to be killed first.

  [ With IDS it is possible to connect a local client, e.g. the backup tools, 
    via specific SHM segments to the IDS instance (instead of using TCP/IP
    connections). Even though the server may not be running anymore (
    oninit processes died) and most SHM segments are gone, such a
    communication SHM segment will not be removable as long as the local
    client is attached to it. ]

  With above algorithm to identify SHM segments of a specific IDS instance,
  it would be possible to detect such a situation correctly and thus return
  an error only when necessary (but not when un-related SHM segments are
  still around).

  Also, in the case of more than one instances on a machine, other instances'
  SHM segments would probably get removed - effectively killing those instances
  in the process.

That's it from my side.

TIA,
Martin.
--
Martin Fuerderer
IBM Informix Development Munich, Germany
Information Management

IBM Deutschland GmbH
Chairman of the Supervisory Board: Hans Ulrich M?rki
Board of Management: Martin Jetter (Chairman), Rudolf Bauer, Christian 
Diedrich, Christoph Grandpierre, Matthias Hartmann, Thomas Fell, Michael Diemer
Corporate Seat: Stuttgart, Germany; Reg.-Gericht: Amtsgericht Stuttgart, 
HRB-Nr.: 14 562 WEEE-Reg.-Nr. DE 99369940
--

This message posted from opensolaris.org


Reply via email to