Bug 2256580

Summary: PVC label selector should not recommend labels that don't work, they should be filtered
Product: [Red Hat Storage] Red Hat OpenShift Data Foundation Reporter: gowtham <gshanmug>
Component: management-consoleAssignee: gowtham <gshanmug>
Status: CLOSED ERRATA QA Contact: avdhoot <asagare>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.15CC: gshanmug, hnallurv, kgoldbla, muagarwa, nsoffer, nthomas, odf-bz-bot, skatiyar, srangana, tdesala
Target Milestone: ---   
Target Release: ODF 4.15.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.15.0-104 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: 2253497
: 2272439 (view as bug list) Environment:
Last Closed: 2024-03-19 15:30:25 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: 2253497    
Bug Blocks: 2272439    

Description gowtham 2024-01-03 08:28:41 UTC
+++ This bug was initially created as a clone of Bug #2253497 +++

Description of problem (please be detailed as possible and provide log
snippests):
Applying DR Policy to app set application, the system is suggesting a label that cannot work, it should be filtered out. Only labels with appname= should be recommended

Version of all relevant components (if applicable):


Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?


Is there any workaround available to the best of your knowledge?
Creating your github resource with a short label e.g. appname=kubevirt

Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?
2

Can this issue reproducible?
yes

Can this issue reproduce from the UI?
yes

If this is a regression, please provide more details to justify this:


Steps to Reproduce:
1. Create an app set application from here: https://github.com/kgoldbla/ocm-kubevirt-samples/blob/vm9-application/vm-standalone-pvc-odr-regional/pvc.yaml
2. selected the app:kebernetes/instance-app-set-vm-standalone-dv-odr-regional option
3. Relocating will not work with this.
4. Only the appname=<label> should be recommended
5. ...instance-of= should not be used


Actual results:
...instance-of= was recommended as an option and won't work for dr

Expected results:
On appname= should be recommended

Additional info:
See attached screenshots

--- Additional comment from RHEL Program Management on 2023-12-07 17:11:10 UTC ---

This bug having no release flag set previously, is now set with release flag 'odf‑4.15.0' to '?', and so is being proposed to be fixed at the ODF 4.15.0 release. Note that the 3 Acks (pm_ack, devel_ack, qa_ack), if any previously set while release flag was missing, have now been reset since the Acks are to be set against a release flag.

--- Additional comment from gowtham on 2023-12-15 10:30:13 UTC ---

if only appname=<label> label is required then why do we even need UI for selecting labels? Is backend can't add it by default?

--- Additional comment from Shyamsundar on 2023-12-15 12:34:40 UTC ---

(In reply to gowtham from comment #2)
> if only appname=<label> label is required then why do we even need UI for
> selecting labels? Is backend can't add it by default?

The initial report in the BZ suggests this. In practice a deployed workload may choose ANY label to group/identify their PVCs. We cannot only provide appName label as the choice here.

The problem was that we displayed and allowed the selection of a well known bad label that is auto generate (i.e the "instance" label). I would "fix" this by removing that label and any others that we deem are such bad examples from [1] from the list that we display and not restrict it to just the appName label.

[1] https://kubernetes.io/docs/reference/labels-annotations-taints/#labels-annotations-and-taints-used-on-api-objects

Comment 6 avdhoot 2024-01-25 09:56:28 UTC
Deployed cnv workload on latest odf build and not seen app:kebernetes/instance-app-set-vm-standalone-dv-odr-regiona labe option.

Versions:
ODF-4.15.0-125 
OCP 4.15

Please find attcahed screenshot of latest label selection.

hence Marking it as verified.

Comment 9 errata-xmlrpc 2024-03-19 15:30:25 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: Red Hat OpenShift Data Foundation 4.15.0 security, enhancement, & 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/RHSA-2024:1383

Comment 10 Red Hat Bugzilla 2024-07-31 04:25:07 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days