Bug 1779491

Summary: dns-node-resolver sometimes exits with status 255 on upgrade
Product: OpenShift Container Platform Reporter: Clayton Coleman <ccoleman>
Component: NetworkingAssignee: Dan Mace <dmace>
Networking sub component: DNS QA Contact: Hongan Li <hongli>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: aos-bugs, dmace, hongli
Version: 4.3.0   
Target Milestone: ---   
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1779490 Environment:
Last Closed: 2020-01-23 11:17:46 UTC 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: 1779490    
Bug Blocks:    

Description Clayton Coleman 2019-12-04 04:47:58 UTC
+++ This bug was initially created as a clone of Bug #1779490 +++

Dec 04 01:43:12.495 E ns/openshift-dns pod/dns-default-954mg node/ip-10-0-133-153.ec2.internal container=dns-node-resolver container exited with code 255 (Error): kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]\n

shows up fairly frequently in our upgrade logs.  This is caused when all the child pids exit before the trap command completes, causing kill to get no arguments.

The fix is fairly standard in similar scripts - use pipe to xargs -r kill to tolerate empty.

Comment 2 Hongan Li 2019-12-09 08:25:43 UTC
verified with 4.3.0-0.nightly-2019-12-08-215349 (fresh installed and upgraded) and issue has been fixed.

$ oc -n openshift-dns get pod dns-default-7s2nr -o yaml | grep trap
      trap 'jobs -p | xargs kill || true; wait; exit 0' TERM

Comment 4 errata-xmlrpc 2020-01-23 11:17:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:0062