-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
4.17
-
None
-
Important
-
None
-
CNF Network Sprint 259, CNF Network Sprint 260
-
2
-
False
-
-
-
Bug Fix
-
Proposed
-
Description of problem:
SriovNetwork annotations get removed if the SriovNetwork is created before the operator acquired the lease.
Version-Release number of selected component (if applicable):
sriov-network-operator.v4.17.0-202408271906
How reproducible:
100%
Steps to Reproduce:
1. Remove any existing SriovNetworks and SriovNetworkNodePolicy 2. Restart the sriov operator so that it waits to aquire the lease: oc -n openshift-sriov-network-operator edit csv sriov-network-operator.v4.17.0-202408271906 # set sriov-network-operator replicas to 0 oc -n openshift-sriov-network-operator edit csv sriov-network-operator.v4.17.0-202408271906 # set sriov-network-operator replicas to 1 3. Check the operator logs and make sure it's waiting to acquire the lease oc -n openshift-sriov-network-operator logs deploy/sriov-network-operator -f 2024-09-06T12:48:43.248620961Z INFO host/manager.go:55 infiniband.New(): ib guid config doesn't exist, continuing without it {"config path": "/etc/sriov-operator/infiniband/guids"} 2024-09-06T12:48:43.249417226Z INFO setup runtime/asm_amd64.s:1695 starting leader election manager 2024-09-06T12:48:43.249577433Z INFO manager/runnable_group.go:223 starting server {"kind": "health probe", "addr": "[::]:8081"} I0906 12:48:43.249688 1 leaderelection.go:250] attempting to acquire leader lease openshift-sriov-network-operator/a56def2a.openshift.io... 4. Before the operator acquires the lease create an SriovNetwork and policy, e.g. --- apiVersion: sriovnetwork.openshift.io/v1 kind: SriovNetwork metadata: annotations: test: test name: sriov-nw-du-fh namespace: openshift-sriov-network-operator spec: logLevel: info networkNamespace: openshift-sriov-network-operator resourceName: du_fh vlan: 140 --- apiVersion: sriovnetwork.openshift.io/v1 kind: SriovNetworkNodePolicy metadata: name: sriov-nnp-du-fh namespace: openshift-sriov-network-operator spec: deviceType: vfio-pci isRdma: false nicSelector: pfNames: - ens2f0#16-31 nodeSelector: node-role.kubernetes.io/master: "" numVfs: 48 priority: 10 resourceName: du_fh 5. Check created SriovNetwork: oc -n openshift-sriov-network-operator get sriovnetwork -o yaml apiVersion: v1 items: - apiVersion: sriovnetwork.openshift.io/v1 kind: SriovNetwork metadata: annotations: kubectl.kubernetes.io/last-applied-configuration: | {"apiVersion":"sriovnetwork.openshift.io/v1","kind":"SriovNetwork","metadata":{"annotations":{"test":"test"},"name":"sriov-nw-du-fh","namespace":"openshift-sriov-network-operator"},"spec":{"logLevel":"info","networkNamespace":"openshift-sriov-network-operator","resourceName":"du_fh","vlan":140}} test: test creationTimestamp: "2024-09-06T12:48:53Z" generation: 1 name: sriov-nw-du-fh namespace: openshift-sriov-network-operator resourceVersion: "915936" uid: 15b1b325-27e7-4621-9db4-3edb5600b505 spec: logLevel: info networkNamespace: openshift-sriov-network-operator resourceName: du_fh vlan: 140 kind: List metadata: resourceVersion: "" 6. Wait until the operator acquires the lease: oc -n openshift-sriov-network-operator logs deploy/sriov-network-operator -f 2024-09-06T12:48:43.248620961Z INFO host/manager.go:55 infiniband.New(): ib guid config doesn't exist, continuing without it {"config path": "/etc/sriov-operator/infiniband/guids"} 2024-09-06T12:48:43.249417226Z INFO setup runtime/asm_amd64.s:1695 starting leader election manager 2024-09-06T12:48:43.249577433Z INFO manager/runnable_group.go:223 starting server {"kind": "health probe", "addr": "[::]:8081"} I0906 12:48:43.249688 1 leaderelection.go:250] attempting to acquire leader lease openshift-sriov-network-operator/a56def2a.openshift.io... I0906 12:54:29.705028 1 leaderelection.go:260] successfully acquired lease openshift-sriov-network-operator/a56def2a.openshift.io 2024-09-06T12:54:29.705246795Z INFO setup runtime/proc.go:271 acquired lease 2024-09-06T12:54:29.705388733Z INFO setup runtime/asm_amd64.s:1695 starting namespaced manager 7. Check again the SriovNetwork: oc -n openshift-sriov-network-operator get sriovnetwork -o yaml apiVersion: v1 items: - apiVersion: sriovnetwork.openshift.io/v1 kind: SriovNetwork metadata: annotations: operator.sriovnetwork.openshift.io/last-network-namespace: openshift-sriov-network-operator creationTimestamp: "2024-09-06T12:48:53Z" finalizers: - netattdef.finalizers.sriovnetwork.openshift.io generation: 1 name: sriov-nw-du-fh namespace: openshift-sriov-network-operator resourceVersion: "916880" uid: 15b1b325-27e7-4621-9db4-3edb5600b505 spec: logLevel: info networkNamespace: openshift-sriov-network-operator resourceName: du_fh vlan: 140
Actual results:
We can notice the `test: test` annotation got removed.
Expected results:
`test: test` annotation does not get removed after its creation.
Additional info:
- blocks
-
OCPBUGS-42252 [4.17] SriovNetwork annotations get removed if the SriovNetwork is created before the operator acquired the lease
- Closed
- is cloned by
-
OCPBUGS-42252 [4.17] SriovNetwork annotations get removed if the SriovNetwork is created before the operator acquired the lease
- Closed
- links to
-
RHEA-2024:6121 OpenShift Container Platform 4.18.z extras update