name: infra/openvswitch/openvswitch-db
enabled: {{ enable_neutron | bool and neutron_plugin_agent == 'openvswitch' }}
container:
  image: "{{ openvswitch_db_image }}:{{ openvswitch_db_tag }}"
  parameters:
    - key: volume
      value: "openvswitch_db_{{ deployment_id }}_{{ timestamp }}:/var/lib/openvswitch/"
    - key: volume
      value: "kolla_logs_{{ deployment_id }}_{{ timestamp }}:/var/log/kolla"
  volumes:
    - containerPath: "/run"
      hostPath: "/run"
      mode: RW
service:
  daemon:
    dependencies:
     - path: openvswitch-db/bootstrap
     - path: neutron-server/db_sync
     - path: neutron_ansible_tasks/create_user
     - path: rabbitmq/daemon
    command: /usr/sbin/ovsdb-server /etc/openvswitch/conf.db -vconsole:emer -vsyslog:err -vfile:info --remote=punix:/run/openvswitch/db.sock --log-file=/var/log/openvswitch/ovsdb-server.log
  mem: {{ openvswitch_db_mem }}
  cpus: {{ openvswitch_db_cpus }}
  instances: {{ all_nodes }}
  constraints: {{ controller_compute_constraints }}
commands:
  bootstrap:
    command: kolla_extend_start
