Bug 1630090

Summary: hosted-engine --vm-start-paused is broken with xmlBase64
Product: Red Hat Enterprise Virtualization Manager Reporter: Germano Veit Michel <gveitmic>
Component: ovirt-hosted-engine-setupAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED ERRATA QA Contact: Nikolai Sednev <nsednev>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2.6CC: lsurette, michal.skrivanek, mtessun, stirabos
Target Milestone: ovirt-4.2.7Keywords: Regression, Triaged, ZStream
Target Release: ---Flags: lsvaty: testing_plan_complete-
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-hosted-engine-setup-2.2.29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-05 15:03:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Germano Veit Michel 2018-09-17 23:19:18 UTC
Description of problem:

Since the hosted-engine startup uses xmlBase64 the --vm-start-paused option is broken.

Appending "launchPaused=true" to the end of the config passed to the vdsmhelper does not work, because xmlBase64 (engine xml) is preferred over the legacy params (which includes launchPaused).

def create(args):
    vm_params = vmconf.parseVmConfFile(args.filename)

    # Send only libvirt xml if it is present in the vm.conf
    xml = vm_params.get('xml')

    cli = ohautil.connect_vdsm_json_rpc()
    cli.VM.create(
        vmID=vm_params['vmId'],
        vmParams={'xml': xml} if xml is not None else vm_params
    )

Version-Release number of selected component (if applicable):
ovirt-hosted-engine-setup-2.2.25-1.el7.noarch
ovirt-hosted-engine-ha-2.2.16-1.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. Use '--vm-start-paused' on 4.2 with engine generated XML present.

Actual results:
VM is created in running state

Expected results:
VM is created in paused state

Workaround:
# cp /var/run/ovirt-hosted-engine-ha/vm.conf /root/vm.conf
# sed -i '/^xmlBase64=/d' /root/vm.conf 
# echo "launchPaused=true" >> /root/vm.conf 
# hosted-engine --vm-start --vm-conf=/root/vm.conf

Comment 1 Michal Skrivanek 2018-09-18 04:11:59 UTC
HE deployement is handled by Integration team

Comment 3 Nikolai Sednev 2018-10-22 13:53:54 UTC
1.Deployed hosted-engine with node 0.
2.hosted-engine --set-maintenance --mode=global.
3.hosted-engine --vm-poweroff.
4.hosted-engine --vm-start-paused.
5.He-VM gots started in paused status.

alma03 ~]# hosted-engine --vm-poweroff
[root@alma03 ~]#  virsh -r list --all
 Id    Name                           State
----------------------------------------------------

[root@alma03 ~]# hosted-engine --vm-start-paused
[root@alma03 ~]#  virsh -r list --all
 Id    Name                           State
----------------------------------------------------
 3     HostedEngine                   paused

Tested on these components:
ovirt-hosted-engine-setup-2.2.28-1.el7ev.noarch
ovirt-hosted-engine-ha-2.2.18-1.el7ev.noarch
rhvm-appliance-4.2-20181018.0.el7.noarch
Red Hat Enterprise Linux Server release 7.6 (Maipo)
Linux 3.10.0-957.el7.x86_64 #1 SMP Thu Oct 4 20:48:51 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Moving to verified.

Comment 5 errata-xmlrpc 2018-11-05 15:03:44 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/RHBA-2018:3482

Comment 6 Daniel Gur 2019-08-28 13:12:03 UTC
sync2jira

Comment 7 Daniel Gur 2019-08-28 13:16:15 UTC
sync2jira