Bug 1001702 - Engine VM is being destroyed instead of being rebooted when user asks to rebooted from previously selected boot media.
Engine VM is being destroyed instead of being rebooted when user asks to rebo...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-hosted-engine-setup (Show other bugs)
3.3.0
Unspecified Unspecified
high Severity high
: ---
: 3.3.0
Assigned To: Sandro Bonazzola
Leonid Natapov
integration
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-27 10:36 EDT by Leonid Natapov
Modified: 2013-09-26 05:37 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-23 07:23:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
hosted engine setup log (285.28 KB, text/plain)
2013-09-02 05:16 EDT, Leonid Natapov
no flags Details

  None (edit)
Description Leonid Natapov 2013-08-27 10:36:22 EDT
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 04:51:33 EDT
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 05:13:11 EDT
Sandro,answering "no" just destroys the vm. Vm never created again.
Comment 3 Leonid Natapov 2013-09-02 05:16:52 EDT
Created attachment 792773 [details]
hosted engine setup log
Comment 4 Leonid Natapov 2013-09-02 05:17:10 EDT
log attached.
Comment 5 Sandro Bonazzola 2013-09-03 04:21:51 EDT
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 04:46:24 EDT
What do you mean was not read from standart input ?
I can try reproduce it.
Comment 7 Sandro Bonazzola 2013-09-03 05:00:33 EDT
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 07:02:33 EDT
Leonid, are you able to reproduce the issue?
Comment 9 Leonid Natapov 2013-09-08 04:20:40 EDT
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 03:08:11 EDT
(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 05:51:09 EDT
Can you still reproduce this?
Comment 12 Leonid Natapov 2013-09-23 07:17:35 EDT
Sandro,I wasn't able to reproduce it with the latest RPMs.
Comment 13 Sandro Bonazzola 2013-09-23 07:23:15 EDT
Thanks Leonid, closing with insufficient data for reproducing this.
Please reopen if you see this again during your tests.

Note You need to log in before you can comment on or make changes to this bug.