Bug 1513684 - [downstream clone - 4.1.8] [API] Cannot clear vm initialization via api
Summary: [downstream clone - 4.1.8] [API] Cannot clear vm initialization via api
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.1.5
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ovirt-4.1.8
: ---
Assignee: jniederm
QA Contact: Vitalii Yerys
URL:
Whiteboard:
Depends On: 1506449
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-15 18:39 UTC by rhev-integ
Modified: 2022-07-09 09:15 UTC (History)
11 users (show)

Fixed In Version: ovirt-engine-4.1.8.1
Doc Type: Bug Fix
Doc Text:
You can now set the Initialization of a virtual machine to an empty value through the REST API.
Clone Of: 1506449
Environment:
Last Closed: 2017-12-12 09:23:28 UTC
oVirt Team: Virt
Target Upstream Version:
Embargoed:
lsvaty: testing_plan_complete-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3278801 0 None None None 2017-12-13 00:46:36 UTC
Red Hat Product Errata RHSA-2017:3427 0 normal SHIPPED_LIVE Low: org.ovirt.engine-root security, bug fix, and enhancement update 2017-12-12 14:16:31 UTC
oVirt gerrit 84192 0 master MERGED restapi: Empty vm/initialization tag clears VM#vmInit 2017-11-20 13:22:04 UTC
oVirt gerrit 84390 0 ovirt-engine-4.1 MERGED restapi: Empty vm/initialization tag clears VM#vmInit 2017-11-21 15:54:24 UTC

Description rhev-integ 2017-11-15 18:39:45 UTC
+++ This bug is a downstream clone. The original bug is: +++
+++   bug 1506449 +++
======================================================================

Description of problem:

Trying to set the Initialization of a VM to an empty value via REST api does not work.

Version-Release number of selected component (if applicable):
rhevm-4.1.5.2-0.1.el7.noarch

How reproducible:
100%

Steps to Reproduce:

Doing a PUT of an empty initialization does not work. All the configurations remain.

DEBUG:root:PUT /ovirt-engine/api/vms/b595e7fd-21e9-4bd7-ac5b-8559a78912b9 HTTP/1.1
DEBUG:root:Content-Length: 31
DEBUG:root:<vm>
DEBUG:root:  <initialization/>
DEBUG:root:</vm>
DEBUG:root:HTTP/1.1 200 OK

If I try just the Cloud init part, no changes as well

Everything is still there:

DEBUG:root:    <initialization>
DEBUG:root:        <configuration>
                   .....
DEBUG:root:        </configuration>
DEBUG:root:        <host_name>thisisatest</host_name>
DEBUG:root:        <nic_configurations/>
DEBUG:root:        <regenerate_ssh_keys>false</regenerate_ssh_keys>
DEBUG:root:    </initialization>

I'm using this:

vms_service = connection.system_service().vms_service()

for vm in vms_service.list():
    if vm.name.startswith("germano-"):
        print "Updating %s" % vm.name
        vm_service = vms_service.vm_service(vm.id)
        vm_service.update(
            types.Vm(
                initialization=types.Initialization(
                )
            )
        )

And the cloud_init element inside initialization seems to suffer from the same problem.

Actual results:
Initialization still there

Expected results:
Initialization removed

(Originally by Germano Veit Michel)

Comment 1 rhev-integ 2017-11-15 18:39:52 UTC
where's the 4.2 bug?

(Originally by michal.skrivanek)

Comment 4 Vitalii Yerys 2017-12-05 13:27:10 UTC
Verified on:

Red Hat Virtualization Manager Version: 4.1.8.4-0.1.el7

Comment 7 errata-xmlrpc 2017-12-12 09:23:28 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, 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-2017:3427

Comment 8 Daniel Gur 2019-08-28 13:12:11 UTC
sync2jira

Comment 9 Daniel Gur 2019-08-28 13:16:23 UTC
sync2jira


Note You need to log in before you can comment on or make changes to this bug.