Bug 1199907

Summary: [RFE] Possibility to install host into engine VM without running through the whole installation process again.
Product: Red Hat Enterprise Virtualization Manager Reporter: rhev-integ
Component: ovirt-hosted-engine-setupAssignee: Simone Tiraboschi <stirabos>
Status: CLOSED NEXTRELEASE QA Contact: Artyom <alukiano>
Severity: high Docs Contact:
Priority: medium    
Version: 3.3.0CC: aburden, alukiano, dfediuck, didi, ecohen, gklein, iheim, istein, lnatapov, lsurette, lveyde, mavital, oschreib, pablo.iranzo, sbonazzo, scohen, sherold, stirabos, ylavi
Target Milestone: ---Keywords: FutureFeature, ZStream
Target Release: 3.5.5Flags: sherold: Triaged+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: Doc Type: Enhancement
Doc Text:
It is now possible to resume a Hosted Engine deployment with the command 'hosted-engine --deploy --config-append=/path/to/answer.conf' after the OS and Red Hat Enterprise Virtualization Manager have been installed on the engine virtual machine, providing the disk image has not been deleted from the storage domain. In this circumstance, the user only needs to confirm the OS and the Manager have been installed for the deployment to continue.
Story Points: ---
Clone Of: 1002454 Environment:
Last Closed: 2015-06-29 11:04:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1002454, 1228239, 1228244    
Bug Blocks: 1218280    

Comment 1 Simone Tiraboschi 2015-04-02 14:21:38 UTC
Ho to verify it:

Comment 2 Simone Tiraboschi 2015-04-02 14:56:27 UTC
How to verify it:
- launch hosted-engine --deploy
- select to deploy on iSCSI or on NFS (or better try for both)
- booting from CDROM
- install the OS on the engine VM
- when done poweroff the VM  as usual
- let it restart the VM asking you to install the engine
- now hit Ctrl-C to stop it and get note of the generated answerfile
- manually stop the running engine VM: hosted-engine --vm-poweroff
- restart the deployment process with the previously generated answerfile: hosted-engine --deploy --config-append=/var/lib/ovirt-hosted-engine-setup/answers/answers-20150402165233.conf
- it should start the VM from CD-ROM using the same storage device for it, but if you have already installed the OS you could simply poweroff it and select: (1) Continue setup - VM installation is complete
- at that point it should boot the previously engine VM from the storage device and you are ready to conclude it

Comment 4 Artyom 2015-06-04 08:41:55 UTC
Checked on ovirt-hosted-engine-setup-1.2.4-2.el7ev.noarch

I found two problems:
1) Still exist problem for NFS trailing slash, I see that patch merged to master, and looks line it not backported to 3.5, so when I run hosted-engine --deploy ----config-append=conf_file deployment not found that storage already exist
2) For ISCSI I need to create volume with double space, scenario:
   1) Created volume of 50GB
   2) Run hosted-engine --deploy and set disk size to 25GB
   3) Stop deployment after engine installation stage(Ctrl+D)
   4) Run hosted-engine --deploy ----config-append=conf_file
   5) Deployment failed with message that not enough disk space:
      InsufficientSpaceError: Error: the VG on block device has capacity of          only 20 GiB while 25 GiB is required for the image
   6) It possible to avoid problem, if to set in config file storage space less than 20GB
   I believe we need to pass storage disk space checking if we continue previous deployment and storage already exist:
   if int(
                self.environment[
                    ohostedcons.StorageEnv.IMAGE_SIZE_GB
                ]
            ) > available_gb:
                raise ohosteddomains.InsufficientSpaceError(
                    _(
                        'Error: the VG on block device has capacity of only '
                        '{available_gb} GiB while '
                        '{image_gb} GiB is required for the image'
                    ).format(
                        available_gb=available_gb,
                        image_gb=self.environment[
                            ohostedcons.StorageEnv.IMAGE_SIZE_GB
                        ],
                    )
                )

Comment 5 Sandro Bonazzola 2015-06-04 12:11:31 UTC
Please open 2 bugs from comment #4 and make them blocking this one.

Comment 9 Sandro Bonazzola 2015-06-29 11:04:04 UTC
Closing this bug as won't fix, we're going to fix this in 3.6 with bug #1002454.