Bug 2097263

Summary: Operator ignores managementState Removed
Product: OpenShift Container Platform Reporter: Pablo Acevedo <pacevedo>
Component: Special Resource OperatorAssignee: Brett Thurber <bthurber>
Status: CLOSED ERRATA QA Contact: Udi Kalifon <ukalifon>
Severity: high Docs Contact:
Priority: high    
Version: 4.10CC: bthurber, cvultur
Target Milestone: ---   
Target Release: 4.10.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2083514 Environment:
Last Closed: 2022-06-28 11:51:12 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2083514    
Bug Blocks:    

Description Pablo Acevedo 2022-06-15 10:08:32 UTC
+++ This bug was initially created as a clone of Bug #2083514 +++

Description of problem:
Setting the managementState to Removed on a SpecialResource does not remove the pods

Version-Release number of selected component (if applicable):
master/release-4.11

How reproducible:


Steps to Reproduce:
1. Install SRO from bundle
2. Install simple-kmod
3. patch managementState

Actual results:
Removed state not applied on the running pods


# oc get sr/simple-kmod-second -o json | grep management
# oc patch sr/simple-kmod-second -p '{"spec":{"managementState": "Removed"}}' --type merge -n simple-kmod-second
specialresource.sro.openshift.io/simple-kmod-second patched
# oc get sr/simple-kmod-second -o json | grep management
        "managementState": "Removed",
# oc get sr
NAME                 READY   PROGRESSING   ERRORED
simple-kmod          False   False         True
simple-kmod-second   True    False         False
# oc get pods -n simple-kmod-second
NAME                                                         READY   STATUS    RESTARTS   AGE
simple-kmod-second-driver-container-e383247e62b56585-548rj   1/1     Running   0          7d14h
simple-kmod-second-driver-container-e383247e62b56585-v56l4   1/1     Running   0          7d14h
# oc get pods -n simple-kmod-second
NAME                                                         READY   STATUS    RESTARTS   AGE
simple-kmod-second-driver-container-e383247e62b56585-548rj   1/1     Running   0          7d14h
simple-kmod-second-driver-container-e383247e62b56585-v56l4   1/1     Running   0          7d14h
# oc get pods -n simple-kmod-second
NAME                                                         READY   STATUS    RESTARTS   AGE
simple-kmod-second-driver-container-e383247e62b56585-548rj   1/1     Running   0          7d16h
simple-kmod-second-driver-container-e383247e62b56585-v56l4   1/1     Running   0          7d16h
# 

Expected results:
Pods to be removed

Additional info:

Comment 4 Udi Kalifon 2022-06-24 09:10:34 UTC
Verified with a bundle build from the release-4.10 branch

Comment 6 errata-xmlrpc 2022-06-28 11:51:12 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 Container Platform 4.10.20 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/RHBA-2022:5172