Hide Forgot
Created attachment 1152128 [details] Invalid number of cpu specified.png Description of problem: It always report "Invalid number of cpu specified" and will led to HE deploy can't continue. Version-Release number of selected component (if applicable): rhev-hypervisor7-ng-3.6-20160426.0.x86_64 imgbased-0.6-0.1.el7ev.noarch ovirt-hosted-engine-ha-1.3.5.3-1.el7ev.noarch ovirt-hosted-engine-setup-1.3.6.0-1.el7ev.noarch rhevm-appliance-20160428.0-1.x86_64.rhevm.ova How reproducible: 100% Steps to Reproduce: 1. Install rhev-hypervisor7-ng-3.6-20160426.0.x86_64 2. Disabled NetworkManager and start hosted-engine setup from cockpit. 3. Setup Hosted Engine step by step. 4. Focus on "Please specify the number of virtual CPUs for the VM" step. 5. Press Enter key with default value. Actual results: It always report "Invalid number of cpu specified" and will led to HE deploy can't continue. Expected results: Press Enter key with default value can be accepted. Additional info:
Created attachment 1152129 [details] /var/log/*.*
Mark this bug testblocker due to it blocked our HE testing.
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.
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.
The entry needs to be "2" or similar. The entry box has that text because it's the suggestion from ovirt-hosted-engine-setup (this is also the case for the next input, which is memory, it's something like "Defaults to 4096"). The problem is in ovirt-hosted-engine-setup, and that the default output (even in machine readable format) does not output a suggested input which can be used without modification. The output from otopi should be corrected. You can pass this in cockpit by entering a literal number, which should be suggested in the first place. Using "2" instead of "Defaults to minimum requirement: 2" will continue. This should not be blocking testing. Changing the component. I'll submit a patch to ovirt-hosted-engine-setup.
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.
A workaround is to remove the complete text from the input field and just enter the number (2)
(In reply to Fabian Deutsch from comment #8) > A workaround is to remove the complete text from the input field and just > enter the number (2) The workaround can work well. Test version: rhev-hypervisor7-ng-3.6-20160429.0 imgbased-0.6-0.1.el7ev.noarch ovirt-hosted-engine-ha-1.3.5.3-1.el7ev.noarch ovirt-hosted-engine-setup-1.3.6.0-1.el7ev.noarch rhevm-appliance-20160428.0-1.x86_64.rhevm.ova Test steps: 1. Install rhev-hypervisor7-ng-3.6-20160429.0 2. Disabled NetworkManager and start hosted-engine setup from cockpit. 3. #rpm -ivh rhevm-appliance-20160428.0-1.el7ev.noarch.rpm 4. Setup Hosted Engine step by step(OVA). 5. Focus on "Please specify the number of virtual CPUs for the VM" step. 6. Remove the complete text from the input field and just enter the number (2) Test result: Deploy HE can successful.
Created attachment 1153281 [details] HE_new_log_0503
Logs: 2016-05-03 14:14:09 DEBUG otopi.context context._executeMethod:142 Stage customization METHOD otopi.plugins.ovirt_hosted_engine_setup.vm.cpu.Plugin._customization 2016-05-03 14:14:10 DEBUG otopi.plugins.otopi.dialog.machine dialog.__logString:219 DIALOG:SEND ***Q:STRING ovehosted_vmenv_cpu 2016-05-03 14:14:10 DEBUG otopi.plugins.otopi.dialog.machine dialog.__logString:219 DIALOG:SEND ### Please specify the number of virtual CPUs for the VM [Defaults to appliance OVF value: 2]: 2016-05-03 14:14:11 DEBUG otopi.plugins.otopi.dialog.machine dialog.__logString:219 DIALOG:RECEIVE Defaults to appliance OVF value: 2 2016-05-03 14:14:11 ERROR otopi.plugins.ovirt_hosted_engine_setup.vm.cpu cpu._customization:173 Invalid number of cpu specified: Defaults to appliance OVF value: 2 2016-05-03 14:14:11 DEBUG otopi.plugins.otopi.dialog.machine dialog.__logString:219 DIALOG:SEND ***Q:STRING ovehosted_vmenv_cpu 2016-05-03 14:14:11 DEBUG otopi.plugins.otopi.dialog.machine dialog.__logString:219 DIALOG:SEND ### Please specify the number of virtual CPUs for the VM [Defaults to appliance OVF value: 2]: 2016-05-03 14:14:16 DEBUG otopi.plugins.otopi.dialog.machine dialog.__logString:219 DIALOG:RECEIVE 2 2016-05-03 14:14:16 DEBUG otopi.context context.dumpEnvironment:500 ENVIRONMENT DUMP - BEGIN 2016-05-03 14:14:16 DEBUG otopi.context context.dumpEnvironment:510 ENV OVEHOSTED_VM/vmVCpus=str:'2' 2016-05-03 14:14:16 DEBUG otopi.context context.dumpEnvironment:514 ENVIRONMENT DUMP - END To me it makes sense that there is an additional text ("Defaults to appliance OVF value") accompanying the default value. But this causes the parse error on the UI side. An easy fix could be to just pull the additional text out of the square brackets: OLD ### Please specify the number of virtual CPUs for the VM [Defaults to appliance OVF value: 2]: NEW ### Please specify the number of virtual CPUs for the VM. Defaults to appliance OVF value: [2]: Would this be suitable as a short-term fix?
There are three places where such an adjustment must be made to fix he-setup in Cockpit.
I'm not that sure: on hosted-engine-setup the dialog is set in this way: default = self.environment[ohostedcons.VMEnv.APPLIANCEVCPUS] self.environment[ ohostedcons.VMEnv.VCPUS ] = self.dialog.queryString( name='ovehosted_vmenv_cpu', note=_( 'Please specify the number of virtual CPUs for the VM ' '[Defaults to {default_msg}: @DEFAULT@]: ' ).format(default_msg=default_msg), prompt=True, default=default, ) You have to consume the default value that is tagged as "default", not to parse the dialog text to extract it. If machine dialog dialect doesn't provide the default value we need to patch otopi for that but parsing the text output isn't the way to go.
Yes - Ryan can probably answer what is getting parsed.
(In reply to Fabian Deutsch from comment #14) > Yes - Ryan can probably answer what is getting parsed. We're parsing the text output (in otopi machine readable format) because, as noted, even the matchine readable format does not provide the default value as a separate field. We get something like: ***Q:STRING DEPLOY_PROCEED ### Continuing will configure this host for serving as hypervisor and create a VM where you have to install the engine afterwards. ### Are you sure you want to continue? (Yes, No)[Yes]: The patch under discussion for otopi is the correct fix, though it requires changing the parser, since even machine dialect does not contain a separate entry for the default I'm concerned about two things: 1) Will this land in 3.6? 2) Even if the patch to otopi makes it to 3.6, gerrit 56935 should still be merged in my opinion, since it provides consistency. In other input fields where information which is helpful to users is presented, it is not inside []. It appears to be these three fields only. For example: Please specify the storage you would like to use (glusterfs, iscsi, fc, nfs3, nfs4)[nfs3] Please specify the full shared storage connection path to use (example: host:/path):
(In reply to Ryan Barry from comment #15) > (In reply to Fabian Deutsch from comment #14) > > Yes - Ryan can probably answer what is getting parsed. > > We're parsing the text output (in otopi machine readable format) because, as > noted, even the matchine readable format does not provide the default value > as a separate field. > > We get something like: > > ***Q:STRING DEPLOY_PROCEED > ### Continuing will configure this host for serving as hypervisor and create > a VM where you have to install the engine afterwards. > ### Are you sure you want to continue? (Yes, No)[Yes]: > > The patch under discussion for otopi is the correct fix, though it requires > changing the parser, since even machine dialect does not contain a separate > entry for the default > > I'm concerned about two things: > > 1) Will this land in 3.6? If we must, we must... > > 2) Even if the patch to otopi makes it to 3.6, gerrit 56935 should still be > merged in my opinion, since it provides consistency. +1
Also encounter this issue when setup HE with OVA type. 1. Please specify the number of virtual CPUs for the VM [Defaults to appliance OVF value: 2]: 2. Please specify the memory size of the VM in MB [Defaults to appliance OVF value: 4096]:
*** Bug 1334758 has been marked as a duplicate of this bug. ***
oVirt 4.0 beta has been released, moving to RC milestone.
Test version: RHEV-H-7.2-20160701.2-RHVH-x86_64-dvd1.iso redhat-release-rhev-hypervisor-4.0-0.9.el7.x86_64 ovirt-hosted-engine-ha-2.0.0-1.el7ev.noarch ovirt-hosted-engine-setup-2.0.0.2-1.el7ev.noarch RHEVM-appliance-20160623.0-1.el7ev.4.0 Test steps: 1. Install RHEV-H-7.2-20160701.2-RHVH-x86_64 2. Deploy Hosted Engine step by step. 3. Input default value and press enter key. Test result: Press Enter key with default value can be accepted, and deploy HE can successful. So the bug is fixed, change bug status to VERIFIED.