Bug 1777038 - Cluster scaled beyond host subnet limits does not fire alert or cleanly report why it cannot scale
Summary: Cluster scaled beyond host subnet limits does not fire alert or cleanly repor...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.7.0
Assignee: Ben Bennett
QA Contact: Mike Fiedler
URL:
Whiteboard: SDN-CI-IMPACT
Depends On:
Blocks: 1777040 1780611
TreeView+ depends on / blocked
 
Reported: 2019-11-26 19:41 UTC by Clayton Coleman
Modified: 2023-10-06 18:49 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1777040 (view as bug list)
Environment:
Last Closed: 2021-02-24 15:10:48 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-network-operator pull 889 0 None closed Bug 1777038: Add alerting rules for subnet allocations 2021-01-05 15:03:56 UTC
Github ovn-org ovn-kubernetes pull 1861 0 None closed metrics: Add metrics for total and available subnets for nodes 2021-01-05 15:03:59 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:11:52 UTC

Description Clayton Coleman 2019-11-26 19:41:48 UTC
When openshift-sdn is configured with a hostPrefix: 23 there can be 512 machines.  If the cluster is scaled beyond this the sdn pods crash loop with

I1126 19:36:56.745779    9085 node.go:385] Starting openshift-sdn network plugin
W1126 19:36:56.748191    9085 subnets.go:159] Could not find an allocated subnet for node: ip-10-0-134-38.ec2.internal, Waiting...
W1126 19:36:57.750734    9085 subnets.go:159] Could not find an allocated subnet for node: ip-10-0-134-38.ec2.internal, Waiting...
W1126 19:36:59.253661    9085 subnets.go:159] Could not find an allocated subnet for node: ip-10-0-134-38.ec2.internal, Waiting...
W1126 19:37:01.506704    9085 subnets.go:159] Could not find an allocated subnet for node: ip-10-0-134-38.ec2.internal, Waiting...
W1126 19:37:04.884562    9085 subnets.go:159] Could not find an allocated subnet for node: ip-10-0-134-38.ec2.internal, Waiting...
W1126 19:37:09.949598    9085 subnets.go:159] Could not find an allocated subnet for node: ip-10-0-134-38.ec2.internal, Waiting...
W1126 19:37:17.545562    9085 subnets.go:159] Could not find an allocated subnet for node: ip-10-0-134-38.ec2.internal, Waiting...
W1126 19:37:28.938639    9085 subnets.go:159] Could not find an allocated subnet for node: ip-10-0-134-38.ec2.internal, Waiting...
W1126 19:37:46.027031    9085 subnets.go:159] Could not find an allocated subnet for node: ip-10-0-134-38.ec2.internal, Waiting...
W1126 19:38:11.659115    9085 subnets.go:159] Could not find an allocated subnet for node: ip-10-0-134-38.ec2.internal, Waiting...
W1126 19:38:50.105344    9085 subnets.go:159] Could not find an allocated subnet for node: ip-10-0-134-38.ec2.internal, Waiting...
F1126 19:38:50.105373    9085 cmd.go:111] Failed to start sdn: failed to get subnet for this host: ip-10-0-134-38.ec2.internal, error: timed out waiting for the condition

but no alert or other top level signal is raised to the admin "you need to provision more nodes".

Both openshift-sdn and ovn-kube need to report a metric which is "remaining capacity" and then have alerts when the threshold is crossed.

Nodes report not ready due to "CNI default network not found" which is a terrible error and multus needs to improve communication of failures.

Comment 10 zhaozhanqi 2020-12-18 08:41:47 UTC
Aniket hi, I saw the fixed PR is only OVN side. no need for sdn ?

Comment 13 Mike Fiedler 2021-01-05 20:39:22 UTC
Verified the V4 version of the metrics and alerts on 4.7.0-0.nightly-2021-01-05-055003 on an OVN cluster on AWS

available subnet metric correct for hostPrefix = 26|23|20
allocated subnet metric correct as number of machines increased and decreased 
alarms fired when 80% of the subnets were allocated
exceeding the allocatable number of subnets results in an alarm with 100% allocated and the surplus nodes are stuck NotReady with this reason:

Ready            False   Tue, 05 Jan 2021 20:34:18 +0000   Tue, 05 Jan 2021 20:33:07 +0000   KubeletNotReady              runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:Network plugin returns error: No CNI configuration file in /etc/kubernetes/
cni/net.d/. Has your network provider started?

Comment 15 errata-xmlrpc 2021-02-24 15:10:48 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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement 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-2020:5633


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