Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2083514

Summary: Operator ignores managementState Removed
Product: OpenShift Container Platform Reporter: Constantin Vultur <cvultur>
Component: Special Resource OperatorAssignee: Pablo Acevedo <pacevedo>
Status: CLOSED ERRATA QA Contact: Constantin Vultur <cvultur>
Severity: high Docs Contact:
Priority: high    
Version: 4.11CC: bthurber
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2094423 2097263 (view as bug list) Environment:
Last Closed: 2022-08-10 11:11:01 UTC Type: Bug
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:    
Bug Blocks: 2094423, 2097263    

Description Constantin Vultur 2022-05-10 09:40:23 UTC
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 6 errata-xmlrpc 2022-08-10 11:11:01 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