Bug 1001702

Summary: Engine VM is being destroyed instead of being rebooted when user asks to rebooted from previously selected boot media.
Product: Red Hat Enterprise Virtualization Manager Reporter: Leonid Natapov <lnatapov>
Component: ovirt-hosted-engine-setupAssignee: Sandro Bonazzola <sbonazzo>
Status: CLOSED CURRENTRELEASE QA Contact: Leonid Natapov <lnatapov>
Severity: high Docs Contact:
Priority: high    
Version: 3.3.0CC: iheim, lnatapov, pstehlik, scohen
Target Milestone: ---Keywords: Triaged
Target Release: 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: integration
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-23 11:23:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
hosted engine setup log none

Description Leonid Natapov 2013-08-27 14:36:22 UTC
In the first part of ovirt-hosted-engine setup VM is being created and user must install on it OS and after that RHEVM. After OS was installed on VM user get the foolowing message from ovirt-hosted-engine-setup

"root@dhcp-3-156 libvirt]# Has the OS installation been completed successfully?
Answering no will allow you to reboot from the previously selected boot media. (Yes, No)[Yes]: "

When answering "no" installation stops and VM is being destroyed.

here is the log:

2013-08-27 17:27:13 DEBUG otopi.plugins.ovirt_hosted_engine_setup.vm.runvm plugin.executeRaw:366 execute: ['/usr/bin/vdsClient', '-s', 'localhost', 'destroy', '482ac171-d750-409
5-abf4-3fdd981b6f71'], executable='None', cwd='None', env=None
2013-08-27 17:27:13 DEBUG otopi.plugins.ovirt_hosted_engine_setup.vm.runvm plugin.executeRaw:383 execute-result: ['/usr/bin/vdsClient', '-s', 'localhost', 'destroy', '482ac171-d
750-4095-abf4-3fdd981b6f71'], rc=0
2013-08-27 17:27:13 DEBUG otopi.plugins.ovirt_hosted_engine_setup.vm.runvm plugin.execute:441 execute-output: ['/usr/bin/vdsClient', '-s', 'localhost', 'destroy', '482ac171-d750
-4095-abf4-3fdd981b6f71'] stdout:
Machine destroyed

2013-08-27 17:27:13 DEBUG otopi.plugins.ovirt_hosted_engine_setup.vm.runvm plugin.execute:446 execute-output: ['/usr/bin/vdsClient', '-s', 'localhost', 'destroy', '482ac171-d750
-4095-abf4-3fdd981b6f71'] stderr:

Comment 1 Sandro Bonazzola 2013-09-02 08:51:33 UTC
The destroy / create behavior is like this by design.

After a failed installation answering no destroy the VM and create it again booting again from previously selected boot media.

Answering yes destroy the VM and create it again booting from HD.

Not closing as not a bug, because I've not understood if engine-setup exits with failure when you answer no. If so can you please attach the logs?

Comment 2 Leonid Natapov 2013-09-02 09:13:11 UTC
Sandro,answering "no" just destroys the vm. Vm never created again.

Comment 3 Leonid Natapov 2013-09-02 09:16:52 UTC
Created attachment 792773 [details]
hosted engine setup log

Comment 4 Leonid Natapov 2013-09-02 09:17:10 UTC
log attached.

Comment 5 Sandro Bonazzola 2013-09-03 08:21:51 UTC
Leonid, from the logs I see that the answer 'no' was not read from standard input:

2013-08-27 16:57:13 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:215 DIALOG:SEND                 Has the OS installation been completed successfully?
2013-08-27 16:57:13 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:215 DIALOG:SEND                 Answering no will allow you to reboot from the previously selected boot media. (Yes, No)[Yes]: 
2013-08-27 19:47:45 DEBUG otopi.context context._executeMethod:132 method exception
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/otopi/context.py", line 122, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-hosted-engine-setup/scripts/../plugins/ovirt-hosted-engine-setup/vm/runvm.py", line 288, in _boot_from_install_media
    default=_('Yes')
  File "/usr/share/otopi/plugins/otopi/dialog/human.py", line 170, in queryString
    value = self._readline(hidden=hidden)
  File "/usr/lib/python2.6/site-packages/otopi/dialog.py", line 257, in _readline
    value = self.__input.readline()
  File "/usr/lib/python2.6/site-packages/otopi/main.py", line 59, in _signal
    raise RuntimeError("SIG%s" % signum)
RuntimeError: SIG1

Are you able to reproduce the issue?

Comment 6 Leonid Natapov 2013-09-03 08:46:24 UTC
What do you mean was not read from standart input ?
I can try reproduce it.

Comment 7 Sandro Bonazzola 2013-09-03 09:00:33 UTC
Well, when the dialog reads an answer it logs something like:

 2013-08-27 16:30:38 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:215 DIALOG:SEND
 Continuing will configure this host for serving as hypervisor and create a VM where oVirt Engine will be installed afterwards.
 2013-08-27 16:30:38 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:215 DIALOG:SEND
 Are you sure you want to continue? (Yes, No)[Yes]: 
 2013-08-27 16:30:42 DEBUG otopi.plugins.otopi.dialog.human dialog.__logString:215 DIALOG:RECEIVE    Yes

In this log, the 'DIALOG:RECEIVE No' is missing and there is a SIG1 which should be SIGHUP while reading the answer from the console with 'value = self.__input.readline()'.

Comment 8 Sandro Bonazzola 2013-09-06 11:02:33 UTC
Leonid, are you able to reproduce the issue?

Comment 9 Leonid Natapov 2013-09-08 08:20:40 UTC
Hi,Sandro. There been a holidays here,so I wasn't in the office. Do I need a new rpms and new vdsm ? or should I try to reproduce it with what I have ?

Comment 10 Sandro Bonazzola 2013-09-11 07:08:11 UTC
(In reply to Leonid Natapov from comment #9)
> Hi,Sandro. There been a holidays here,so I wasn't in the office. Do I need a
> new rpms and new vdsm ? or should I try to reproduce it with what I have ?

I think you can wait for IS14.

Comment 11 Sandro Bonazzola 2013-09-17 09:51:09 UTC
Can you still reproduce this?

Comment 12 Leonid Natapov 2013-09-23 11:17:35 UTC
Sandro,I wasn't able to reproduce it with the latest RPMs.

Comment 13 Sandro Bonazzola 2013-09-23 11:23:15 UTC
Thanks Leonid, closing with insufficient data for reproducing this.
Please reopen if you see this again during your tests.