Bug 2060032 - NNCP/NNCE stuck in Pending after network outage on baremetal cluster
Summary: NNCP/NNCE stuck in Pending after network outage on baremetal cluster
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Networking
Version: 4.9.10
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: 4.8.6
Assignee: Radim Hrazdil
QA Contact: Yossi Segev
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-02 14:46 UTC by Tom Bonds
Modified: 2025-08-08 12:39 UTC (History)
5 users (show)

Fixed In Version: kubernetes-nmstate-handler v4.8.6-4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-31 14:33:58 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github nmstate kubernetes-nmstate pull 1013 0 None Merged [release-0.52] Timeout if Pending takes too long (#854) 2022-03-18 15:35:25 UTC
Github nmstate kubernetes-nmstate pull 1027 0 None Merged [release-0.47] Timeout if Pending takes too long 2022-03-29 07:28:47 UTC
Red Hat Product Errata RHEA-2022:4843 0 None None None 2022-05-31 14:34:04 UTC

Description Tom Bonds 2022-03-02 14:46:35 UTC
Description of problem:

NNCE stuck in "Pending" state on all nodes after network outage. Change is partially applied across the nodes, nodes that are rebooted after network restored lose the bridge configuration.

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

4.9.17

How reproducible: Unknown


Steps to Reproduce:
1. Apply NodeNetworkConfigurationPolicy through nmstate
2. Network outage during/after change
3. 

Actual results:

~~~
NAME                                          STATUS
master0.ocp.example.org.br-bond0-policy   Pending
master1.ocp.example.org.br-bond0-policy   Pending
master2.ocp.example.org.br-bond0-policy   Pending
worker0.ocp.example.org.br-bond0-policy   Pending
worker1.ocp.example.org.br-bond0-policy   Pending
worker2.ocp.example.org.br-bond0-policy   Pending
~~~

Expected results:

~~~
NAME                                          STATUS
master0.ocp.example.org.br-bond0-policy   Available
master1.ocp.example.org.br-bond0-policy   Available
master2.ocp.example.org.br-bond0-policy   Available
worker0.ocp.example.org.br-bond0-policy   Available
worker1.ocp.example.org.br-bond0-policy   Available
worker2.ocp.example.org.br-bond0-policy   Available
~~~

Additional info:

 condition shows:

~~~
   - lastHearbeatTime: "2022-03-02T13:01:43Z"
      lastTransitionTime: "2022-03-02T13:01:43Z"
      message: Max unavailable node limit reached
      reason: MaxUnavailableLimitReached
      status: "True"
      type: Pending
~~~

  policy being applied:

~~~
metadata:
  name: br-bond0-policy
spec:
  nodeSelector:
    node-role.kubernetes.io/worker: ""
  desiredState:
    interfaces:
    - name: br-bond0
      description: linux-bridge with bond0
      type: linux-bridge
      state: up
      ipv4:
        dhcp: true
        enabled: true
      bridge:
        options:
          stp:
            enabled: false
        port:
        - name: bond0
~~~

Comment 1 Ben Nemec 2022-03-02 15:11:27 UTC
First, can you capture a must-gather so we have logs to see what is going on to cause this?

Also, does reapplying the NNCP after the outage workaround the problem (but please get the must-gather first if the policy is still in error)?

Comment 5 Tom Bonds 2022-03-02 15:54:13 UTC
Attempting to reapply the NNCP results in:

$ oc apply -f br-bond0.yaml 
Error from server (failed to admit NodeNetworkConfigurationPolicy br-bond0-policy: message: policy br-bond0-policy is still in progress. ): error when applying patch:
{"metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"nmstate.io/v1beta1\",\"kind\":\"NodeNetworkConfigurationPolicy\",\"metadata\":{\"annotations\":{},\"name\":\"br-bond0-policy\"},\"spec\":{\"desiredState\":{\"interfaces\":[{\"bridge\":{\"options\":{\"stp\":{\"enabled\":false}},\"port\":[{\"name\":\"bond0\"}]},\"description\":\"linux-bridge with bond0\",\"ipv4\":{\"dhcp\":true,\"enabled\":true},\"name\":\"br-bond0\",\"state\":\"up\",\"type\":\"linux-bridge\"}]},\"nodeSelector\":{\"node-role.kubernetes.io/worker\":\"\"}}}\n"}},"spec":{"desiredState":{"interfaces":[{"bridge":{"options":{"stp":{"enabled":false}},"port":[{"name":"bond0"}]},"description":"linux-bridge with bond0","ipv4":{"dhcp":true,"enabled":true},"name":"br-bond0","state":"up","type":"linux-bridge"}]}}}
to:
Resource: "nmstate.io/v1beta1, Resource=nodenetworkconfigurationpolicies", GroupVersionKind: "nmstate.io/v1beta1, Kind=NodeNetworkConfigurationPolicy"
Name: "br-bond0-policy", Namespace: ""
for: "br-bond0.yaml": admission webhook "nodenetworkconfigurationpolicies-progress-validate.nmstate.io" denied the request: failed to admit NodeNetworkConfigurationPolicy br-bond0-policy: message: policy br-bond0-policy is still in progress.

Will upload must-gather when complete.

Comment 9 Ben Nemec 2022-03-08 22:42:03 UTC
Moving to CNV since this is related to that version of the operator.

Comment 10 Petr Horáček 2022-03-10 13:42:08 UTC
Thanks for reporting this. We will triage it on our bug scrub next week.

Comment 11 Radim Hrazdil 2022-03-14 12:09:07 UTC
Hello Tom,

Thanks for uploading the must-gather. While analyzing the logs, could you try to delete the policy and create it again?
(Deleting the policy doesn't remove the configuration on nodes, where it was already applied)

That will get you pass the validation error, as progressing policies cannot be updated.

Comment 12 Radim Hrazdil 2022-03-18 15:50:53 UTC
Backported fix in https://github.com/nmstate/kubernetes-nmstate/pull/1013 
Now if enactments are blocked due to network outage, progress will unblock after a timeout of 10 minutes.

Comment 13 Petr Horáček 2022-03-29 08:21:14 UTC
All the upstream work is merged. We are now waiting for 4.8.6 errata to get created

Comment 14 Petr Horáček 2022-04-14 12:11:33 UTC
Errata was created. Pushing new M/S patch

Comment 15 Radim Hrazdil 2022-05-16 11:34:52 UTC
Correction to my previous comment:
> Now if enactments are blocked due to network outage, progress will unblock after a timeout of 10 minutes.

The timeout is 18 minutes

Comment 16 Yossi Segev 2022-05-16 14:15:44 UTC
Verified on a bare-metal cluster with
OCP 4.8.35
CNV 4.8.6 
nmstate-handler v4.8.6-6

Verified using the following scenario:
1. Applied the following policy:
apiVersion: nmstate.io/v1beta1
kind: NodeNetworkConfigurationPolicy
metadata:
  name: br1-eno3-nncp
spec:
  desiredState:
    interfaces:
    - bridge:
        options:
          stp:
            enabled: false
        port:
        - name: eno3
      ipv4:
        dhcp: false
        enabled: false
      ipv6:
        enabled: false
      name: br1-eno3
      state: up
      type: linux-bridge
  nodeSelector:
    node-role.kubernetes.io/worker: ""

2. Waited for the policy to be in Progressing status
cnv-qe-jenkins@cnv-qe-infra-01:~/yossi$ oc get nncp -w
NAME            STATUS
br1-eno3-nncp   
br1-eno3-nncp   ConfigurationProgressing
br1-eno3-nncp   ConfigurationProgressing

3. ssh'd to each of the worker nodes.

4. Simulated network outage, by shutting down the primary interface on each worker node, by running this shell script on each worker:
ip link show dev eno1
echo
sudo ip link set dev eno1 down
ip link show dev eno1
echo
sleep 120
sudo ip link set dev eno1 up

5. Verified that the ssh connectivity to all workers was lost.

6. After the outage timeout (120 seconds) was over, I verified that the connectivity was again possible to the nodes.

7. Followed the policy status, and saw that it continued from Progressing, until it completely succeeded.
br1-eno3-nncp   ConfigurationProgressing
br1-eno3-nncp   ConfigurationProgressing
br1-eno3-nncp   ConfigurationProgressing
br1-eno3-nncp   ConfigurationProgressing
br1-eno3-nncp   SuccessfullyConfigured
br1-eno3-nncp   SuccessfullyConfigured

8. Verified, on each worker, that the bridge (br1-eno3) was created successfully.
[core@cnv-qe-infra-33 yossi]$ nmcli c show
NAME              UUID                                  TYPE      DEVICE   
Wired Connection  e3018248-d4e3-4e0e-8946-7cf74e526b60  ethernet  eno1     
br1-eno3          73272c12-fd5a-47f3-ba1c-85eb41655380  bridge    br1-eno3 
eno3              19d51264-7d7d-4284-82e3-48e142f31ed9  ethernet  eno3     
Wired Connection  fcbd3574-c06a-4b25-b465-72e26c9836d9  ethernet  --       
[core@cnv-qe-infra-33 yossi]$ 
[core@cnv-qe-infra-33 yossi]$ 
[core@cnv-qe-infra-33 yossi]$ ip link show dev br1-eno3
151: br1-eno3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 78:ac:44:4b:3c:e2 brd ff:ff:ff:ff:ff:ff

Comment 23 errata-xmlrpc 2022-05-31 14:33:58 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 (OpenShift Virtualization 4.8.6 Images), 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/RHEA-2022:4843

Comment 24 Red Hat Bugzilla 2023-09-15 01:52:27 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 365 days


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