Bug 1880333 - [release 4.5] machine-config-operator: Fix bug in reflector not recovering from "Too large resource version" [NEEDINFO]
Summary: [release 4.5] machine-config-operator: Fix bug in reflector not recovering fr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Machine Config Operator
Version: 4.5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.5.z
Assignee: Kirsten Garrison
QA Contact: Michael Nguyen
URL:
Whiteboard:
Depends On: 1880369
Blocks: 1879901
TreeView+ depends on / blocked
 
Reported: 2020-09-18 10:07 UTC by Lukasz Szaszkiewicz
Modified: 2021-02-09 13:34 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-09 13:34:10 UTC
Target Upstream Version:
kgarriso: needinfo?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift machine-config-operator pull 2354 0 None closed [release-4.5] Bug 1880333: bump k8s.io/client-go to 0.18.6 2021-02-07 15:59:57 UTC
Red Hat Product Errata RHSA-2021:0313 0 None None None 2021-02-09 13:34:34 UTC

Description Lukasz Szaszkiewicz 2020-09-18 10:07:07 UTC
A recent fix in the reflector/informer https://github.com/kubernetes/kubernetes/pull/92688 prevents components/operators from entering a hotloop and stuck.

There are already reported cases that have run into that issue and were stuck for hours or even days. For example https://bugzilla.redhat.com/show_bug.cgi?id=1877346.

The root cause of the issue is the fact that a watch cache is initialized from the global revision (etcd) and might stay on it for an undefined period (if no changes were (add, modify) made). 
That means that the watch cache across server instances may be out of sync. 
That might lead to a situation in which a client gets a resource version from a server that has observed a newer rv, disconnect (due to a network error) from it, and reconnect to a server that is behind, resulting in “Too large resource version“ errors.

More details in https://github.com/kubernetes/kubernetes/issues/91073 and https://github.com/kubernetes/enhancements/tree/master/keps/sig-api-machinery/1904-efficient-watch-resumption


It looks like the issue only affects 1.18. According to https://github.com/kubernetes/kubernetes/issues/91073#issuecomment-652251669 the issue was first introduced in that version by changes done to the reflector. 
The fix is already present in 1.19.


Please make sure that machine-config-operator is using a client-go that includes https://github.com/kubernetes/kubernetes/pull/92688 if not please use this BZ and file a PR.
In case you are using a framework to build your operator make sure it uses the right version of the client-go library.

Comment 2 Lukasz Szaszkiewicz 2020-12-04 11:49:40 UTC
any update? what's the current status?

Comment 3 Kirsten Garrison 2020-12-04 21:48:38 UTC
I'll look into this in the next sprint.

Comment 4 Lukasz Szaszkiewicz 2021-01-15 10:14:14 UTC
Hi, do we have any update on that? Is someone working on it?

Comment 6 Lukasz Szaszkiewicz 2021-01-18 08:23:32 UTC
Hi,

You need to update client-go library, the minimum version is 1.18.6.
Let me know once you have a PR. I can review it. Thanks.

Comment 9 Michael Nguyen 2021-02-04 16:30:32 UTC
Verified on registry.ci.openshift.org/ocp/release:4.5.0-0.nightly-2021-02-04-091104 by checking that the commit contains the k8s.io/client-go to 0.18.6 bump
Name:        quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:5e5fb6e221abf5d92f927f7d03b09921cf2567244b3880700960afd95b362dff
Media Type:  application/vnd.docker.distribution.manifest.v2+json
Created:     1d ago
Image Size:  144.5MB in 5 layers
Layers:      76.42MB sha256:eae19a56e9c600eb0a59816d9d0ad7065824a34a13be60469084304fc7170334
             1.811kB sha256:be73321c79565b4e2fdf9f55ba6333e5d50a1bcf583db3b41be45a9be7d82431
             4.28MB  sha256:c06d2750af3cc462e5f8e34eccb0fdd350b28d8cd3b72b86bbf4d28e4a40e6ea
             9.609MB sha256:457122c845c27bd616c9f80748f1fa19f3d69783957448b3eca30cea7ed9a0a0
             54.23MB sha256:f449e60719bbee9515266e93c2b145011916784268a6e11f1f30cd22defe6c1e
OS:          linux
Arch:        amd64
Entrypoint:  /usr/bin/machine-config-operator
User:        0
Environment: __doozer=merge
             BUILD_RELEASE=202102031005.p0
             BUILD_VERSION=v4.5.0
             OS_GIT_MAJOR=4
             OS_GIT_MINOR=5
             OS_GIT_PATCH=0
             OS_GIT_TREE_STATE=clean
             OS_GIT_VERSION=4.5.0-202102031005.p0-fb06373
             SOURCE_GIT_TREE_STATE=clean
             OS_GIT_COMMIT=fb06373
             SOURCE_DATE_EPOCH=1611794431
             SOURCE_GIT_COMMIT=fb06373b84578ddf16fe4848bd58fc6dd99af461
             SOURCE_GIT_TAG=machine-config-daemon-4.5.0-202006231303.p0-69-gfb06373b
             SOURCE_GIT_URL=https://github.com/openshift/machine-config-operator
             PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
             container=oci
Labels:      License=GPLv2+
             architecture=x86_64
             build-date=2021-02-03T11:45:48.108920
             com.redhat.build-host=cpt-1008.osbs.prod.upshift.rdu2.redhat.com
             com.redhat.component=ose-machine-config-operator-container
             com.redhat.license_terms=https://www.redhat.com/agreements
             description=This is the base image from which all OpenShift Container Platform images inherit.
             distribution-scope=public
             io.k8s.description=This is the base image from which all OpenShift Container Platform images inherit.
             io.k8s.display-name=OpenShift Container Platform RHEL 7 Base
             io.openshift.build.commit.id=fb06373b84578ddf16fe4848bd58fc6dd99af461
             io.openshift.build.commit.url=https://github.com/openshift/machine-config-operator/commit/fb06373b84578ddf16fe4848bd58fc6dd99af461
             io.openshift.build.source-location=https://github.com/openshift/machine-config-operator
             io.openshift.maintainer.component=Machine Config Operator
             io.openshift.maintainer.product=OpenShift Container Platform
             io.openshift.release.operator=true
             io.openshift.tags=openshift,base
             name=openshift/ose-machine-config-operator
             release=202102031005.p0
             summary=Provides the latest release of the Red Hat Universal Base Image 7.
             url=https://access.redhat.com/containers/#/registry.access.redhat.com/openshift/ose-machine-config-operator/images/v4.5.0-202102031005.p0
             vcs-ref=593ad7e4f5a2d8a6e3d9c59eb1cff742af104dba
             vcs-type=git
             vendor=Red Hat, Inc.
             version=v4.5.0

Comment 11 errata-xmlrpc 2021-02-09 13:34:10 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 (Important: OpenShift Container Platform 4.5.31 bug fix and security update), 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/RHSA-2021:0313


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