Bug 1571467

Summary: HE deployment fails if fiber channel is used
Product: [oVirt] ovirt-hosted-engine-setup Reporter: Phillip Bailey <phbailey>
Component: GeneralAssignee: Ido Rosenzwig <irosenzw>
Status: CLOSED CURRENTRELEASE QA Contact: Nikolai Sednev <nsednev>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 2.2.16CC: bugs, cshao, dfediuck, mperina, nsednev, omachace, pbalogh, phbailey, rbarry, stirabos, weiwang, ycui, yzhao
Target Milestone: ovirt-4.2.3Keywords: Regression, Triaged
Target Release: ---Flags: nsednev: needinfo-
rule-engine: ovirt-4.2+
ykaul: blocker+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-hosted-engine-setup-2.2.20-1.el7ev Doc Type: Bug Fix
Doc Text:
Cause: Ansible regression of support FC Fix: Ansible fixed the issue on version 2.5.2
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-10 06:27:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1455169, 1458709, 1565591    
Attachments:
Description Flags
create_storage_domain playbook output none

Description Phillip Bailey 2018-04-24 21:39:42 UTC
Created attachment 1426279 [details]
create_storage_domain playbook output

Description of problem:
Hosted engine deployment via the CLI fails if fiber channel storage is selected.

Version-Release number of selected component (if applicable):
ovirt-hosted-engine-setup-2.3.0-0.0.master.20180420134301.git84b8b4d.el7.centos.noarch
ovirt-engine-appliance.noarch 0:4.3-20180423.1.el7.centos

How reproducible:
100%

Steps to Reproduce:
1. Start deployment via CLI: hosted-engine --deploy
2. When prompted, enter "fc" for storage type
3. Select a LUN

Actual results:
Deployment fails with the following output:
[ ERROR ] TypeError: 'NoneType' object is not iterable     
[ ERROR ] fatal: [localhost]: FAILED! => {"changed": false, "msg": "'NoneType' object is not iterable"}

Expected results:
Deployment succeeds.

Additional info:
Deployment fails when deployment is run via the CLI installer, Cockpit, and when the create_storage_domain.yml playbook is run directly from the CLI.

When the playbook is run directly from the CLI, the following traceback is shown:
Traceback (most recent call last):
  File "/tmp/ansible_OiYjj0/ansible_module_ovirt_storage_domains.py", line 646, in main
    sd_id = storage_domains_module.create()['id']
  File "/tmp/ansible_OiYjj0/ansible_modlib.zip/ansible/module_utils/ovirt.py", line 578, in create
    self.build_entity(),
  File "/tmp/ansible_OiYjj0/ansible_module_ovirt_storage_domains.py", line 397, in build_entity
    ) if storage_type is not None else None
TypeError: 'NoneType' object is not iterable

See the attachment for the full output.

Comment 1 Yaniv Kaul 2018-04-25 07:10:50 UTC
How is this not a blocker?

Comment 2 Yaniv Kaul 2018-04-25 13:04:04 UTC
*** Bug 1571798 has been marked as a duplicate of this bug. ***

Comment 3 Phillip Bailey 2018-04-25 13:15:52 UTC
(In reply to Yaniv Kaul from comment #1)
> How is this not a blocker?

It is. Apparently, I don't have permissions to set the blocker flag, so Ryan took care of it for me.

Comment 4 Phillip Bailey 2018-04-25 13:16:29 UTC
(In reply to Yaniv Kaul from comment #1)
> How is this not a blocker?

It is. Apparently, I don't have permissions to set the blocker flag, so Ryan took care of it for me.

Comment 5 Nikolai Sednev 2018-04-25 13:39:12 UTC
I've also seen this very the same issue and reported it here https://bugzilla.redhat.com/show_bug.cgi?id=1571798.

Comment 6 Simone Tiraboschi 2018-04-26 07:45:19 UTC
That exception comes from ovirt_storage_domains module from ansible 2.5.

TASK [Add Fibre Channel storage domain] ***************************************************************************************************************************************************************************
task path: /usr/share/ovirt-hosted-engine-setup/ansible/create_storage_domain.yml:93
Using module file /usr/lib/python2.7/site-packages/ansible/modules/cloud/ovirt/ovirt_storage_domains.py
<127.0.0.1> ESTABLISH LOCAL CONNECTION FOR USER: root
<127.0.0.1> EXEC /bin/sh -c 'echo ~ && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /root/.ansible/tmp/ansible-tmp-1524589623.26-255893144053415 `" && echo ansible-tmp-1524589623.26-255893144053415="` echo /root/.ansible/tmp/ansible-tmp-1524589623.26-255893144053415 `" ) && sleep 0'
<127.0.0.1> PUT /root/.ansible/tmp/ansible-local-21558cLvO7r/tmpVMhJS7 TO /root/.ansible/tmp/ansible-tmp-1524589623.26-255893144053415/ovirt_storage_domains.py
<127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1524589623.26-255893144053415/ /root/.ansible/tmp/ansible-tmp-1524589623.26-255893144053415/ovirt_storage_domains.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c '/usr/bin/python2 /root/.ansible/tmp/ansible-tmp-1524589623.26-255893144053415/ovirt_storage_domains.py && sleep 0'
<127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1524589623.26-255893144053415/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
  File "/tmp/ansible_OiYjj0/ansible_module_ovirt_storage_domains.py", line 646, in main
    sd_id = storage_domains_module.create()['id']
  File "/tmp/ansible_OiYjj0/ansible_modlib.zip/ansible/module_utils/ovirt.py", line 578, in create
    self.build_entity(),
  File "/tmp/ansible_OiYjj0/ansible_module_ovirt_storage_domains.py", line 397, in build_entity
    ) if storage_type is not None else None
TypeError: 'NoneType' object is not iterable
 
fatal: [localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "backup": null,
            "comment": null,
            "critical_space_action_blocker": null,
            "data_center": "Default",
            "description": null,
            "destroy": null,
            "discard_after_delete": false,
            "domain_function": "data",
            "fcp": {
                "lun_id": "3600a09803830355a332b476777507230"
            },
            "fetch_nested": false,
            "format": null,
            "glusterfs": null,
            "host": "grey-vdsa.eng.lab.tlv.redhat.com",
            "id": null,
            "iscsi": null,
            "localfs": null,
            "name": "hosted_storage",
            "nested_attributes": [],
            "nfs": null,
            "poll_interval": 3,
            "posixfs": null,
            "state": "present",
            "timeout": 180,
            "wait": true,
            "warning_low_space": null,
            "wipe_after_delete": null
        }
    },
    "msg": "'NoneType' object is not iterable"
}

Anything we can do to avoid that?

Comment 7 Ondra Machacek 2018-04-26 07:51:33 UTC
PR fixing this issue was posted:

 https://github.com/ansible/ansible/pull/38882

Comment 8 Simone Tiraboschi 2018-04-26 08:14:19 UTC
(In reply to Ondra Machacek from comment #7)
> PR fixing this issue was posted:
> 
>  https://github.com/ansible/ansible/pull/38882

So, according to our current schedule, what do you suggest for 4.2.3?

Comment 9 Sandro Bonazzola 2018-04-26 10:15:12 UTC
(In reply to Simone Tiraboschi from comment #8)
> (In reply to Ondra Machacek from comment #7)
> > PR fixing this issue was posted:
> > 
> >  https://github.com/ansible/ansible/pull/38882
> 
> So, according to our current schedule, what do you suggest for 4.2.3?

Let's include the fix in ovirt-hosted-engine-setup, overriding ansible module with the one including the fix.

Comment 10 Martin Perina 2018-04-26 10:30:51 UTC
(In reply to Sandro Bonazzola from comment #9)
> (In reply to Simone Tiraboschi from comment #8)
> > (In reply to Ondra Machacek from comment #7)
> > > PR fixing this issue was posted:
> > > 
> > >  https://github.com/ansible/ansible/pull/38882
> > 
> > So, according to our current schedule, what do you suggest for 4.2.3?
> 
> Let's include the fix in ovirt-hosted-engine-setup, overriding ansible
> module with the one including the fix.

That's the only workaround we have, we will try to get the fix into 2.5.2 which should be released around 2-3 weeks from now

Comment 11 Simone Tiraboschi 2018-04-27 12:05:12 UTC
*** Bug 1572595 has been marked as a duplicate of this bug. ***

Comment 13 Nikolai Sednev 2018-05-03 16:27:52 UTC
Works for me on these components:
ovirt-hosted-engine-setup-2.2.20-1.el7ev.noarch
ovirt-hosted-engine-ha-2.2.11-1.el7ev.noarch
rhvm-appliance-4.2-20180427.0.el7.noarch
Linux 3.10.0-862.el7.x86_64 #1 SMP Wed Mar 21 18:14:51 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux Server release 7.5 (Maipo)

Comment 14 Sandro Bonazzola 2018-05-10 06:27:12 UTC
This bugzilla is included in oVirt 4.2.3 release, published on May 4th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.3 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.