diff --git a/ansible/roles/neutron/defaults/main.yml b/ansible/roles/neutron/defaults/main.yml index 9bb9939f25..0ca1c9e628 100644 --- a/ansible/roles/neutron/defaults/main.yml +++ b/ansible/roles/neutron/defaults/main.yml @@ -36,6 +36,10 @@ openvswitch_db_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ openvswitch_db_tag: "{{ openstack_release }}" openvswitch_db_image_full: "{{ openvswitch_db_image }}:{{ openvswitch_db_tag }}" +openvswitch_data_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-data" +openvswitch_data_image_tag: "{{ openstack_release }}" +openvswitch_data_image_full: "{{ openvswitch_data_image }}:{{ openvswitch_data_image_tag }}" + #################### # Openstack diff --git a/ansible/roles/neutron/tasks/start.yml b/ansible/roles/neutron/tasks/start.yml index 7aaeb0e2bc..b2181196e8 100644 --- a/ansible/roles/neutron/tasks/start.yml +++ b/ansible/roles/neutron/tasks/start.yml @@ -1,4 +1,20 @@ --- +- name: Starting Openvswitch data container + docker: + tty: True + net: host + pull: "{{ docker_pull_policy }}" + restart_policy: "{{ docker_restart_policy }}" + restart_policy_retry: "{{ docker_restart_policy_retry }}" + state: reloaded + registry: "{{ docker_registry }}" + username: "{{ docker_registry_username }}" + password: "{{ docker_registry_password }}" + insecure_registry: "{{ docker_insecure_registry }}" + name: openvswitch_data + image: "{{ openvswitch_data_image_full }}" + volumes: "/var/lib/openvswitch/" + - name: Starting Openvswitch-db container docker: tty: True @@ -16,6 +32,8 @@ volumes: - "/run:/run" - "{{ node_config_directory }}/openvswitch-db-server/:{{ container_config_directory }}/:ro" + volumes_from: + - openvswitch_data env: KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])