Bug 2093444 - ManagementState reconciliation breaks SR
Summary: ManagementState reconciliation breaks SR
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Special Resource Operator
Version: 4.11
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 4.10.z
Assignee: Brett Thurber
QA Contact: Constantin Vultur
URL:
Whiteboard:
Depends On: 2093445
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-03 17:48 UTC by Brett Thurber
Modified: 2022-06-28 11:50 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2093445 (view as bug list)
Environment:
Last Closed: 2022-06-28 11:50:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift special-resource-operator pull 221 0 None open Fix filtering for management state 2022-06-03 17:49:19 UTC
Red Hat Product Errata RHBA-2022:5172 0 None None None 2022-06-28 11:50:45 UTC

Description Brett Thurber 2022-06-03 17:48:33 UTC
Description of problem:
Per Veritas:
we are facing issue in deploying InfoScale using SRO.
SRO with these changes does not reconcile the infoscale-vtas SR as we do not specify "ManagementState" to SR spec and thus in create function of predicate, func isSpecialResourceUnmanaged() returns false always which prevents creation of resources/helm chart.
func isSpecialResourceUnmanaged(obj client.Object) bool {
	sr, ok := obj.(*v1beta1.SpecialResource)
	if !ok {
		return false
	}
	return sr.Spec.ManagementState == operatorv1.Unmanaged
}
CreateFunc: func(e event.CreateEvent) bool {
obj := e.Object
			if IsSpecialResource(obj) {
-				return true
+				return isSpecialResourceUnmanaged(obj)
			}
We anticipate code should return true if isSpecialResourceUnmanaged(obj)=false
This change needs to be fixed for successful creation of SR resources.


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

How reproducible:
Every time

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 4 Constantin Vultur 2022-06-17 06:57:51 UTC
Related to 2097263

Verification passed for this one also.
Marking as Verified

Comment 7 errata-xmlrpc 2022-06-28 11:50:26 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


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