Bug 1559793 - Deploy HE failed with static IP and empty DNS value on the [Generate static network configuration for the engine VM] task
Summary: Deploy HE failed with static IP and empty DNS value on the [Generate static n...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-hosted-engine-setup
Classification: oVirt
Component: General
Version: 2.2.14
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ovirt-4.2.3
: ---
Assignee: Simone Tiraboschi
QA Contact: meital avital
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-23 09:48 UTC by Yihui Zhao
Modified: 2018-05-10 06:30 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-10 06:30:43 UTC
oVirt Team: Integration
Embargoed:
rule-engine: ovirt-4.2+
ylavi: blocker+
rule-engine: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 89371 0 master MERGED ansible: avoid failing on wrong DNS_ADDR 2018-09-03 09:34:13 UTC
oVirt gerrit 89380 0 ovirt-hosted-engine-setup-2.2 MERGED ansible: avoid failing on wrong DNS_ADDR 2018-03-23 15:43:56 UTC
oVirt gerrit 89468 0 master POST wizard: Make DNS field required for static network configs 2018-03-26 21:27:08 UTC

Description Yihui Zhao 2018-03-23 09:48:03 UTC
Description of problem: 
Deploy HE failed with static IP on the [Generate static network configuration for the engine VM] task

"""
[ INFO ] TASK [Generate static network configuration for the engine VM]
[ ERROR ] fatal: [localhost]: FAILED! => {"changed": false, "msg": "AnsibleError: Unexpected templating type error occurred on (# generated by ovirt-hosted-engine-setup\nBOOTPROTO=none\nDEVICE=eth0\nHWADDR={{ VM_MAC_ADDR }}\nONBOOT=yes\nTYPE=Ethernet\nUSERCTL=no\nZONE=public\nIPADDR={{ VM_IP_ADDR }}\nPREFIX={{ VM_IP_PREFIX }}\nGATEWAY={{ GATEWAY }}\n{% for d in DNS_ADDR %}\nDNS{{loop.index}}={{ d }}\n{% endfor %}\nDEFROUTE=yes\nIPV4_FAILURE_FATAL=no\nIPV6INIT=no\nNM_CONTROLLED=no): 'NoneType' object is not iterable"}
"""

From the log:
2018-03-23 17:17:36,836+0800 ERROR ansible failed {'status': 'FAILED', 'ansible_type': 'task', 'ansible_task': u'Generate static network configuration for the engine VM', 'ansible_result': u'type: <type \'dict\'>\nstr: {\'msg\': u"AnsibleError: Unexpected templating type error occurred on (# generated by ovirt-hosted-engine-setup\\nBOOTPROTO=none\\nDEVICE=eth0\\nHWADDR={{ VM_MAC_ADDR }}\\nONBOOT=yes\\nTYPE=Ethernet\\nUSERCTL=no\\nZONE=public\\nIPADDR={{ VM_IP_ADDR }}\\nPREFIX={{ VM_IP_PREFIX }}\\nGATEWAY={{ GATEWAY }}\\n{% for\nrepr: {\'msg\': u"AnsibleError: Unexpected templating type error occurred on (# generated by ovirt-hosted-engine-setup\\nBOOTPROTO=none\\nDEVICE=eth0\\nHWADDR={{ VM_MAC_ADDR }}\\nONBOOT=yes\\nTYPE=Ethernet\\nUSERCTL=no\\nZONE=public\\nIPADDR={{ VM_IP_ADDR }}\\nPREFIX={{ VM_IP_PREFIX }}\\nGATEWAY={{ GATEWAY }}\\n{% for\ndir: [\'__class__\', \'__cmp__\', \'__contains__\', \'__delattr__\', \'__delitem__\', \'__doc__\', \'__eq__\', \'__format__\', \'__ge__\', \'__getattribute__\', \'__getitem__\', \'__gt__\', \'__hash__\', \'__init__\', \'__iter__\', \'__le__\', \'__len__\', \'__lt__\', \'__ne__\', \'__new__\', \'__reduce__\', \'__reduce_ex__\', \'__repr__\', \'__setattr__\', \'__setitem__\', \'__sizeof__\', \'__str__\', \'__subclasshook__\', \'clear\', \'copy\', \'fromkeys\', \'get\', \'has_key\', \'items\', \'iteritems\', \'iterkeys\', \'itervalues\', \'keys\', \'pop\', \'popitem\', \'setdefault\', \'update\', \'values\', \'viewitems\', \'viewkeys\', \'viewvalues\']\npprint: {\'_ansible_no_log\': False,\n \'changed\': False,\n \'msg\': u"AnsibleError: Unexpected templating type error occurred on (# generated by ovirt-hosted-engine-setup\\nBOOTPROTO=none\\nDEVICE=eth0\\nHWADDR={{ VM_MAC_ADDR }}\\nONBOOT=yes\\nTYPE=Ethernet\\nUSERCTL=no\\nZONE=public\\nIPADDR={{ VM_IP_ADDR }}\\nPREFIX={{ \n{\'msg\': u"AnsibleError: Unexpected templating type error occurred on (# generated by ovirt-hosted-en.__doc__: "dict() -> new empty dictionary\\ndict(mapping) -> new dictionary initialized from a mapping object\'s\\n    (key, value) pairs\\ndict(iterable) -> new dictionary initialized as if via:\\n    d = {}\\n    for k, v in iterable:\\n        d[k] = v\\ndict(**kwargs) -> new dictionary initialized with the name=value pairs\\n    in the keyword argument list.  For example:  dict(one=1, two=2)"\n{\'msg\': u"AnsibleError: Unexpected templating type error occurred on (# generated by ovirt-hosted-en.__hash__: None', 'ansible_host': u'localhost', 'ansible_playbook': u'/usr/share/ovirt-hosted-engine-setup/ansible/create_target_vm.yml'}


Version-Release number of selected component (if applicable): 
rhvh-4.2.2.0-0.20180322.0+1
cockpit-ovirt-dashboard-0.11.19-1.el7ev.noarch
ovirt-hosted-engine-setup-2.2.14-1.el7ev.noarch
ovirt-hosted-engine-ha-2.2.7-1.el7ev.noarch
rhvm-appliance-4.2-20180322.0.el7.noarch


How reproducible: 
100%


Steps to Reproduce: 
1. Deploy HE with static IP from the cockpit with ansible

Actual results:  
1. Deploy HE failed on the [Generate static network configuration for the engine VM] task.

Expected results: 
Ansible deployment successfully.

Additional info:

Comment 1 Simone Tiraboschi 2018-03-23 09:56:53 UTC
(In reply to Yihui Zhao from comment #0)
> {% for d in DNS_ADDR
> %}\nDNS{{loop.index}}={{ d }}\n{% endfor
> %}\nDEFROUTE=yes\nIPV4_FAILURE_FATAL=no\nIPV6INIT=no\nNM_CONTROLLED=no):
> 'NoneType' object is not iterable"}

Did you set any value in the DNS address filed in cockpit or was it empty?

Comment 2 Yihui Zhao 2018-03-23 10:10:21 UTC
(In reply to Simone Tiraboschi from comment #1)
> (In reply to Yihui Zhao from comment #0)
> > {% for d in DNS_ADDR
> > %}\nDNS{{loop.index}}={{ d }}\n{% endfor
> > %}\nDEFROUTE=yes\nIPV4_FAILURE_FATAL=no\nIPV6INIT=no\nNM_CONTROLLED=no):
> > 'NoneType' object is not iterable"}
> 
> Did you set any value in the DNS address filed in cockpit or was it empty?

Set it empty.

By the way, Use the CLI, it may have the defualt DNS address.

Comment 3 Simone Tiraboschi 2018-03-23 10:43:35 UTC
(In reply to Yihui Zhao from comment #2)
> > Did you set any value in the DNS address filed in cockpit or was it empty?
> 
> Set it empty.

OK, it work as expected if a DNS address is supplied.

> By the way, Use the CLI, it may have the defualt DNS address.

The CLI is proposing host DNS addresses as the default value, I think that cockpit wizard should do the same.

I think we should also make the DNS value mandatory if the user chooses static IP configuration for the engine VM.

Comment 4 Yihui Zhao 2018-03-23 10:46:54 UTC
(In reply to Simone Tiraboschi from comment #3)
> (In reply to Yihui Zhao from comment #2)
> > > Did you set any value in the DNS address filed in cockpit or was it empty?
> > 
> > Set it empty.
> 
> OK, it work as expected if a DNS address is supplied.
> 
> > By the way, Use the CLI, it may have the defualt DNS address.
> 
> The CLI is proposing host DNS addresses as the default value, I think that
> cockpit wizard should do the same.

I agree.

> 
> I think we should also make the DNS value mandatory if the user chooses
> static IP configuration for the engine VM.

OK, I will try another test with the spicified DNS address, if finished, I will give the update.

Comment 5 Yihui Zhao 2018-04-19 05:38:49 UTC
Tested with cockpit-ovirt-dashboard-0.11.22-1.el7ev.noarch:

When using the static IP from cockpit, the DNS SERVER field is set as the Required field. Need the user to input the value manually.


So, moving to verified.

Comment 6 Sandro Bonazzola 2018-05-10 06:30:43 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.


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