Tracking this kubernetes issue https://github.com/kubernetes/kubernetes/issues/25151
Fixes in https://github.com/openshift/ose/pull/215 https://github.com/openshift/origin/pull/8810
https://github.com/kubernetes/kubernetes/pull/25369 Could you give me some suggestions on how to verify this bug? Thanks.
The steps in https://github.com/kubernetes/kubernetes/issues/25151#issue-153080519 should be good... request a watch on a version that is too old, and ensure the 410 Gone error is returned as a watch error event, rather than as a HTTP 410 response. To make testing easier, set the watch cache size to something low for a particular resource type, and create enough of that resource type to exceed the cache size, then request resourceVersion=1
Test on openshift v3.2.1.1-1-g33fa4ea Steps to verfify: 1. enable watch-cache kubernetesMasterConfig: apiServerArguments: watch-cache: ["true"] watch-cache-sizes: ["builds#50","deploymentconfigs#50"] 2. watch a old resource by curl, should return a Gone 410 event. [root@dhcp-128-7 Desktop]# curl -k -vvv -H "Authorization: Bearer 82z8aFmWWHrzBH8-nwPPgRxs2sLepbw0re75hqaJgTs" "https://104.197.173.141:8443/oapi/v1/namespaces/dma/builds?watch=1&resourceVersion=1" * About to connect() to 104.197.173.141 port 8443 (#0) * Trying 104.197.173.141... connected * Connected to 104.197.173.141 (104.197.173.141) port 8443 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * warning: ignoring value of ssl.verifyhost * skipping SSL peer certificate verification * NSS: client certificate not found (nickname not specified) * SSL connection using TLS_RSA_WITH_AES_128_CBC_SHA * Server certificate: * subject: CN=10.240.0.29 * start date: Jun 12 03:16:37 2016 GMT * expire date: Jun 12 03:16:38 2018 GMT * common name: 10.240.0.29 * issuer: CN=openshift-signer@1465701391 > GET /oapi/v1/namespaces/dma/builds?watch=1&resourceVersion=1 HTTP/1.1 > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 > Host: 104.197.173.141:8443 > Accept: */* > Authorization: Bearer 82z8aFmWWHrzBH8-nwPPgRxs2sLepbw0re75hqaJgTs > < HTTP/1.1 200 OK < Cache-Control: no-store < Transfer-Encoding: chunked < Date: Sun, 12 Jun 2016 05:40:07 GMT < Content-Type: text/plain; charset=utf-8 < Transfer-Encoding: chunked < {"type":"ERROR","object":{"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"too old resource version: 1 (1046)","reason":"Gone","code":410}} * Connection #0 to host 104.197.173.141 left intact * Closing connection #0
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-2016:1343