DPDK deploy failed

Bug #1908850 reported by wu.chunyang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
Fix Released
Medium
wu.chunyang

Bug Description

TASK [Install ovs-dpdkctl service and config] **************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "An unhandled exception occurred while templating '{% if neutron_bridge_name.split(',')|length != 1 %} {neutron_bridge_name.split(',')[0]}:{{ tunnel_interface_cidr }} {% else %} {{ neutron_bridge_name }}:{{ tunnel_interface_cidr }} {% endif %}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while templating '{{dpdk_tunnel_interface_address}}/{{ tunnel_interface_network | ipaddr('prefix') }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while templating '{{ 'dpdk_tunnel' | kolla_address }}'. Error was a <class 'kolla_ansible.exception.FilterError'>, original message: Interface name undefined for network 'dpdk_tunnel' (set 'dpdk_tunnel_interface')"}

dpdk_tunnel is a role variable, and kolla_address filter get this value from host. so kolla_address
filter will not get the right variable.

solution:
move dpdk_tunnel to host variable(groups/all.yml), and add dpdk_tunnel_address_family variable

wu.chunyang (wuchunyang)
Changed in kolla-ansible:
assignee: nobody → wu.chunyang (wuchunyang)
importance: Undecided → Medium
milestone: none → 12.0.0
Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Or we should perhaps fix the filter itself to look in the correct scopes.

Revision history for this message
wu.chunyang (wuchunyang) wrote :

good point.

i fix this by moving to all.yml now. but i will try to fix kolla_address filter. thanks

Revision history for this message
wu.chunyang (wuchunyang) wrote :

Add dpdk_tunnel_address_family to role vars cannot fix this issue. see:

root@openstack:~/kolla-ansible# ./tools/kolla-ansible deploy -i /root/all-in-one --tags ovs-dpdk

TASK [ovs-dpdk : Install ovs-dpdkctl service and config] ***********************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"msg": "An unhandled exception occurred while templating '{% if neutron_bridge_name.split(',')|length != 1 %} {neutron_bridge_name.split(',')[0]}:{{ tunnel_interface_cidr }} {% else %} {{ neutron_bridge_name }}:{{ tunnel_interface_cidr }} {% endif %}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while templating '{{ dpdk_tunnel_interface_address }}/{{ tunnel_interface_network | ipaddr('prefix') }}'. Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while templating '{{ 'dpdk_tunnel' | kolla_address }}'. Error was a <class 'kolla_ansible.exception.FilterError'>, original message: Interface name undefined for network 'dpdk_tunnel' (set 'dpdk_tunnel_interface')"}

git diff message:

(kolla-deploy) root@openstack:~/kolla-ansible# git diff
diff --git a/ansible/roles/ovs-dpdk/defaults/main.yml b/ansible/roles/ovs-dpdk/defaults/main.yml
index a85781e3e..4a43f9086 100644
--- a/ansible/roles/ovs-dpdk/defaults/main.yml
+++ b/ansible/roles/ovs-dpdk/defaults/main.yml
@@ -40,6 +40,7 @@ ovsdpdk_services:
 ovs_bridge_mappings: "{% for bridge in neutron_bridge_name.split(',') %}physnet{{ loop.index0 + 1 }}:{{ bridge }}{% if not loop.last %},{% endif %}{% endfor %}"
 ovs_port_mappings: "{% for bridge in neutron_bridge_name.split(',') %} {{ neutron_external_interface.split(',')[loop.index0] }}:{{ bridge }}{% if not loop.last %},{% endif %}{% endfor %}"
 dpdk_tunnel_interface: "{{ neutron_external_interface }}"
+dpdk_tunnel_address_family: "{{ network_address_family }}"
 dpdk_tunnel_interface_address: "{{ 'dpdk_tunnel' | kolla_address }}"

Revision history for this message
Mark Goddard (mgoddard) wrote :

Yes, you are right. Role defaults are not visible in hostvars: https://github.com/markgoddard/ansible-experiments/blob/master/12-hostvars-variables/README.md

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 9.3.1

This issue was fixed in the openstack/kolla-ansible 9.3.1 release.

wu.chunyang (wuchunyang)
Changed in kolla-ansible:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 12.0.0.0rc1

This issue was fixed in the openstack/kolla-ansible 12.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 11.1.0

This issue was fixed in the openstack/kolla-ansible 11.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla-ansible 10.3.0

This issue was fixed in the openstack/kolla-ansible 10.3.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.