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

Bug 1716932

Summary: NPE Failed to build cloud-init data when initialization object not provided
Product: [oVirt] ovirt-engine Reporter: Petr Matyáš <pmatyas>
Component: Backend.CoreAssignee: Tomasz Barański <tbaransk>
Status: CLOSED CURRENTRELEASE QA Contact: Liran Rotenberg <lrotenbe>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.3.4CC: aefrat, bugs, christian.grundmann, lsvaty, michal.skrivanek, rbarry, tbaransk
Target Milestone: ovirt-4.3.5Keywords: Automation, AutomationBlocker, Regression
Target Release: 4.3.5.1Flags: pm-rhel: ovirt-4.3+
pm-rhel: blocker?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.3.5.1 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-07-30 14:08:30 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:
Attachments:
Description Flags
engine log none

Description Petr Matyáš 2019-06-04 12:16:18 UTC
Created attachment 1577040 [details]
engine log

Description of problem:
Starting a VM through REST API with use_cloud_init true fails on an NPE:

2019-06-04 14:07:09,862+02 ERROR [org.ovirt.engine.core.vdsbroker.CreateVDSCommand] (default task-53) [66c452c5-8330-45dc-bfee-9cacd01
9aca0] Failed to create VM: java.lang.RuntimeException: Failed to build cloud-init data

Version-Release number of selected component (if applicable):
ovirt-engine-4.3.4.2-0.1.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. curl -v -u "user@domain:password" -H "Content-type: application/xml" --insecure -X POST https://engine/ovirt-engine/api/vms/vm_id/start -d "<action><use_cloud_init>true</use_cloud_init><use_sysprep>false</use_sysprep></action>"

Actual results:
400 bad request

Expected results:
vm started with empty initialization object

Additional info:

Comment 1 RHEL Program Management 2019-06-05 03:25:50 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 3 Michal Skrivanek 2019-06-13 16:13:29 UTC
Tomasz, please don't move from POST to ON_QA. It's not a correct status from 4.4 perspective (MODIFIED is)

Comment 4 Tomasz Barański 2019-06-17 09:23:14 UTC
*** Bug 1720597 has been marked as a duplicate of this bug. ***

Comment 5 Liran Rotenberg 2019-07-02 11:19:11 UTC
Verified on:
ovirt-engine-4.3.5.1-0.1.el7.noarch

Steps:
1. curl -v -u "user@domain:password" -H "Content-type: application/xml" --insecure -X POST https://engine/ovirt-engine/api/vms/vm_id/start -d "<action><use_cloud_init>true</use_cloud_init><use_sysprep>false</use_sysprep></action>"

Result:
200 OK

The VM started with empty initialization object.

Comment 6 Sandro Bonazzola 2019-07-30 14:08:30 UTC
This bugzilla is included in oVirt 4.3.5 release, published on July 30th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.5 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.