Bug 1324520 - [RFE] Allow to skip tty check to allow for unattended install via Ansible
Summary: [RFE] Allow to skip tty check to allow for unattended install via Ansible
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-hosted-engine-setup
Classification: oVirt
Component: General
Version: 1.3.5.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-3.6.6
: 1.3.6.1
Assignee: Lev Veyde
QA Contact: Artyom
URL:
Whiteboard:
: 1341322 (view as bug list)
Depends On:
Blocks: Gluster-HC-1 1330523
TreeView+ depends on / blocked
 
Reported: 2016-04-06 14:12 UTC by Sahina Bose
Modified: 2017-05-11 09:23 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Option was added to skip tty availability. Reason: We want to support automated installations by Ansible. Result: It's now possible to provide option to skip tty check.
Clone Of:
Environment:
Last Closed: 2016-05-30 10:52:51 UTC
oVirt Team: Integration
Embargoed:
rule-engine: ovirt-3.6.z+
mgoldboi: planning_ack+
sbonazzo: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 56113 0 master MERGED setup: add option to skip tty check 2016-05-03 10:34:37 UTC
oVirt gerrit 56970 0 ovirt-hosted-engine-setup-1.3 MERGED setup: add option to skip tty check 2016-05-03 12:14:48 UTC

Description Sahina Bose 2016-04-06 14:12:50 UTC
Description of problem:

In order to allow setup of host via Ansible, hosted-engine deploy command is called via Ansible shell.
This is stuck due to below error:

stdout: [ INFO  ] Stage: Initializing
[ INFO  ] Generating a temporary VNC password.
[ INFO  ] Stage: Environment setup
          Configuration files: ['/tmp/hosted-engine-answer-file.conf']
          Log file: /var/log/ovirt-hosted-engine-setup/ovirt-hosted-engine-setup-20160406050029-0syzjx.log
          Version: otopi-1.4.1 (otopi-1.4.1-1.el7.centos)
[ ERROR ] It has been detected that this program is executed through an SSH connection without pseudo-tty allocation. Please run again ssh adding -t option 
[WARNING] Aborted
[ INFO  ] Stage: Clean up
[ INFO  ] Generating answer file '/var/lib/ovirt-hosted-engine-setup/answers/answers-20160406050029.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Hosted Engine deployment failed: this system is not reliable, please check the issue, fix and redeploy
          Log file is located at /var/log/ovirt-hosted-engine-setup/ovirt-hosted-engine-setup-20160406050029-0syzjx.log




Version-Release number of selected component (if applicable):
3.6

How reproducible:


Steps to Reproduce:
Run via ansible

Comment 1 Sandro Bonazzola 2016-04-06 14:21:33 UTC
Lev, see also mailing list discussion starting at http://lists.ovirt.org/pipermail/users/2016-April/038842.html

In particular:
http://lists.ovirt.org/pipermail/users/2016-April/038882.html

relevant plugin is ovirt-hosted-engine-setup/core/shell.py

Comment 2 Yaniv Kaul 2016-04-07 12:32:30 UTC
Fixed flags and target milestone - this should go first to 4.0, then backported to 3.6.6.

Comment 3 Sandro Bonazzola 2016-04-08 05:23:37 UTC
(In reply to Yaniv Kaul from comment #2)
> Fixed flags and target milestone - this should go first to 4.0, then
> backported to 3.6.6.

In oVirt if you want a bug fixed in 3.6.6 you have 2 ways:
1) set target milestone 3.6.6 and set both 3.6.z and 4.0.0 flags:
 - the bug will be fixed in 4.0.0 and then cloned to 3.6.6 once in modified state for 4.0.0
 - the bug will be verified both in 4.0.0 and in 3.6.6

2) set target milestone to 3.6.6 and set only 3.6.z flag
 - the bug will be fixed in 4.0.0 first, then in 3.6.6
 - the bug will be verified in 3.6.6 only assuming it works also on 4.0.0.

with current settings, this bug will be fixed in 4.0.0 only and bugzilla complains 3.6.z flag has been set with wrong milestone.

According to your comment, I'm resetting target milestone to 3.6.6 and require QE to test both 4.0.0 and 3.6.6.

Comment 4 Artyom 2016-05-08 08:21:20 UTC
Verified on ovirt-hosted-engine-setup-1.3.6.1-1.el7ev.noarch

Run without config and pseudo-tty:
[ INFO  ] Stage: Initializing
[ INFO  ] Generating a temporary VNC password.
[ INFO  ] Stage: Environment setup
          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]: 
          Configuration files: []
          Log file: /var/log/ovirt-hosted-engine-setup/ovirt-hosted-engine-setup-20160508111718-9sg3a1.log
          Version: otopi-1.4.1 (otopi-1.4.1-1.el7ev)
[ ERROR ] It has been detected that this program is executed through an SSH connection without pseudo-tty allocation. Please run again ssh adding -t option 
[WARNING] Aborted
[ INFO  ] Stage: Clean up
[ INFO  ] Generating answer file '/var/lib/ovirt-hosted-engine-setup/answers/answers-20160508111723.conf'
[ INFO  ] Stage: Pre-termination
[ INFO  ] Stage: Termination
[ ERROR ] Hosted Engine deployment failed: this system is not reliable, please check the issue, fix and redeploy
          Log file is located at /var/log/ovirt-hosted-engine-setup/ovirt-hosted-engine-setup-20160508111718-9sg3a1.log



run without pseudo-tty but with answer file
[environment:default]
OVEHOSTED_CORE/skipTTYCheck=bool:True

[ INFO  ] Stage: Initializing
[ INFO  ] Generating a temporary VNC password.
[ INFO  ] Stage: Environment setup
          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]: 
          Configuration files: ['/tmp/answers']
          Log file: /var/log/ovirt-hosted-engine-setup/ovirt-hosted-engine-setup-20160508111856-vl1ysg.log
          Version: otopi-1.4.1 (otopi-1.4.1-1.el7ev)
          It has been detected that this program is executed through an SSH connection without using screen.
          Continuing with the installation may lead to broken installation if the network connection fails.
          It is highly recommended to abort the installation and run it inside a screen session using command "screen".
          Do you want to continue anyway? (Yes, No)[No]:

Comment 5 Yedidyah Bar David 2016-06-01 06:01:33 UTC
*** Bug 1341322 has been marked as a duplicate of this bug. ***


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