Merge "Filter Gnocchi traffic optionally"

This commit is contained in:
Jenkins 2016-09-13 09:29:53 +00:00 committed by Gerrit Code Review
commit 11c9c3a019
3 changed files with 33 additions and 1 deletions

View File

@ -13,8 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# Enable/Disable Ceilometer
# Enable/Disable Telemetry projects
swift_ceilometer_enabled: False
swift_gnocchi_enabled: False
## Verbosity Options
debug: False

View File

@ -168,3 +168,31 @@
until: add_service|success
retries: 5
delay: 10
# KNOWN ISSUE(stevelle) Never fail. Swift playbook runs before Gnocchi in a
# standard deploy. The project for Gnocchi will not have been created yet.
# There is a known issue in project / user / role lifecycles that causes a
# circular service dependency here. The Swift playbook must be run a second
# time, after the Gnocchi playbook runs, when it uses Swift storage as a
# workaround.
- name: Get Gnocchi project id
keystone:
command: get_project
tenant_name: "{{ gnocchi_service_project_name }}"
endpoint: "{{ keystone_service_adminurl }}"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
register: get_gnocchi_project
failed_when: False
when:
- swift_gnocchi_enabled | bool
- swift_gnocchi_service_project_id is not defined
- name: Store Gnocchi project id
set_fact:
swift_gnocchi_service_project_id: "{{ keystone_facts.id }}"
when:
- swift_gnocchi_enabled | bool
- get_gnocchi_project | success

View File

@ -190,5 +190,8 @@ driver = messagingv2
url = rabbit://{% for host in swift_rabbitmq_telemetry_servers.split(',') %}{{ swift_rabbitmq_telemetry_userid }}:{{ swift_rabbitmq_telemetry_password }}@{{ host }}:{{ swift_rabbitmq_telemetry_port }}{% if not loop.last %},{% else %}/{{ swift_rabbitmq_telemetry_vhost }}{% endif %}{% endfor %}
topic = notifications
{% if swift_gnocchi_service_project_id is defined %}
ignore_projects = "{{ swift_gnocchi_service_project_id }}""
{% endif %}
log_level = WARN
{% endif %}