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.
Please provide the answerfile that you used
Created attachment 1428959 [details] engines deploy answers file
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
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
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)
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.