Bug 2272439

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: Aman Agrawal <amagrawa>
Component: management-consoleAssignee: gowtham <gshanmug>
Status: CLOSED NOTABUG QA Contact: Prasad Desala <tdesala>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.15CC: asagare, gshanmug, hnallurv, kgoldbla, muagarwa, nsoffer, nthomas, odf-bz-bot, skatiyar, srangana, tdesala
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2256580 Environment:
Last Closed: 2024-04-02 18:46:03 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, 2256580    
Bug Blocks:    

Description Aman Agrawal 2024-04-01 07:12:44 UTC
Creating this clone to track the same change/fix required for subscription based workloads.


+++ This bug was initially created as a clone of Bug #2256580 +++

+++ 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 subscription 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

--- Additional comment from RHEL Program Management on 2024-01-03 13:58:56 IST ---

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 RHEL Program Management on 2024-01-03 18:46:30 IST ---

This BZ is being approved for ODF 4.15.0 release, upon receipt of the 3 ACKs (PM,Devel,QA) for the release flag 'odf‑4.15.0

--- Additional comment from RHEL Program Management on 2024-01-03 18:46:30 IST ---

Since this bug has been approved for ODF 4.15.0 release, through release flag 'odf-4.15.0+', the Target Release is being set to 'ODF 4.15.0

--- Additional comment from errata-xmlrpc on 2024-01-04 09:42:13 IST ---

This bug has been added to advisory RHBA-2023:118688 by ceph-build service account (ceph-build.COM)

--- Additional comment from Sunil Kumar Acharya on 2024-01-11 13:53:21 IST ---

Please update the requires_doc_text(RDT) flag/text appropriately.

--- Additional comment from avdhoot on 2024-01-25 15:26:28 IST ---


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.

--- Additional comment from avdhoot on 2024-01-25 15:27:13 IST ---



--- Additional comment from errata-xmlrpc on 2024-03-19 20:19:45 IST ---

Bug report changed to RELEASE_PENDING status by Errata System.
Advisory RHSA-2023:118688-06 has been changed to PUSH_READY status.
https://errata.engineering.redhat.com/advisory/118688

--- Additional comment from errata-xmlrpc on 2024-03-19 21:00:25 IST ---

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