Bug 1598090 - pod error json: cannot unmarshal array into Go value of type types.ContainerJSON
Summary: pod error json: cannot unmarshal array into Go value of type types.ContainerJSON
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 3.7.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.7.z
Assignee: Joel Smith
QA Contact: weiwei jiang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-04 10:19 UTC by mmariyan
Modified: 2018-10-08 18:10 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-29 11:39:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description mmariyan 2018-07-04 10:19:34 UTC
Description of problem:

Pods are stuck in terminating state, pod logs show the one line error
  "json: cannot unmarshal array into Go value of type types.ContainerJSON"

~~~
#oc logs <podname>
json: cannot unmarshal array into Go value of type types.ContainerJSON
~~~

#oc delete pod podname-44-build --grace-period=0 --force 

The above command says deleted but pod still exists in the Terminating state.


Version-Release number of selected component (if applicable):

 OCP v3.7.52


Actual results:
Not able to delete the pod

Expected results:

Should get delete the pod

Additional info:

Comment 6 weiwei jiang 2018-07-30 08:17:21 UTC
Checked on 
# oc version 
oc v3.7.60
kubernetes v1.7.6+a08f5eeb62
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://ip-172-18-9-51.ec2.internal:8443
openshift v3.7.60
kubernetes v1.7.6+a08f5eeb62

Now the message from oc logs for terminating pods is:

# oc logs -f httpd-example-1-vw576
Error: No such container: 41627b7750be4a50b96afa93f29143747812598ffe470d59a4f36cbf1764775d

But I expect the following message:
container 41627b7750be4a50b96afa93f29143747812598ffe470d59a4f36cbf1764775d in pod httpd-example-1-vw576 is terminated

Comment 7 Joel Smith 2018-08-03 14:45:01 UTC
The error message that you got is appropriate in some cases.

You should only expect to see the "container ... in pod ... is terminated" message when the pod was trying to start a new container while terminating, but hadn't made it far enough along to get a container ID for the new container.

In cases where the container ID is known, we try to fetch its logs from the runtime (i.e. Docker) and if it has completely removed the container, we'd expect an error like the one you got.

In my opinion, the new behavior observed is acceptable and should not be considered a bug.

Comment 9 weiwei jiang 2018-08-07 02:13:10 UTC
Move to verified according to https://bugzilla.redhat.com/show_bug.cgi?id=1598090#c7

Comment 13 errata-xmlrpc 2018-08-29 11:39:55 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-2018:2547


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