Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1334920 - Answer file is not fetched from first host if you specify the first host root password in the second host's answer file
Summary: Answer file is not fetched from first host if you specify the first host root...
Keywords:
Status: CLOSED DUPLICATE of bug 1322729
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-hosted-engine-setup
Version: 3.6.5
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
: ---
Assignee: Sandro Bonazzola
QA Contact: meital avital
URL:
Whiteboard:
Depends On:
Blocks: RHEV-RHCI
TreeView+ depends on / blocked
 
Reported: 2016-05-10 19:39 UTC by Fabian von Feilitzsch
Modified: 2016-05-17 21:01 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-17 21:01:31 UTC
oVirt Team: Integration


Attachments (Terms of Use)

Description Fabian von Feilitzsch 2016-05-10 19:39:18 UTC
Description of problem:
When running hosted-engine --deploy for the second+ host, if you specify the root password for the first host in the answer file (OVEHOSTED_FIRST_HOST/rootPassword), the answer file is never fetched, and the installer fails with a Nonetype is not iterable error.

Version-Release number of selected component (if applicable):
Using this package: ovirt-hosted-engine-setup-1.3.5.0-1.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Do self-hosted deploy on first host
2. Attempt an unattended installation on a second host, specifying all answers in the answer file.

Actual results:
NoneType is not iterable, the installation fails

Expected results:
The installation does not fail, and proceeds with the answer file from the first host.

Additional info:

I got this working locally, by modifying the _fetch_answer file in /usr/share/ovirt-hosted-engine-setup/plugins/ovirt-hosted-engine-setup/core/remote_answerfile.py. The while loop there iterates as long as the password is none, which is never true if it's specified in the answer file, so that part is skipped and the answer file is never copied. I just added ` or self._tmp_ans is None` to the while conditional check, and added an else branch to the conditional directly below that which sets password to self.environment[ohostedcons.FirstHostEnv.ROOT_PASSWORD]. Here is the whole modified block (starting on line 121):

while self.environment[ohostedcons.FirstHostEnv.ROOT_PASSWORD] is None or self._tmp_ans is None:
    if interactive:
        password = self.dialog.queryString(
            name='HOST_FIRST_HOST_ROOT_PASSWORD',
            note=_(
                "Enter 'root' user password for host {fqdn}: "
            ).format(
                fqdn=fqdn,
            ),
            prompt=True,
            hidden=True,
        )
    else:
        password = self.environment[ohostedcons.FirstHostEnv.ROOT_PASSWORD]

 

Here is my answer file:

[environment:default]
OVEHOSTED_CORE/confirmSettings=bool:True
OVEHOSTED_CORE/deployProceed=bool:True
OVEHOSTED_CORE/screenProceed=bool:True
OVEHOSTED_CORE/isAdditionalHost=bool:True
OVEHOSTED_STORAGE/domainType=str:nfs3
OVEHOSTED_STORAGE/storageDomainConnection=str:<host>:<path>
OVEHOSTED_STORAGE/storageDomainName=str:my_storage
OVEHOSTED_STORAGE/hostID=str:2
OVEHOSTED_ENGINE/appHostName=str:hosted_engine_2
OVEHOSTED_ENGINE/adminPassword=str:<password>
OVEHOSTED_FIRST_HOST/fqdn=str:rhevh.example.com
OVEHOSTED_FIRST_HOST/fetchAnswer=bool:True
OVEHOSTED_FIRST_HOST/rootPassword=str:<password>

Comment 1 Fabian von Feilitzsch 2016-05-10 19:43:06 UTC
This issue is impacting the ability to deploy self hosted by the Quickstart Cloud Installer (Red Hat Cloud Suite).

Comment 2 Simone Tiraboschi 2016-05-17 21:01:31 UTC

*** This bug has been marked as a duplicate of bug 1322729 ***


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