Metric store deployment failed on task oVirt.origin-on-ovirt/tasks/build_vm_list.yml

Solution Verified - Updated -

Issue

Metric store deployment failed on task oVirt.origin-on-ovirt/tasks/build_vm_list.yml with the following error:

2019-09-10 09:40:31,444 p=17812 u=root |  TASK [/usr/share/ansible/roles/oVirt.metrics/roles/oVirt.origin-on-ovirt : fail] *************************************************************************************************************************************************************
2019-09-10 09:40:31,444 p=17812 u=root |  task path: /usr/share/ansible/roles/oVirt.metrics/roles/oVirt.origin-on-ovirt/tasks/build_vm_list.yml:4
2019-09-10 09:40:31,461 p=17812 u=root |  skipping: [localhost] => {
    "changed": false, 
    "skip_reason": "Conditional result was False"
}
2019-09-10 09:40:31,495 p=17812 u=root |  TASK [/usr/share/ansible/roles/oVirt.metrics/roles/oVirt.origin-on-ovirt : Create virtual machine list fact] *********************************************************************************************************************************
2019-09-10 09:40:31,495 p=17812 u=root |  task path: /usr/share/ansible/roles/oVirt.metrics/roles/oVirt.origin-on-ovirt/tasks/build_vm_list.yml:9
2019-09-10 09:40:31,517 p=17812 u=root |  fatal: [localhost]: FAILED! => {
    "msg": "An unhandled exception occurred while running the lookup plugin 'template'. Error was a <class 'ansible.errors.AnsibleError'>, original message: template error while templating string: Encountered unknown tag 'do'. Jinja was looking for the following tags: 'endfor' or 'else'. The innermost block that needs to be closed is 'for'.. String: [{% for item in openshift_ovirt_vm_manifest -%}\n  {% for iter in range(item.count) -%}\n    {\n      'name':         '{{ [item.name, iter, \".\", openshift_ovirt_dns_zone] | join }}',\n      'host_name':    '{{ (item.empty_hostname | default(True)) | ternary('', [item.name, iter, \".\", openshift_ovirt_dns_zone] | join) }}',\n      'description':  '{{ item.description | default('') }}',\n      {%- if ovirt_admin | default(True) -%}\n      'tag':          '{{ [\"openshift_\", item.profile] | join }}',\n      {%- endif -%}\n      'profile':      {{ openshift_ovirt_vm_profile[ item.profile ] }},\n      {%- set cloud_init = {} -%}\n      {%- do cloud_init.update(\n        {\n          'nic_boot_protocol': 'static',\n          'nic_ip_address': item.nic_mode[item[\"name\"] + iter | string ][\"nic_ip_address\"],\n          'nic_netmask':    item.nic_mode[item[\"name\"] + iter | string ][\"nic_netmask\"],\n          'nic_gateway':    item.nic_mode[item[\"name\"] + iter | string ][\"nic_gateway\"],\n          'nic_on_boot':    item.nic_mode[item[\"name\"] + iter | string ][\"nic_on_boot\"] | default(true) | bool,\n          'nic_name':       item.nic_mode[item[\"name\"] + iter | string ][\"nic_name\"] | default(\"eth0\"),\n        }) if item.nic_mode is defined -%}\n\n      {%- do cloud_init.update(\n        {\n          'dns_servers': item.nic_mode[item[\"name\"] + iter | string ][\"dns_servers\"],\n        }\n      ) if item.nic_mode is defined and item.nic_mode[item[\"name\"] + iter | string ][\"dns_servers\"] is defined -%}\n      {%- do cloud_init.update(\n        {\n          'dns_search': item.nic_mode[item[\"name\"] + iter | string ][\"dns_search\"],\n        }\n      ) if item.nic_mode is defined and item.nic_mode[item[\"name\"] + iter | string ][\"dns_search\"] is defined -%}\n      {%- do cloud_init.update(\n        {\n          'dns_servers': item[\"dns_servers\"]\n        }\n      ) if item.dns_servers is defined -%}\n      {%- do cloud_init.update(\n        {\n          'dns_search': item[\"dns_search\"]\n        }\n      ) if item.dns_search is defined -%}\n      'cloud_init': {{ cloud_init | combine(openshift_ovirt_vm_profile[item.profile][\"cloud_init\"], recursive=True) }},\n      },\n  {% endfor -%}\n{% endfor -%}\n]\n"
}

Environment

  • RHV-M 4.3.5
  • Ansible 2.8.4
  • ovirt-engine-metrics-1.3.3.3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content