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

Bug 1609686

Summary: Get VMs response doesn't match virsh output after updating of the serial number policy
Product: [oVirt] ovirt-engine Reporter: Polina <pagranat>
Component: BLL.VirtAssignee: Liran Rotenberg <lrotenbe>
Status: CLOSED CURRENTRELEASE QA Contact: Polina <pagranat>
Severity: medium Docs Contact:
Priority: low    
Version: 4.2.5CC: bugs, rbarry
Target Milestone: ovirt-4.4.0Flags: pm-rhel: ovirt-4.4+
Target Release: ---   
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: 2020-05-20 20:00:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Polina 2018-07-30 07:45:58 UTC
Description of problem: Updating of the serial number policy from custom to VM causes different output - in Get VMs and virsh 

Version-Release number of selected component (if applicable):
rhv-release-4.2.5-5-001.noarch

How reproducible:100%

Steps to Reproduce:
1.In UI Open EditVM/System. Choose custom serial number policy and enter some value. Start VM. Check virsh dumpxml output and Get vms API output - contain correct values
2.Update the custom policy to the VM ID policy (choose VM ID option in 'Provide custom serial number policy'). ok in the dialog. Restart VM.
3.Check virsh output ( virsh -r dumpxml vm_id ) and get VMS API (https://{{host}}/ovirt-engine/api/vms) 

Actual results:
in virsh output we see the correct result - serial number equals to UUID.
   <system>
      ....
      <entry name='serial'>3855687f-a362-48a9-8d5a-b1dc3ff22dd5</entry>
      <entry name='uuid'>3855687f-a362-48a9-8d5a-b1dc3ff22dd5</entry>
    </system>

In rest API response we see the previous value for serial number:
        <serial_number>
            <policy>vm</policy>
            <value>4567</value>
        </serial_number>

Expected results:
Rest API response must not contain the previous serial number value  <value>4567</value>

Additional info:

Comment 1 Polina 2020-01-13 11:34:15 UTC
verified on http://bob-dr.lab.eng.brq.redhat.com/builds/4.4/rhv-4.4.0-14

Comment 2 Sandro Bonazzola 2020-05-20 20:00:02 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.