contrail-nodemgr leaves [contrail-cassan] zombie process

Bug #1738757 reported by Sergey Kreys
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.2
Fix Committed
Undecided
Sergey Kreys
Trunk
Fix Committed
High
Sundaresan Rajangam
OpenContrail
New
Undecided
Unassigned

Bug Description

contrail-nodemgr periodically calls contrail-cassandra-status utility,
via non-blocking subprocess.Popen() and does not take care about
its return code. As a result, when child process ends and gracefully
exits, it is still present in "ps" output as zombie process
"[contrail-cassan]":

root 1061 0.0 0.0 4464 700 ? Ss 09:37 0:00 /bin/sh -e /proc/self/fd/9
root 1064 0.1 0.0 62168 18460 ? S 09:37 0:04 \_ /usr/bin/python /usr/bin/supervisord --nodaemon -c /etc/contrail/supervisord_config.conf
root 1357 0.0 0.0 244600 32172 ? Sl 09:37 0:02 \_ python /usr/bin/contrail-nodemgr --nodetype=contrail-config
root 5644 0.1 0.0 0 0 ? Z 10:53 0:00 | \_ [contrail-cassan] <defunct>

It is not critical, as just one zombie process is present, and it is
actually exited. But since somebody may be scared and confused by this
"[contrail-cassan]", it is better just to not let this process become
zombie.

Tags: analytics
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/38417
Submitter: Sergey Kreys (<email address hidden>)

Jeba Paulaiyan (jebap)
tags: added: ana
tags: added: analytics
removed: ana
Sachin Bansal (sbansal)
Changed in opencontrail:
assignee: nobody → Sundaresan Rajangam (srajanga)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/38417
Committed: http://github.com/Juniper/contrail-controller/commit/d14806253f561c9c311cfb688afebb0b3427483b
Submitter: Zuul (<email address hidden>)
Branch: master

commit d14806253f561c9c311cfb688afebb0b3427483b
Author: Sergey Kreys <email address hidden>
Date: Mon Dec 18 13:47:51 2017 +0300

Fix to avoid contrail-cassandra-status zombie proc

Proposed fix: use "subprocess.call()" instead of "Popen()" for
"contrail-cassandra-status". Use it with "shell=True" - to avoid
zombies, and use "&" at the end - to run in non-blocking way.
And also do this for "contrail-cassandra-repair" as it has same problem.

Change-Id: Ibefde45932613bb2f600a049037b483a2d7b33a8
Closes-bug: 1738757

Changed in opencontrail:
assignee: Sundaresan Rajangam (srajanga) → nobody
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.2

Review in progress for https://review.opencontrail.org/47568
Submitter: Sergey Kreys (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.1

Review in progress for https://review.opencontrail.org/48499
Submitter: Sergey Kreys (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/47568
Committed: http://github.com/Juniper/contrail-controller/commit/29b8c08f328281dce89fe2fd009920f907bcb3e2
Submitter: Zuul (<email address hidden>)
Branch: R3.2

commit 29b8c08f328281dce89fe2fd009920f907bcb3e2
Author: Sergey Kreys <email address hidden>
Date: Mon Dec 18 13:47:51 2017 +0300

Fix to avoid contrail-cassandra-status zombie proc

Proposed fix: use "subprocess.call()" instead of "Popen()" for
"contrail-cassandra-status". Use it with "shell=True" - to avoid
zombies, and use "&" at the end - to run in non-blocking way.
And also do this for "contrail-cassandra-repair" as it has same problem.

Change-Id: Ibefde45932613bb2f600a049037b483a2d7b33a8
Closes-bug: 1738757

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/48499
Committed: http://github.com/Juniper/contrail-controller/commit/a1419a689e9690a02daf5587207e2c8647bd7d91
Submitter: Zuul (<email address hidden>)
Branch: R4.1

commit a1419a689e9690a02daf5587207e2c8647bd7d91
Author: Sergey Kreys <email address hidden>
Date: Mon Dec 18 13:47:51 2017 +0300

Fix to avoid contrail-cassandra-status zombie proc

Proposed fix: use "subprocess.call()" instead of "Popen()" for
"contrail-cassandra-status". Use it with "shell=True" - to avoid
zombies, and use "&" at the end - to run in non-blocking way.
And also do this for "contrail-cassandra-repair" as it has same problem.

Change-Id: Ibefde45932613bb2f600a049037b483a2d7b33a8
Closes-bug: 1738757

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.