Bug 1796047

Summary: Bad payload on ignition when the custom script is empty
Product: [oVirt] ovirt-engine Reporter: Liran Rotenberg <lrotenbe>
Component: Backend.CoreAssignee: Liran Rotenberg <lrotenbe>
Status: CLOSED CURRENTRELEASE QA Contact: Beni Pelled <bpelled>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.4.0CC: bugs, rbarry
Target Milestone: ovirt-4.4.0Flags: pm-rhel: ovirt-4.4+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: rhv-4.4.0-29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-20 20:00:56 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 Liran Rotenberg 2020-01-29 13:44:31 UTC
When we try to use ignition and provide only the UI fields without any payload, the engine will result in a bad payload.
This will cause the ignition to fail in the OS.

Comment 1 Sandro Bonazzola 2020-03-13 09:29:56 UTC
This bug is in modified and targeting 4.4.1. can we retarget this to 4.4.0 and move to QE?

Comment 3 Beni Pelled 2020-04-27 06:31:28 UTC
Verified with:
- RHV 4.4.0-0.33.master.el8ev
- rhcos-44.81.202004250133-0-openstack
- libvirt-6.0.0-17.module+el8.2.0+6257+0d066c28.x86_64
- vdsm-4.40.13-1.el8ev.x86_64

Verification steps:
1. Create an RHCOS VM from a template (it doesn't have to be created from a template).
2. Go to 'Edit > General' and set 'Red Hat Enterprise Linux CoreOS' as the Operating System.
3. Go to 'Edit > Initial Run' and check the 'Ignition 2.3.0', remove the default value from 'VM Hostname' field and make sure other fields empty as well
4. Start the VM

Result:
- The vmPayload sent (see below) and the VM is up and running 
(the OS, of course, is not accessible due to missing auth-configurations supposed to be sent by the ignition)


# virsh -r dumpxml <rhcos_vm> | sed -n '/ovirt-vm:vmPayload/,/\/ovirt-vm:vmPayload/p'
            <ovirt-vm:vmPayload>
                <ovirt-vm:volId>config-2</ovirt-vm:volId>
                <ovirt-vm:file path="openstack/latest/meta_data.json">ewogICJhdmFpbGFiaWxpdHlfem9uZSIgOiAibm92YSIsCiAgImxhdW5jaF9pbmRleCIgOiAiMCIsCiAgIm1ldGEiIDogewogICAgInJvbGUiIDogInNlcnZlciIsCiAgICAiZHNtb2RlIiA6ICJsb2NhbCIsCiAgICAiZXNzZW50aWFsIiA6ICJmYWxzZSIKICB9LAogICJ1dWlkIiA6ICIxYTkwNTA3Zi03MzllLTRmNWMtOWI5NS1mNWEzODk4ZmJiZGIiCn0=</ovirt-vm:file>
                <ovirt-vm:file path="openstack/latest/user_data">eyJpZ25pdGlvbiI6eyJ2ZXJzaW9uIjoiMi4zLjAifX0=</ovirt-vm:file>
            </ovirt-vm:vmPayload>

Note: I didn't verify with run-once due to a bug with missing payload when running an RHCOS VM in run-once mode https://bugzilla.redhat.com/show_bug.cgi?id=1828132

Comment 4 Sandro Bonazzola 2020-05-20 20:00:56 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.