Bug 1573074 - The deployment fails on create_storage_domain stage when using generated answers
Summary: The deployment fails on create_storage_domain stage when using generated answers
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-hosted-engine-setup
Classification: oVirt
Component: General
Version: 2.2.16
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ovirt-4.2.4
: 2.2.21
Assignee: Ido Rosenzwig
QA Contact: Natalie Gavrielov
URL:
Whiteboard:
Depends On:
Blocks: ovirt-hosted-engine-setup-2.2.22
TreeView+ depends on / blocked
 
Reported: 2018-04-30 06:29 UTC by Sam McLeod
Modified: 2018-06-26 08:39 UTC (History)
4 users (show)

Fixed In Version: ovirt-hosted-engine-setup-2.2.21
Clone Of:
Environment:
Last Closed: 2018-06-26 08:39:37 UTC
oVirt Team: Integration
Embargoed:
rule-engine: ovirt-4.2+
rule-engine: exception+


Attachments (Terms of Use)
engines deploy answers file (2.69 KB, text/plain)
2018-04-30 22:02 UTC, Sam McLeod
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1556866 0 urgent CLOSED The deployment fails on create_storage_domain stage 2021-02-22 00:41:40 UTC
oVirt gerrit 91259 0 master MERGED Ansible: Fix iscsi SD deployment issue via answerfile 2018-09-03 09:32:57 UTC
oVirt gerrit 91436 0 ovirt-hosted-engine-setup-2.2 MERGED Ansible: Fix iscsi SD deployment issue via answerfile 2018-05-21 14:31:13 UTC

Description Sam McLeod 2018-04-30 06:29:52 UTC
Description of problem:

hosted-engine --deploy fails on the create_storage_domain stage when using storage domain in answers.conf

Looks to be similar to https://bugzilla.redhat.com/show_bug.cgi?id=1556866

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

ovirt-hosted-engine-setup-2.2.16-1.el7.centos.noarch

How reproducible:

Every time an answers file is provided.

Steps to Reproduce:
1. Set the default value of `OVEHOSTED_STORAGE/storageDomainName=str:hosted_storage` in answers.conf
2. Run hosted-engine --deploy --config-append=answers.conf

Actual results:

[ INFO  ] TASK [Add iSCSI storage domain]
[ ERROR ] fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'None' has no attribute 'split'\n\nThe error appears to have been in '/usr/share/ovirt-hosted-engine-setup/ansible/create_storage_domain.yml': line 71, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n    register: otopi_storage_domain_details\n  - name: Add iSCSI storage domain\n    ^ here\n"}

Expected results:

As the line `OVEHOSTED_STORAGE/storageDomainName=str:hosted_storage was generated from a successful interactive deployment, I would expect it to work when provided in an answers.conf file.

Comment 1 Ido Rosenzwig 2018-04-30 07:21:09 UTC
Please provide the answerfile that you used

Comment 2 Sam McLeod 2018-04-30 22:02:27 UTC
Created attachment 1428959 [details]
engines deploy answers file

Comment 3 Sam McLeod 2018-05-01 03:07:24 UTC
Removing the split from STORAGE_DOMAIN_ADDR and ISCSI_PORTAL_PORT in /usr/share/ovirt-hosted-engine-setup/ansible/create_storage_domain.yml provides more insight into the issue, suggesting that STORAGE_DOMAIN_ADDR is empty for some reason.


Looking in /usr/share/ovirt-hosted-engine-setup/plugins/gr-he-ansiblesetup/core/target_vm.py, it appears STORAGE_DOMAIN_ADDR address is STORAGE_DOMAIN_CONNECTION:

storage_domain_address = self.environment[
  ohostedcons.StorageEnv.STORAGE_DOMAIN_CONNECTION
]

In answers.conf it is set (by a successful deployment, not by hand):

OVEHOSTED_STORAGE/storageDomainConnection=str:10.51.10.10

Comment 4 Sam McLeod 2018-05-01 05:02:26 UTC
Interestingly if I remove the following OVEHOSTED_STORAGE parameters from the answers file but provide the *exact same* input when prompted - the deploy succeeds.

OVEHOSTED_STORAGE/iSCSIPortalPort=str:3260
OVEHOSTED_STORAGE/iSCSIPortal=str:1
OVEHOSTED_STORAGE/storageDomainConnection=str:10.51.10.10
OVEHOSTED_STORAGE/iSCSIPortalIPAddress=str:10.51.10.10
OVEHOSTED_STORAGE/iSCSITargetName=str:iqn.2003-01.org.linux-iscsi.s1-san5.x8664:sn.a70bc7bf74e5
OVEHOSTED_STORAGE/LunID=str:3600140521be786300000000000000000

Comment 5 Natalie Gavrielov 2018-06-07 11:39:07 UTC
Verified (automation: rhv-ge-deploy-4.2 #1529)
deployment using answer file that includes parameters:
OVEHOSTED_STORAGE/storageDatacenterName
OVEHOSTED_STORAGE/domainType
OVEHOSTED_STORAGE/LunID
OVEHOSTED_STORAGE/storageDomainConnection
OVEHOSTED_STORAGE/iSCSIPortalIPAddress
OVEHOSTED_STORAGE/iSCSIPortalPort
OVEHOSTED_STORAGE/iSCSIPortalUser
OVEHOSTED_STORAGE/iSCSIPortal
OVEHOSTED_STORAGE/iSCSITargetName
OVEHOSTED_STORAGE/storageDomainName

Build: ovirt-engine-4.2.3.4-0.1.el7.noarch (rhv-4.2.4-2)

Comment 6 Sandro Bonazzola 2018-06-26 08:39:37 UTC
This bugzilla is included in oVirt 4.2.4 release, published on June 26th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.4 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


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