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:
(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?
(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.
(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.
(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.
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.
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.