Bug 2075491 - nmstate operator cannot be upgraded on SNO
Summary: nmstate operator cannot be upgraded on SNO
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.10
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: 4.11.0
Assignee: Christoph Stäbler
QA Contact: Aleksandra Malykhin
URL:
Whiteboard:
Depends On:
Blocks: 2103586
TreeView+ depends on / blocked
 
Reported: 2022-04-14 11:20 UTC by Petr Horáček
Modified: 2022-08-10 11:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: PodDisruptionBudget specification did not fit for SNO clusters. Consequence: SNO clusters could not be upgraded because not all pods could be evicted due to PDB definitions. Fix: Adjust PDB specification depending on cluster topology (e.g. in case of SNO) Result: kubernetes-nmstate operator can be upgraded on SNO clusters.
Clone Of:
: 2103586 (view as bug list)
Environment:
Last Closed: 2022-08-10 11:07:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:07:24 UTC

Description Petr Horáček 2022-04-14 11:20:48 UTC
Description of problem:
The standalone knmstate operator creates a PodDistruptionBudget with hardcoded minimal number of replicas set to 1. Due to that, it may not be able to perform upgrade on single-node-openshift clusters.

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


How reproducible:
I did not get a chance to reproduce it, I just base it on missing code


Steps to Reproduce:
1. Install nmstate on SNO
2. Attempt to upgrade it

Actual results:
Upgrade is blocked due to the PDB. The minimum number of replicas is hardcoded here: https://github.com/nmstate/kubernetes-nmstate/blob/main/controllers/operator/nmstate_controller.go#L194


Expected results:
The minimal number of replicase should be dynamic and set to 0 on SNO. Similar to what was done in CNV's operator: https://github.com/kubevirt/cluster-network-addons-operator/blob/release-0.65/pkg/network/nmstate.go#L180


Additional info:
This is a regression compared to the CNV operator

Comment 4 Petr Horáček 2022-05-26 11:46:53 UTC
Before https://github.com/openshift/kubernetes-nmstate/pull/272/commits/da39a4d738c41b486f52d47b41dce9d2860f537c, KNO always deployed 2 instances of the webhook, even on SNO. That means that the upgrade issue was never present.

The actual bug that this should track should be "nmstate deploys two instances of webhook even on a single-node cluster". That issue has been fixed by Christoph's PR.

Apologies for misleading.

Comment 5 Aleksandra Malykhin 2022-05-26 12:51:48 UTC
Double checked. There are no problems with operator update from older 4.11 version to the latest with 1 webhook pod instance.

Comment 7 errata-xmlrpc 2022-08-10 11:07:06 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.11.0 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-2022:5069


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