Bug #133

Client processes don't get killed on "xadmin down"

Added by Pablo almost 7 years ago. Updated almost 7 years ago.

Status:ClosedStart date:05/03/2017
Priority:High (Code 3)Due date:
Assignee:-% Done:

100%

Category:-
Target version:-

Description

I have client registered in ndrxconfig.xml:

        </servers>
        <clients>
                <client cmdline="brisoncl -t ${NDRX_CLTTAG} -s ${NDRX_CLTSUBSECT}">
                        <exec tag="BRISONCL" subsect="1" autostart="Y" log="${MOSTDIR}/tmp/BRISONCL"/>
                </client>
                <client cmdline="xwfdmn -t XWFDMN -s 1">
                        <exec tag="XWFDMN" subsect="1" autostart="Y" log="/most/runtime/project/a/tmp/XWFDMN"/>
                </client>
                <client cmdline="rmsrepairdmn -t ${NDRX_CLTTAG}">
                        <exec tag="RMSREPAIRDMN" autostart="Y" log="/most/runtime/project/a/tmp/RMSREPAIRDMN"/>
                </client>
        </clients>
</endurox>

they keep running after I run xadmin down and all servers get killed.

History

#1 Updated by Madars almost 7 years ago

down works only on servers. It does not recognize client processes. But I will think about having to discover the child processes of the CPMSRV. So that down script, find cpmsrv, checks it's pid, then search for all child processes of this pid and kill them.

#2 Updated by Madars almost 7 years ago

So we need a way to list child PIDs of the parent pid for:

- Linux: For linux: ps --ppid <PID>
- Solaris
- FreeBSD
- AIX
- Possibly for Cygwin.

Or... probably we could add some sort of filter for ndrx_sys_ps_list(), to check the second column of the ps output. To match the third column to some value (which is parent process pid). Regex match would be fine.

#3 Updated by Madars almost 7 years ago

Second option is at point of removal of client queues, we have pid inside, parse the PID and kill the process.

I guess both options would be the best: kill processes for which cpmsrv is parent, and kill any client processes found in queue names.

#4 Updated by Madars almost 7 years ago

  • Priority changed from Normal (Code 4) to High (Code 3)

#5 Updated by Madars almost 7 years ago

Enduro/X is already killing clients by client reply queue. Thus needs to implement to kill child processes of the cpmsrv.

#6 Updated by Madars almost 7 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

#7 Updated by Madars almost 7 years ago

New features comes with down:

- Recursively will track down client process childs and kill them too.
- Changed order of killing flow, so that ndrxd or tprecover or cpmsrv does not get chance to boot child processes again

Updates to cpmsrv:
- Added new flag "klevel" with default value 0. Values: 0 - do not kill child processes of the clients Recursively, 1 - kill only when doing SIGKILL (-9), 2 - kill when ever process is being stopped with SIGTERM or SIGINT. For case -2 the child are killed immediately after the signal delivery.

#8 Updated by Madars almost 7 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF