Files
kolla-ansible/ansible/roles/manila/defaults/main.yml
Rafael Weingärtner 22a6223b1b Standardize the configuration of "oslo_messaging" section
After all of the discussions we had on
"https://review.opendev.org/#/c/670626/2", I studied all projects that
have an "oslo_messaging" section. Afterwards, I applied the same method
that is already used in "oslo_messaging" section in Nova, Cinder, and
others. This guarantees that we have a consistent method to
enable/disable notifications across projects based on components (e.g.
Ceilometer) being enabled or disabled. Here follows the list of
components, and the respective changes I did.

* Aodh:
The section is declared, but it is not used. Therefore, it will
be removed in an upcomming PR.

* Congress:
The section is declared, but it is not used. Therefore, it will
be removed in an upcomming PR.

* Cinder:
It was already properly configured.

* Octavia:
The section is declared, but it is not used. Therefore, it will
be removed in an upcomming PR.

* Heat:
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Ceilometer:
Ceilometer publishes some messages in the rabbitMQ. However, the
default driver is "messagingv2", and not ''(empty) as defined in Oslo;
these configurations are defined in ceilometer/publisher/messaging.py.
Therefore, we do not need to do anything for the
"oslo_messaging_notifications" section in Ceilometer

* Tacker:
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Neutron:
It was already properly configured.

* Nova
It was already properly configured. However, we found another issue
with its configuration. Kolla-ansible does not configure nova
notifications as it should. If 'searchlight' is not installed (enabled)
the 'notification_format' should be 'unversioned'. The default is
'both'; so nova will send a notification to the queue
versioned_notifications; but that queue has no consumer when
'searchlight' is disabled. In our case, the queue got 511k messages.
The huge amount of "stuck" messages made the Rabbitmq cluster
unstable.

https://bugzilla.redhat.com/show_bug.cgi?id=1478274
https://bugs.launchpad.net/ceilometer/+bug/1665449

* Nova_hyperv:
I added the same configurations as in Nova project.

* Vitrage
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Searchlight
I created a mechanism similar to what we have in AODH, Cinder, Nova,
and others.

* Ironic
I created a mechanism similar to what we have in AODH, Cinder, Nova,
and others.

* Glance
It was already properly configured.

* Trove
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Blazar
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Sahara
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Watcher
I created a mechanism similar to what we have in AODH, Cinder, Nova,
and others.

* Barbican
I created a mechanism similar to what we have in Cinder, Nova,
and others. I also added a configuration to 'keystone_notifications'
section. Barbican needs its own queue to capture events from Keystone.
Otherwise, it has an impact on Ceilometer and other systems that are
connected to the "notifications" default queue.

* Keystone
Keystone is the system that triggered this work with the discussions
that followed on https://review.opendev.org/#/c/670626/2. After a long
discussion, we agreed to apply the same approach that we have in Nova,
Cinder and other systems in Keystone. That is what we did. Moreover, we
introduce a new topic "barbican_notifications" when barbican is
enabled. We also removed the "variable" enable_cadf_notifications, as
it is obsolete, and the default in Keystone is CADF.

* Mistral:
It was hardcoded "noop" as the driver. However, that does not seem a
good practice. Instead, I applied the same standard of using the driver
and pushing to "notifications" queue if Ceilometer is enabled.

* Cyborg:
I created a mechanism similar to what we have in AODH, Cinder, Nova,
and others.

* Murano
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Senlin
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Manila
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Zun
The section is declared, but it is not used. Therefore, it will
be removed in an upcomming PR.

* Designate
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

* Magnum
It was already using a similar scheme; I just modified it a little bit
to be the same as we have in all other components

Closes-Bug: #1838985

Change-Id: I88bdb004814f37c81c9a9c4e5e491fac69f6f202
Signed-off-by: Rafael Weingärtner <rafael@apache.org>
2019-08-15 13:18:16 -03:00

196 lines
7.3 KiB
YAML

---
project_name: "manila"
manila_services:
manila-api:
container_name: "manila_api"
group: "manila-api"
image: "{{ manila_api_image_full }}"
enabled: True
volumes: "{{ manila_api_default_volumes + manila_api_extra_volumes }}"
dimensions: "{{ manila_api_dimensions }}"
haproxy:
manila_api:
enabled: "{{ enable_manila }}"
mode: "http"
external: false
port: "{{ manila_api_port }}"
manila_api_external:
enabled: "{{ enable_manila }}"
mode: "http"
external: true
port: "{{ manila_api_port }}"
manila-scheduler:
container_name: "manila_scheduler"
group: "manila-scheduler"
image: "{{ manila_scheduler_image_full }}"
enabled: True
volumes: "{{ manila_scheduler_default_volumes + manila_scheduler_extra_volumes }}"
dimensions: "{{ manila_scheduler_dimensions }}"
manila-share:
container_name: "manila_share"
group: "manila-share"
image: "{{ manila_share_image_full }}"
enabled: True
privileged: True
volumes: "{{ manila_share_default_volumes + manila_share_extra_volumes }}"
dimensions: "{{ manila_share_dimensions }}"
manila-data:
container_name: "manila_data"
group: "manila-data"
image: "{{ manila_data_image_full }}"
enabled: True
privileged: True
volumes: "{{ manila_data_default_volumes + manila_data_extra_volumes }}"
dimensions: "{{ manila_data_dimensions }}"
#####################
## Ceph
#####################
ceph_client_manila_keyring_caps:
mon: >-
allow r,
allow command "auth del",
allow command "auth caps",
allow command "auth get",
allow command "auth get-or-create"
osd: 'allow rw'
mds: 'allow *'
#####################
## Database
#####################
manila_database_name: "manila"
manila_database_user: "{% if use_preconfigured_databases | bool and use_common_mariadb_user | bool %}{{ database_user }}{% else %}manila{% endif %}"
manila_database_address: "{{ database_address }}:{{ database_port }}"
#####################
## Docker
#####################
manila_install_type: "{{ kolla_install_type }}"
manila_tag: "{{ openstack_release }}"
manila_share_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ manila_install_type }}-manila-share"
manila_share_tag: "{{ manila_tag }}"
manila_share_image_full: "{{ manila_share_image }}:{{ manila_share_tag }}"
manila_scheduler_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ manila_install_type }}-manila-scheduler"
manila_scheduler_tag: "{{ manila_tag }}"
manila_scheduler_image_full: "{{ manila_scheduler_image }}:{{ manila_scheduler_tag }}"
manila_api_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ manila_install_type }}-manila-api"
manila_api_tag: "{{ manila_tag }}"
manila_api_image_full: "{{ manila_api_image }}:{{ manila_api_tag }}"
manila_data_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ manila_install_type }}-manila-data"
manila_data_tag: "{{ manila_tag }}"
manila_data_image_full: "{{ manila_data_image }}:{{ manila_data_tag }}"
manila_share_dimensions: "{{ default_container_dimensions }}"
manila_scheduler_dimensions: "{{ default_container_dimensions }}"
manila_api_dimensions: "{{ default_container_dimensions }}"
manila_data_dimensions: "{{ default_container_dimensions }}"
manila_share_default_volumes:
- "{{ node_config_directory }}/manila-share/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "/run/:/run/:shared"
- "kolla_logs:/var/log/kolla/"
- "/lib/modules:/lib/modules:ro"
- "{{ kolla_dev_repos_directory ~ '/manila/manila:/var/lib/kolla/venv/lib/python2.7/site-packages/manila' if manila_dev_mode | bool else '' }}"
manila_scheduler_default_volumes:
- "{{ node_config_directory }}/manila-scheduler/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/manila/manila:/var/lib/kolla/venv/lib/python2.7/site-packages/manila' if manila_dev_mode | bool else '' }}"
manila_api_default_volumes:
- "{{ node_config_directory }}/manila-api/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/manila/manila:/var/lib/kolla/venv/lib/python2.7/site-packages/manila' if manila_dev_mode | bool else '' }}"
manila_data_default_volumes:
- "{{ node_config_directory }}/manila-data/:{{ container_config_directory }}/:ro"
- "/etc/localtime:/etc/localtime:ro"
- "/dev/:/dev/"
- "/run/:/run/:shared"
- "kolla_logs:/var/log/kolla/"
- "{{ kolla_dev_repos_directory ~ '/manila/manila:/var/lib/kolla/venv/lib/python2.7/site-packages/manila' if manila_dev_mode | bool else '' }}"
manila_extra_volumes: "{{ default_extra_volumes }}"
manila_share_extra_volumes: "{{ manila_extra_volumes }}"
manila_scheduler_extra_volumes: "{{ manila_extra_volumes }}"
manila_api_extra_volumes: "{{ manila_extra_volumes }}"
manila_data_extra_volumes: "{{ manila_extra_volumes }}"
#####################
## OpenStack
#####################
manila_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ manila_api_port }}/v1/%(tenant_id)s"
manila_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ manila_api_port }}/v1/%(tenant_id)s"
manila_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ manila_api_port }}/v1/%(tenant_id)s"
manila_v2_admin_endpoint: "{{ admin_protocol }}://{{ kolla_internal_fqdn }}:{{ manila_api_port }}/v2/%(tenant_id)s"
manila_v2_internal_endpoint: "{{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ manila_api_port }}/v2/%(tenant_id)s"
manila_v2_public_endpoint: "{{ public_protocol }}://{{ kolla_external_fqdn }}:{{ manila_api_port }}/v2/%(tenant_id)s"
manila_logging_debug: "{{ openstack_logging_debug }}"
manila_keystone_user: "manila"
manila_service_instance_user: "manila"
manila_service_instance_password: "manila"
openstack_manila_auth: "{{ openstack_auth }}"
####################
# Manila
####################
manila_backends:
- name: "generic"
driver: "generic"
enabled: "{{ enable_manila_backend_generic | bool }}"
protocols:
- "NFS"
- "CIFS"
- name: "hnas1"
driver: "hnas"
enabled: "{{ enable_manila_backend_hnas | bool }}"
protocols:
- "NFS"
- "CIFS"
- name: "cephfsnative1"
driver: "cephfsnative"
enabled: "{{ enable_manila_backend_cephfs_native | bool }}"
protocols:
- "CEPHFS"
- name: "cephfsnfs1"
driver: "cephfsnfs"
enabled: "{{ enable_manila_backend_cephfs_nfs | bool }}"
protocols:
- "NFS"
- "CIFS"
manila_enabled_backends: "{{ manila_backends|selectattr('enabled', 'equalto', true)|list }}"
####################
# Kolla
####################
manila_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}"
manila_dev_repos_pull: "{{ kolla_dev_repos_pull }}"
manila_dev_mode: "{{ kolla_dev_mode }}"
manila_source_version: "{{ kolla_source_version }}"
####################
# Notifications
####################
manila_notification_topics:
- name: notifications
enabled: "{{ enable_ceilometer | bool }}"
manila_enabled_notification_topics: "{{ manila_notification_topics | selectattr('enabled', 'equalto', true) | list }}"