Bug 1780881

Summary: [RFE] Allow pausing during deploy
Product: [oVirt] cockpit-ovirt Reporter: Yedidyah Bar David <didi>
Component: Hosted EngineAssignee: Aviv Turgeman <aturgema>
Status: CLOSED CURRENTRELEASE QA Contact: Wei Wang <weiwang>
Severity: high Docs Contact:
Priority: medium    
Version: 0.12.8CC: bugs, cshao, eslutsky, lsvaty, mavital, peyu, qiyuan, sbonazzo, shlei, weiwang, yaniwang
Target Milestone: ovirt-4.4.5Keywords: FutureFeature
Target Release: 0.14.20Flags: sbonazzo: ovirt-4.4?
weiwang: testing_plan_complete+
pm-rhel: planning_ack?
sbonazzo: devel_ack+
weiwang: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cockpit-ovirt-0.14.20 Doc Type: Enhancement
Doc Text:
Feature: Allow pausing during Hosted Engine deploy to make manual modifications to engine vm in cockpit-ovirt UI. Reason: Get same functionality for CLI and UI. Result: Exposing in cockpit-ovirt, at first step "VM" under "Advanced" button, check-box to allow pausing during third step "Prepare VM" of Hosted Engine deploy to make manual modifications.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-15 07:39:26 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 Yedidyah Bar David 2019-12-08 07:01:14 UTC
Description of problem:

The hosted-engine-setup ansible code allows pausing the deploy process at a certain point (after adding the host to the engine):

https://github.com/oVirt/ovirt-ansible-hosted-engine-setup/blob/master/README.md#make-changes-in-the-engine-vm-during-the-deployment

We should expose that in the cockpit UI:

1. Either directly, add a checkbox that sets the ansible var 'he_pause_host' to True, or

2. Allowing somehow setting arbitrary ansible vars, to allow configuring things we didn't add a specific cockpit gui element for but did allow controlling via ansible vars.

We should probably do both.

I asked Simone in private, and he replied, for (1.):

We have to add something like:
                pauseHost: {
                    name: "PAUSE_HOST",
                    ansibleVarName: "he_pause_host",
                    ansiblePhasesUsed: [phases.BOOTSTRAP_VM],
                    description: "Pause host",
                    value: false,
                    type: types.BOOLEAN,
                    showInReview: false,
                    uiStage: "",
                    useInAnswerFile: false,
                    required: false
                },

here:
https://github.com/oVirt/cockpit-ovirt/blob/master/dashboard/src/helpers/HostedEngineSetupUtil.js#L25

Then add a checkbox here:
https://github.com/oVirt/cockpit-ovirt/blob/master/dashboard/src/components/HostedEngineSetup/VmStep/HeWizardVm.js#L488
 
and a handler here https://github.com/oVirt/cockpit-ovirt/blob/master/dashboard/src/components/HostedEngineSetup/VmStep/HeWizardVmContainer.js

to set the value of he_pause_host according to the value of the checkbox.

Comment 1 Sandro Bonazzola 2019-12-11 08:18:53 UTC
Targeting to 4.5.0 tentatively

Comment 2 Wei Wang 2021-03-03 01:34:07 UTC
The latest build rhvh-4.4.5.3-0.20210215.0 contains cockpit-ovirt-dashboard-0.14.19-1.el8ev.noarch, so QE will verify this bug when the new build which includes cockpit-ovirt-0.14.20 is coming.

Comment 6 Wei Wang 2021-04-01 11:07:49 UTC
Test Version:
RHVH-4.4-20210331.0-RHVH-x86_64-dvd1.iso
cockpit-ws-224.2-1.el8.x86_64
subscription-manager-cockpit-1.27.18-1.el8_3.noarch
cockpit-storaged-224.2-1.el8.noarch
cockpit-bridge-224.2-1.el8.x86_64
cockpit-224.2-1.el8.x86_64
cockpit-system-224.2-1.el8.noarch
cockpit-ovirt-dashboard-0.14.20-1.el8ev.noarch
ovirt-hosted-engine-setup-2.4.9-4.el8ev.noarch
ovirt-hosted-engine-ha-2.4.6-1.el8ev.noarch
rhvm-appliance-4.4-20210310.0.el8ev.rpm

Test Steps:
1. Clean install RHVH iso
2. Check the checkbox of Pause Host in Advance part of VM setting within hosted engine wizard.
3. Fill other parameters and deploy hosted engine
4. After ovirt engine setup, check the deployment process
5. Delete the ansible.*_he_setup_lock in /tmp

Result:
After step 4: the deployment will paused when the ansible.*_he_setup_lock is created in /tmp
After step 5: The deploy process continues, and host engine deploy successful.

Bug is fixed, move it to "VERIFIED"