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

Bug 1346250

Summary: Can not delete read_only affinity label
Product: [oVirt] ovirt-engine Reporter: Artyom <alukiano>
Component: Backend.CoreAssignee: Andrej Krejcir <akrejcir>
Status: CLOSED CURRENTRELEASE QA Contact: Artyom <alukiano>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.0.0CC: akrejcir, bugs, dfediuck, itsavant, juan.hernandez, mavital, mgoldboi, msivak, rgolan, sbonazzo
Target Milestone: ovirt-4.0.4Keywords: Triaged
Target Release: 4.0.4Flags: rule-engine: ovirt-4.0.z+
rule-engine: ovirt-4.1+
mgoldboi: planning_ack+
rgolan: devel_ack+
mavital: testing_ack+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-26 12:39:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Artyom 2016-06-14 11:15:22 UTC
Description of problem:
Can not delete read_only affinity label

Version-Release number of selected component (if applicable):
ovirt-engine-restapi-4.0.0.4-0.1.el7ev.noarch

How reproducible:
Always

Steps to Reproduce:
1. Create read_only affinity label
<affinity_labe>
<name>test</name>
<read_only>true</read_only>
</affinity_label>
2. Try to delete afinity label
3.

Actual results:
<fault>
<detail>[Cannot change read only affinity label.]</detail>
<reason>Operation Failed</reason>
</fault>

Expected results:
I believe we need to restrict only update of such affinity label, but not deletion

Additional info:

Comment 1 Juan Hernández 2016-06-14 16:02:14 UTC
I believe that this rule is part of the backend, not of the API. If a BLL.SLA component existed I would have moved the bug there.

Comment 2 Martin Sivák 2016-06-15 07:52:35 UTC
We should actually restrict creation. Read only labels are meant to be used for internal labeling.

Comment 3 Roy Golan 2016-06-15 08:48:40 UTC
we should allow CRUD only for internal commands isInternalExecution()

Comment 4 Artyom 2016-09-05 12:30:58 UTC
Verified on ovirt-engine-restapi-4.0.4-0.1.el7ev.noarch
POST:
<affinity_label>
  <name>test1</name>
  <read_only>true</read_only>
</affinity_label>

Response:
<fault>
<detail>[Cannot change read only affinity label.]</detail>
<reason>Operation Failed</reason>
</fault>

Comment 5 Cynomus 2024-11-21 19:39:10 UTC
Was this ever resolved? I set the readonly property of an Affinity Label via v4.5 REST API, now I can't set it back, nor delete the Label.
I also don't see it stored in the lapels table in the PostgresSQL db

Comment 6 Andrej Krejcir 2024-11-25 13:38:17 UTC
I don't remember, this was too long ago. I don't work on this project anymore.

Please, try asking the current maintainers, or opening a new bug.