Bug 2056464 - nmstate-webhook pods getting scheduled on the same node
Summary: nmstate-webhook pods getting scheduled on the same node
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Networking
Version: 4.9.2
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
: 4.10.1
Assignee: Quique Llorente
QA Contact: Adi Zavalkovsky
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-21 10:12 UTC by nijin ashok
Modified: 2022-05-18 20:27 UTC (History)
5 users (show)

Fixed In Version: kubernetes-nmstate-handler v4.10.1-3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-18 20:27:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:4668 0 None None None 2022-05-18 20:27:23 UTC

Description nijin ashok 2022-02-21 10:12:59 UTC
Description of problem:

The nmstate-webhook by default is configured with 2 replicas. However, it doesn't have podAntiAffinity configured and the two replicas may get scheduled on the same master node. So if this node goes down, we lose both replicas.  

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

version: v4.9.2

How reproducible:

100%

Steps to Reproduce:


Actual results:

nmstate-webhook pods may get scheduled on the same node.

Expected results:

Configure podAntiAffinity on nmstate-webhook so that it will not be scheduled on the same node.

Additional info:

Comment 1 Quique Llorente 2022-03-17 13:55:20 UTC
The u/s fix https://github.com/nmstate/kubernetes-nmstate/pull/1012

Comment 3 Adi Zavalkovsky 2022-04-06 13:32:08 UTC
Verified.
OCP Version 4.10.8
kubernetes-nmstate-handler	v4.10.1-3

nmstate-webhook deployment has topologySpreadConstarints, preventing from pods deploying on the same node.


oc get deployment -n openshift-cnv nmstate-webhook -o yaml
...
      topologySpreadConstraints:
      - labelSelector:
          matchLabels:
            component: kubernetes-nmstate-webhook
        maxSkew: 1
        topologyKey: kubernetes.io/hostname
        whenUnsatisfiable: DoNotSchedule

Comment 9 errata-xmlrpc 2022-05-18 20:27:03 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 Virtualization 4.10.1 Images security and bug fix 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:4668


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