Octavia config drop fails on multiple hosts

Bug #1755929 reported by Shannon Mitchell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
High
German Eichberger

Bug Description

When using multiple octavia containers, it looks like certain tasks were limited to the first host in the inventory. This is causing failures on the 'Drop octavia Config' task in the octavia_post_install.yml run. Only one host passes with 2 failures due to those two not having the facts set in either the octavia_flavor_create.yml or octavia_mgmt_network.yml set of tasks. This is on pike, but looks the same in master.

root@infra1:/etc/ansible/roles/os_octavia# grep flavor_create /etc/ansible/roles/os_octavia/tasks/main.yml -A3
- include: octavia_flavor_create.yml
  when:
    - inventory_hostname == groups['octavia_all'][0]
    - octavia_nova_flavor_uuid is not defined

root@infra1:/etc/ansible/roles/os_octavia# grep mgmt_network /etc/ansible/roles/os_octavia/tasks/main.yml -A3
- include: octavia_mgmt_network.yml
  when:
    - inventory_hostname == groups['octavia_all'][0]
    - octavia_neutron_management_network_uuid is not defined

root@infra1:/etc/ansible/roles/os_octavia# grep 'Drop octavia Config' /etc/ansible/roles/os_octavia/tasks/octavia_post_install.yml -A24
- name: Drop octavia Config(s)
  config_template:
    src: "{{ item.src }}"
    dest: "{{ item.dest }}"
    owner: "{{ octavia_system_user_name }}"
    group: "{{ octavia_system_group_name }}"
    mode: "0640"
    config_overrides: "{{ item.config_overrides }}"
    config_type: "{{ item.config_type }}"
  with_items:
    - src: "octavia.conf.j2"
      dest: "/etc/octavia/octavia.conf"
      config_overrides: "{{ octavia_octavia_conf_overrides }}"
      config_type: "ini"
# - src: "api-paste.ini.j2"
# dest: "/etc/octavia/api-paste.ini"
# config_overrides: "{{ octavia_api_paste_ini_overrides }}"
# config_type: "ini"
# - src: "policy.json.j2"
# dest: "/etc/octavia/policy.json"
# config_overrides: "{{ octavia_policy_overrides }}"
# config_type: "json"
  notify:
    - Restart octavia services

root@infra1:/etc/ansible/roles/os_octavia# egrep '(flavor|neutron_management)' /etc/ansible/roles/os_octavia/templates/octavia.conf.j2
lb_network_name = {{ octavia_neutron_management_network_uuid }}
amp_flavor_id = {{ octavia_nova_flavor_uuid }}
amp_boot_network_list = {{ octavia_neutron_management_network_uuid }}

# Playbook output example on failure

TASK [os_octavia : Drop octavia Config(s)] *******************************************************************************************************************************************************
Wednesday 14 March 2018 16:53:17 -0500 (0:00:00.053) 0:01:33.771 *******
ok: [infra1_octavia_server_container-fc170e9d] => (item={u'dest': u'/etc/octavia/octavia.conf', u'src': u'octavia.conf.j2', u'config_type': u'ini', u'config_overrides': {}})
fatal: [infra2_octavia_server_container-dad89476]: FAILED! => {"failed": true, "msg": "'octavia_neutron_management_network_uuid' is undefined"}
fatal: [infra3_octavia_server_container-89dc18aa]: FAILED! => {"failed": true, "msg": "'octavia_neutron_management_network_uuid' is undefined"}

# Workaround used for a quick fix

root@infra1:/etc/ansible/roles/os_octavia# egrep '(flavor|neutron_management)' /etc/ansible/roles/os_octavia/templates/octavia.conf.j2
lb_network_name = {{ hostvars[groups['octavia_all'][0]]['octavia_neutron_management_network_uuid'] }}
amp_flavor_id = {{ hostvars[groups['octavia_all'][0]]['octavia_nova_flavor_uuid'] }}
amp_boot_network_list = {{ hostvars[groups['octavia_all'][0]]['octavia_neutron_management_network_uuid'] }}

description: updated
Changed in openstack-ansible:
status: New → Confirmed
importance: Undecided → High
Changed in openstack-ansible:
assignee: nobody → German Eichberger (german-eichberger)
status: Confirmed → In Progress
Revision history for this message
Michael Johnson (johnsom) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_octavia (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/559385

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstack-ansible-os_octavia (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/559386

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on openstack-ansible-os_octavia (stable/queens)

Change abandoned by German Eichberger (<email address hidden>) on branch: stable/queens
Review: https://review.openstack.org/559385
Reason: Can we merge the master please

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on openstack-ansible-os_octavia (stable/pike)

Change abandoned by German Eichberger (<email address hidden>) on branch: stable/pike
Review: https://review.openstack.org/559386
Reason: Can we merge the master please

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_octavia (master)

Reviewed: https://review.openstack.org/553866
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_octavia/commit/?id=758087197fc39577388c24cb375071e915166227
Submitter: Zuul
Branch: master

commit 758087197fc39577388c24cb375071e915166227
Author: German Eichberger <email address hidden>
Date: Fri Mar 16 10:40:18 2018 -0700

    Fixes mgmt net and flavor fact setting

    This will fix the management network and flavor fact
    setting which is not shared among multiple hosts
    during install.

    Closes-Bug: 1755929

    Change-Id: I3b056b1ac7b7770926a79597744cbb48ef99fe63

Changed in openstack-ansible:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_octavia (stable/queens)

Reviewed: https://review.openstack.org/559385
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_octavia/commit/?id=c85fb4cd6d0c84dae51eb398ed3c48fe1d44bdcf
Submitter: Zuul
Branch: stable/queens

commit c85fb4cd6d0c84dae51eb398ed3c48fe1d44bdcf
Author: German Eichberger <email address hidden>
Date: Fri Mar 16 10:40:18 2018 -0700

    Fixes mgmt net and flavor fact setting

    This will fix the management network and flavor fact
    setting which is not shared among multiple hosts
    during install.

    Closes-Bug: 1755929

    Change-Id: I3b056b1ac7b7770926a79597744cbb48ef99fe63
    (cherry picked from commit 758087197fc39577388c24cb375071e915166227)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible-os_octavia (stable/pike)

Reviewed: https://review.openstack.org/559386
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible-os_octavia/commit/?id=74bfb1c1f29eb37d6e1883fa384a577b19853de8
Submitter: Zuul
Branch: stable/pike

commit 74bfb1c1f29eb37d6e1883fa384a577b19853de8
Author: German Eichberger <email address hidden>
Date: Fri Mar 16 10:40:18 2018 -0700

    Fixes mgmt net and flavor fact setting

    This will fix the management network and flavor fact
    setting which is not shared among multiple hosts
    during install.

    Closes-Bug: 1755929

    Change-Id: I3b056b1ac7b7770926a79597744cbb48ef99fe63
    (cherry picked from commit 758087197fc39577388c24cb375071e915166227)

tags: added: in-stable-pike
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_octavia 17.0.3

This issue was fixed in the openstack/openstack-ansible-os_octavia 17.0.3 release.

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

This issue was fixed in the openstack/openstack-ansible-os_octavia 16.0.12 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/openstack-ansible-os_octavia 18.0.0.0b1

This issue was fixed in the openstack/openstack-ansible-os_octavia 18.0.0.0b1 development milestone.

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.