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

Bug 1414818

Summary: Update affinity group drop general positive flag and moves VM to VM affinity to disabled state
Product: [oVirt] ovirt-engine Reporter: Artyom <alukiano>
Component: RestAPIAssignee: Yanir Quinn <yquinn>
Status: CLOSED CURRENTRELEASE QA Contact: Artyom <alukiano>
Severity: medium Docs Contact:
Priority: high    
Version: 4.1.0CC: bugs, dfediuck, mavital, mgoldboi, msivak
Target Milestone: ovirt-4.1.1Keywords: Triaged
Target Release: 4.1.1.3Flags: rule-engine: ovirt-4.1+
rule-engine: exception+
rule-engine: planning_ack+
msivak: 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: 2017-04-21 09:53:36 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 2017-01-19 14:45:06 UTC
Description of problem:
Update affinity group drop general positive flag

Version-Release number of selected component (if applicable):
ovirt-engine-4.1.0-0.4.master.20170115141203.git30e806b.el7.centos.noarch

How reproducible:
Always

Steps to Reproduce:
1. Create positive, hard affinity group
<affinity_group>
  <name>test_2</name>
  <enforcing>true</enforcing>
  <hosts_rule>
    <enabled>true</enabled>
    <enforcing>false</enforcing>
    <positive>true</positive>
  </hosts_rule>
  <positive>true</positive>
  <vms_rule>
    <enabled>true</enabled>
    <enforcing>true</enforcing>
    <positive>true</positive>
  </vms_rule>
  <hosts />
  <vms />
</affinity_group>
2. Update name of the affinity group
<affinity_group>
  <name>test_3</name>
</affinity_group>
3.

Actual results:
<affinity_group href="/ovirt-engine/api/clusters/00000002-0002-0002-0002-00000000017a/affinitygroups/9b80dabe-ef53-4f5c-9793-f2c8d45582d6" id="9b80dabe-ef53-4f5c-9793-f2c8d45582d6">
  <name>test_3</name>
  <enforcing>true</enforcing>
  <hosts_rule>
    <enabled>true</enabled>
    <enforcing>false</enforcing>
    <positive>true</positive>
  </hosts_rule>
  <vms_rule>
    <enabled>false</enabled>
    <enforcing>true</enforcing>
    <positive>false</positive>
  </vms_rule>
  <hosts />
  <vms />
</affinity_group>
No general positive flag at all after update, VM to VM affinity dropped to the disable state
<vms_rule>
    <enabled>false</enabled>
...

Expected results:
Update succeeds but change only things that I specified under the PU request

Additional info:
The problem relevant only for the REST API

Comment 1 Artyom 2017-03-13 08:55:34 UTC
Verified on rhevm-4.1.1.4-0.1.el7.noarch