From b76d7623ac15c94f80fbbc1a5701331147fee52d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20M=C3=A1gr?= <mmagr@redhat.com>
Date: Tue, 5 Jun 2018 10:59:23 +0200
Subject: [PATCH] QDR for metrics collection purposes

This patch adds composable new service (QDR) for containerized deployments.
Metrics QDR will run on each overcloud node in 'edge' mode. This basically
means that there is a possibility that there will be two QDRs running
on controllers in case that oslo messaging is deployed. This is a reason why
we need separate composable service for this use case.

Depends-On: If9e3658d304c3071f53ecb1c42796d2603875fcd
Depends-On: I68f39b6bda02ba3920f2ab1cf2df0bd54ad7453f
Depends-On: I73f988d05840eca44949f13f248f86d094a57c46
Change-Id: I1353020f874b348afd98e7ed3832033f85a5267f
---
 .../scenario001-multinode-containers.yaml     |   4 +-
 docker/services/{ => metrics}/collectd.yaml   |   4 +-
 docker/services/metrics/qdr.yaml              | 220 ++++++++++++++++++
 environments/collectd-environment.yaml        |   2 +-
 environments/hyperconverged-ceph.yaml         |   1 +
 environments/services/collectd.yaml           |   2 +-
 network/service_net_map.j2.yaml               |   1 +
 overcloud-resource-registry-puppet.j2.yaml    |   1 +
 .../notes/metrics-qdr-97c00cc8059963fa.yaml   |   9 +
 roles/BlockStorage.yaml                       |   1 +
 roles/CephAll.yaml                            |   1 +
 roles/CephFile.yaml                           |   1 +
 roles/CephObject.yaml                         |   1 +
 roles/CephStorage.yaml                        |   1 +
 roles/Compute.yaml                            |   1 +
 roles/ComputeDVR.yaml                         |   1 +
 roles/ComputeHCI.yaml                         |   1 +
 roles/ComputeInstanceHA.yaml                  |   1 +
 roles/ComputeLiquidio.yaml                    |   1 +
 roles/ComputeOvsDpdk.yaml                     |   1 +
 roles/ComputeOvsDpdkRT.yaml                   |   1 +
 roles/ComputePPC64LE.yaml                     |   1 +
 roles/ComputeRealTime.yaml                    |   1 +
 roles/ComputeSriov.yaml                       |   1 +
 roles/ComputeSriovRT.yaml                     |   1 +
 roles/Controller.yaml                         |   1 +
 roles/ControllerAllNovaStandalone.yaml        |   1 +
 roles/ControllerNoCeph.yaml                   |   1 +
 roles/ControllerNovaStandalone.yaml           |   1 +
 roles/ControllerOpenstack.yaml                |   1 +
 roles/ControllerStorageNfs.yaml               |   1 +
 roles/Database.yaml                           |   1 +
 roles/HciCephAll.yaml                         |   1 +
 roles/HciCephFile.yaml                        |   1 +
 roles/HciCephMon.yaml                         |   1 +
 roles/HciCephObject.yaml                      |   1 +
 roles/IronicConductor.yaml                    |   1 +
 roles/Messaging.yaml                          |   2 +-
 roles/Networker.yaml                          |   1 +
 roles/Novacontrol.yaml                        |   1 +
 roles/ObjectStorage.yaml                      |   1 +
 roles/Standalone.yaml                         |   1 +
 roles/Telemetry.yaml                          |   1 +
 roles_data.yaml                               |   5 +
 tools/yaml-validate.py                        |   4 +-
 45 files changed, 281 insertions(+), 7 deletions(-)
 rename docker/services/{ => metrics}/collectd.yaml (98%)
 create mode 100644 docker/services/metrics/qdr.yaml
 create mode 100644 releasenotes/notes/metrics-qdr-97c00cc8059963fa.yaml

diff --git a/ci/environments/scenario001-multinode-containers.yaml b/ci/environments/scenario001-multinode-containers.yaml
index a01aa25c0e..d7579d3b0a 100644
--- a/ci/environments/scenario001-multinode-containers.yaml
+++ b/ci/environments/scenario001-multinode-containers.yaml
@@ -6,7 +6,8 @@ resource_registry:
   OS::TripleO::Services::CephOSD: ../../docker/services/ceph-ansible/ceph-osd.yaml
   OS::TripleO::Services::CephClient: ../../docker/services/ceph-ansible/ceph-client.yaml
   OS::TripleO::Services::PankoApi: ../../docker/services/panko-api.yaml
-  OS::TripleO::Services::Collectd: ../../docker/services/collectd.yaml
+  OS::TripleO::Services::Collectd: ../../docker/services/metrics/collectd.yaml
+  OS::TripleO::Services::MetricsQdr: ../../docker/services/metrics/qdr.yaml
   OS::TripleO::Services::OsloMessagingRpc: ../../docker/services/pacemaker/rpc-rabbitmq.yaml
   OS::TripleO::Services::OsloMessagingNotify: ../../docker/services/messaging/notify-rabbitmq-shared.yaml
   OS::TripleO::Services::HAproxy: ../../docker/services/pacemaker/haproxy.yaml
@@ -92,6 +93,7 @@ parameter_defaults:
     - OS::TripleO::Services::CinderScheduler
     - OS::TripleO::Services::CinderVolume
     - OS::TripleO::Services::Collectd
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::TripleoPackages
     - OS::TripleO::Services::TripleoFirewall
     - OS::TripleO::Services::Fluentd
diff --git a/docker/services/collectd.yaml b/docker/services/metrics/collectd.yaml
similarity index 98%
rename from docker/services/collectd.yaml
rename to docker/services/metrics/collectd.yaml
index ca8f1472db..7fda15dc59 100644
--- a/docker/services/collectd.yaml
+++ b/docker/services/metrics/collectd.yaml
@@ -44,10 +44,10 @@ parameters:
 resources:
 
   ContainersCommon:
-    type: ./containers-common.yaml
+    type: ../containers-common.yaml
 
   CollectdBase:
-    type: ../../puppet/services/metrics/collectd.yaml
+    type: ../../../puppet/services/metrics/collectd.yaml
     properties:
       EndpointMap: {get_param: EndpointMap}
       ServiceData: {get_param: ServiceData}
diff --git a/docker/services/metrics/qdr.yaml b/docker/services/metrics/qdr.yaml
new file mode 100644
index 0000000000..b121509466
--- /dev/null
+++ b/docker/services/metrics/qdr.yaml
@@ -0,0 +1,220 @@
+heat_template_version: rocky
+
+description: >
+  Qpid dispatch router service for metrics and monitoring purposes
+
+parameters:
+  DockerMetricsQdrImage:
+    description: image
+    type: string
+  DockerMetricsQdrConfigImage:
+    description: The container image to use for the qdrouterd config_volume
+    type: string
+  ServiceData:
+    default: {}
+    description: Dictionary packing service data
+    type: json
+  ServiceNetMap:
+    default: {}
+    description: Mapping of service_name -> network name. Typically set
+                 via parameter_defaults in the resource registry.  This
+                 mapping overrides those in ServiceNetMapDefaults.
+    type: json
+  DefaultPasswords:
+    default: {}
+    type: json
+  RoleName:
+    default: ''
+    description: Role name on which the service is applied
+    type: string
+  RoleParameters:
+    default: {}
+    description: Parameters specific to the role
+    type: json
+  EndpointMap:
+    default: {}
+    description: Mapping of service endpoint -> protocol. Typically set
+                 via parameter_defaults in the resource registry.
+    type: json
+  MonitoringSubscriptionQdr:
+    default: 'overcloud-qdr'
+    type: string
+  MetricsQdrLoggingSource:
+    type: json
+    default:
+      tag: openstack.nova.consoleauth
+      path: /var/log/qdrouterd/metrics-qdr.log
+  MetricsQdrPort:
+    default: '5666'
+    description: Service name or port number on which the qdrouterd will accept
+                 connections. This argument must be string, even if the numeric
+                 form is used.
+    type: string
+  MetricsQdrUsername:
+    default: 'guest'
+    description: Username which should be used to authenticate to the deployed
+                 qdrouterd.
+    type: string
+  MetricsQdrPassword:
+    default: 'guest'
+    description: Password which should be used to authenticate to the deployed
+                 qdrouterd.
+    type: string
+    hidden: true
+  MetricsQdrConnectors:
+    default: []
+    description: Connectors configuration (array of hashes).
+    type: json
+  MetricsQdrAddresses:
+    default:
+      - prefix: 'collectd/notify'
+        distribution: multicast
+      - prefix: 'collectd/telemetry'
+        distribution: multicast
+    description: Addresses configuration (array of hashes).
+    type: json
+  MetricsQdrUseSSL:
+    default: false
+    description: Set to true if it is required to use SSL or TLS on
+                 the connection for listener.
+    type: boolean
+  MetricsQdrUseEncryption:
+    default: false
+    description: Set to true if it is required to encrypt connection to the peer
+                 for listener.
+    type: boolean
+  MetricsQdrSaslMechanisms:
+    default: 'ANONYMOUS'
+    description: List of accepted SASL auth mechanisms for listener in format
+                 of comma separated list.
+    type: string
+  MetricsQdrSslCertDb:
+    default: ''
+    description: Path to SSL certificate db for listener.
+    type: string
+  MetricsQdrSslCertFile:
+    default: ''
+    description: Path to SSL certificate file for listener.
+    type: string
+  MetricsQdrSslKeyFile:
+    default: ''
+    description: Path to SSL private key file for listener.
+    type: string
+  MetricsQdrSslPwFile:
+    default: ''
+    description: Path to SSL password file for certificate key for listener.
+    type: string
+  MetricsQdrSslPassword:
+    default: ''
+    description: SSL password to be supplied for listener.
+    type: string
+  MetricsQdrTrustedCerts:
+    default: ''
+    description: Path to file containing trusted certificates for listener.
+    type: string
+
+
+resources:
+  ContainersCommon:
+    type: ../containers-common.yaml
+
+
+outputs:
+  role_data:
+    description: Role data for the metrics Qdr role.
+    value:
+      service_name: metrics-qdr
+      monitoring_subscription: {get_param: MonitoringSubscriptionQdr}
+      service_config_settings:
+        fluentd:
+          tripleo_fluentd_groups_metrics_qdr:
+            - qdr
+          tripleo_fluentd_sources_metrics_qdr:
+            - {get_param: MetricsQdrLoggingSource}
+      config_settings:
+        tripleo.metrics_qdr.firewall_rules:
+          '109 metrics qdr':
+            dport:
+              - {get_param: MetricsQdrPort}
+        tripleo::profile::base::metrics::qdr::listener_addr:
+          str_replace:
+             template:
+               "%{hiera('$NETWORK')}"
+             params:
+               $NETWORK: {get_param: [ServiceNetMap, MetricsQdrNetwork]}
+        tripleo::profile::base::metrics::qdr::listener_port: {get_param: MetricsQdrPort}
+        tripleo::profile::base::metrics::qdr::username: {get_param: MetricsQdrUsername}
+        tripleo::profile::base::metrics::qdr::password: {get_param: MetricsQdrPassword}
+        tripleo::profile::base::metrics::qdr::connectors: {get_param: MetricsQdrConnectors}
+        tripleo::profile::base::metrics::qdr::addresses: {get_param: MetricsQdrAddresses}
+        # ssl support
+        tripleo::profile::base::metrics::qdr::listener_require_ssl: {get_param: MetricsQdrUseSSL}
+        tripleo::profile::base::metrics::qdr::listener_require_encrypt: {get_param: MetricsQdrUseEncryption}
+        tripleo::profile::base::metrics::qdr::listener_sasl_mech: {get_param: MetricsQdrSaslMechanisms}
+        tripleo::profile::base::metrics::qdr::listener_ssl_cert_db: {get_param: MetricsQdrSslCertDb}
+        tripleo::profile::base::metrics::qdr::listener_ssl_cert_file: {get_param: MetricsQdrSslCertFile}
+        tripleo::profile::base::metrics::qdr::listener_ssl_key_file: {get_param: MetricsQdrSslKeyFile}
+        tripleo::profile::base::metrics::qdr::listener_ssl_pw_file: {get_param: MetricsQdrSslPwFile}
+        tripleo::profile::base::metrics::qdr::listener_ssl_password: {get_param: MetricsQdrSslPassword}
+        tripleo::profile::base::metrics::qdr::listener_trusted_certs: {get_param: MetricsQdrTrustedCerts}
+      # BEGIN DOCKER SETTINGS
+      puppet_config:
+        config_volume: metrics-qdr
+        step_config: |
+          include ::tripleo::profile::base::metrics::qdr
+        config_image: {get_param: DockerMetricsQdrConfigImage}
+      kolla_config:
+        /var/lib/kolla/config_files/metrics-qdr.json:
+          command: /usr/sbin/qdrouterd -c /etc/qpid-dispatch/qdrouterd.conf
+          config_files:
+            - source: "/var/lib/kolla/config_files/src/*"
+              dest: "/"
+              merge: true
+              preserve_properties: true
+          permissions:
+            - path: /var/lib/qdrouterd
+              owner: qdrouterd:qdrouterd
+              recurse: true
+      docker_config:
+        step_1:
+          metrics_qdr_init_logs:
+            start_order: 0
+            detach: false
+            image: &qdrouterd_image {get_param: DockerMetricsQdrImage}
+            privileged: false
+            user: root
+            volumes:
+              - /var/log/containers/metrics-qdr:/var/log/qdrouterd
+            command: ['/bin/bash', '-c', 'chown -R qdrouterd:qdrouterd /var/log/qdrouterd']
+          metrics_qdr:
+            start_order: 1
+            image: *qdrouterd_image
+            net: host
+            user: qdrouterd
+            privileged: false
+            restart: always
+            volumes:
+              list_concat:
+                - {get_attr: [ContainersCommon, volumes]}
+                -
+                  - /var/lib/kolla/config_files/metrics-qdr.json:/var/lib/kolla/config_files/config.json:ro
+                  - /var/lib/config-data/puppet-generated/metrics-qdr/:/var/lib/kolla/config_files/src:ro
+                  - /var/lib/metrics-qdr:/var/lib/qdrouterd
+                  - /var/log/containers/metrics-qdr:/var/log/qdrouterd
+            environment:
+              - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
+      host_prep_tasks:
+        - name: create persistent logs directory
+          file:
+            path: "{{ item }}"
+            state: directory
+          with_items:
+            - /var/log/containers/metrics-qdr
+            - /var/lib/metrics-qdr
+        - name: qrouterd logs readme
+          copy:
+            dest: /var/log/qrouterd/readme-metrics.txt
+            content: |
+              Log files from metrics qrouterd containers can be found under
+              /var/log/containers/metrics-qdr.
+          ignore_errors: true
diff --git a/environments/collectd-environment.yaml b/environments/collectd-environment.yaml
index b221b666d3..b22a1db95c 100644
--- a/environments/collectd-environment.yaml
+++ b/environments/collectd-environment.yaml
@@ -1,5 +1,5 @@
 resource_registry:
-  OS::TripleO::Services::Collectd: ../docker/services/collectd.yaml
+  OS::TripleO::Services::Collectd: ../docker/services/metrics/collectd.yaml
 
 # parameter_defaults:
 #
diff --git a/environments/hyperconverged-ceph.yaml b/environments/hyperconverged-ceph.yaml
index 9540015102..2ba558f740 100644
--- a/environments/hyperconverged-ceph.yaml
+++ b/environments/hyperconverged-ceph.yaml
@@ -46,6 +46,7 @@ parameter_defaults:
     - OS::TripleO::Services::Ipsec
     - OS::TripleO::Services::AuditD
     - OS::TripleO::Services::Collectd
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::CephOSD
     - OS::TripleO::Services::Vpp
     - OS::TripleO::Services::NeutronVppAgent
diff --git a/environments/services/collectd.yaml b/environments/services/collectd.yaml
index 1623a888c6..1be33d9957 100644
--- a/environments/services/collectd.yaml
+++ b/environments/services/collectd.yaml
@@ -1,2 +1,2 @@
 resource_registry:
-  OS::TripleO::Services::Collectd: ../../docker/services/collectd.yaml
+  OS::TripleO::Services::Collectd: ../../docker/services/metrics/collectd.yaml
diff --git a/network/service_net_map.j2.yaml b/network/service_net_map.j2.yaml
index 4c663dbb63..3bb55692f1 100644
--- a/network/service_net_map.j2.yaml
+++ b/network/service_net_map.j2.yaml
@@ -41,6 +41,7 @@ parameters:
       KeystoneAdminApiNetwork: ctlplane # allows undercloud to config endpoints
       KeystonePublicApiNetwork: internal_api
       ManilaApiNetwork: internal_api
+      MetricsQdrNetwork: internal_api
       NeutronApiNetwork: internal_api
       OctaviaApiNetwork: internal_api
       HeatApiNetwork: internal_api
diff --git a/overcloud-resource-registry-puppet.j2.yaml b/overcloud-resource-registry-puppet.j2.yaml
index e713ce05e3..45be17c479 100644
--- a/overcloud-resource-registry-puppet.j2.yaml
+++ b/overcloud-resource-registry-puppet.j2.yaml
@@ -258,6 +258,7 @@ resource_registry:
   OS::TripleO::Services::AodhListener: docker/services/aodh-listener.yaml
   OS::TripleO::Services::AodhNotifier: docker/services/aodh-notifier.yaml
   OS::TripleO::Services::PankoApi: docker/services/panko-api.yaml
+  OS::TripleO::Services::MetricsQdr: OS::Heat::None
   OS::TripleO::Services::MistralEngine: OS::Heat::None
   OS::TripleO::Services::MistralApi: OS::Heat::None
   OS::TripleO::Services::MistralExecutor: OS::Heat::None
diff --git a/releasenotes/notes/metrics-qdr-97c00cc8059963fa.yaml b/releasenotes/notes/metrics-qdr-97c00cc8059963fa.yaml
new file mode 100644
index 0000000000..18d51ee31b
--- /dev/null
+++ b/releasenotes/notes/metrics-qdr-97c00cc8059963fa.yaml
@@ -0,0 +1,9 @@
+---
+
+features:
+  - |
+    Added new composable service (QDR) for containerized deployments. Metrics
+    QDR will run on each overcloud node in 'edge' mode. This basically means
+    that there is a possibility there will be two QDRs running on controllers
+    in case that oslo messaging is deployed. This is a reason why we need
+    separate composable service for this use case.
diff --git a/roles/BlockStorage.yaml b/roles/BlockStorage.yaml
index 1dad61e6a7..5e67c51f7d 100644
--- a/roles/BlockStorage.yaml
+++ b/roles/BlockStorage.yaml
@@ -24,6 +24,7 @@
     - OS::TripleO::Services::Iscsid
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::Ntp
     - OS::TripleO::Services::ContainersLogrotateCrond
diff --git a/roles/CephAll.yaml b/roles/CephAll.yaml
index 6433b31049..8772c63adb 100644
--- a/roles/CephAll.yaml
+++ b/roles/CephAll.yaml
@@ -25,6 +25,7 @@
     - OS::TripleO::Services::Ipsec
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::Ntp
     - OS::TripleO::Services::ContainersLogrotateCrond
diff --git a/roles/CephFile.yaml b/roles/CephFile.yaml
index 7192f28a40..91e7f50838 100644
--- a/roles/CephFile.yaml
+++ b/roles/CephFile.yaml
@@ -22,6 +22,7 @@
     - OS::TripleO::Services::Ipsec
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::Ntp
     - OS::TripleO::Services::ContainersLogrotateCrond
diff --git a/roles/CephObject.yaml b/roles/CephObject.yaml
index f4daabd359..55604fb4c8 100644
--- a/roles/CephObject.yaml
+++ b/roles/CephObject.yaml
@@ -22,6 +22,7 @@
     - OS::TripleO::Services::Ipsec
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::Ntp
     - OS::TripleO::Services::ContainersLogrotateCrond
diff --git a/roles/CephStorage.yaml b/roles/CephStorage.yaml
index 3e3a9501c7..bbc5837b69 100644
--- a/roles/CephStorage.yaml
+++ b/roles/CephStorage.yaml
@@ -21,6 +21,7 @@
     - OS::TripleO::Services::Ipsec
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::Ntp
     - OS::TripleO::Services::ContainersLogrotateCrond
diff --git a/roles/Compute.yaml b/roles/Compute.yaml
index d62cae8732..19de6074be 100644
--- a/roles/Compute.yaml
+++ b/roles/Compute.yaml
@@ -41,6 +41,7 @@
     - OS::TripleO::Services::Iscsid
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronBgpVpnBagpipe
     - OS::TripleO::Services::NeutronLinuxbridgeAgent
diff --git a/roles/ComputeDVR.yaml b/roles/ComputeDVR.yaml
index 641a4bebd9..0e53688a1d 100644
--- a/roles/ComputeDVR.yaml
+++ b/roles/ComputeDVR.yaml
@@ -32,6 +32,7 @@
     - OS::TripleO::Services::Iscsid
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronBgpVpnBagpipe
     - OS::TripleO::Services::NeutronLinuxbridgeAgent
diff --git a/roles/ComputeHCI.yaml b/roles/ComputeHCI.yaml
index f219acadd1..928fff1c8a 100644
--- a/roles/ComputeHCI.yaml
+++ b/roles/ComputeHCI.yaml
@@ -31,6 +31,7 @@
     - OS::TripleO::Services::Iscsid
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronBgpVpnBagpipe
     - OS::TripleO::Services::NeutronLinuxbridgeAgent
diff --git a/roles/ComputeInstanceHA.yaml b/roles/ComputeInstanceHA.yaml
index ccbc5b1007..42748cc1ab 100644
--- a/roles/ComputeInstanceHA.yaml
+++ b/roles/ComputeInstanceHA.yaml
@@ -32,6 +32,7 @@
     - OS::TripleO::Services::Iscsid
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronBgpVpnBagpipe
     - OS::TripleO::Services::NeutronLinuxbridgeAgent
diff --git a/roles/ComputeLiquidio.yaml b/roles/ComputeLiquidio.yaml
index ba127be50f..9af64f08ef 100644
--- a/roles/ComputeLiquidio.yaml
+++ b/roles/ComputeLiquidio.yaml
@@ -33,6 +33,7 @@
     - OS::TripleO::Services::Iscsid
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronBgpVpnBagpipe
     - OS::TripleO::Services::NeutronLinuxbridgeAgent
diff --git a/roles/ComputeOvsDpdk.yaml b/roles/ComputeOvsDpdk.yaml
index 9c0c3cbd7d..d6325afbce 100644
--- a/roles/ComputeOvsDpdk.yaml
+++ b/roles/ComputeOvsDpdk.yaml
@@ -34,6 +34,7 @@
     - OS::TripleO::Services::Iscsid
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronBgpVpnBagpipe
     - OS::TripleO::Services::NovaCompute
diff --git a/roles/ComputeOvsDpdkRT.yaml b/roles/ComputeOvsDpdkRT.yaml
index 78367357d7..2a99c17b48 100644
--- a/roles/ComputeOvsDpdkRT.yaml
+++ b/roles/ComputeOvsDpdkRT.yaml
@@ -34,6 +34,7 @@
     - OS::TripleO::Services::Iscsid
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronBgpVpnBagpipe
     - OS::TripleO::Services::NovaCompute
diff --git a/roles/ComputePPC64LE.yaml b/roles/ComputePPC64LE.yaml
index c15540a8d2..07084bd94a 100644
--- a/roles/ComputePPC64LE.yaml
+++ b/roles/ComputePPC64LE.yaml
@@ -32,6 +32,7 @@
     - OS::TripleO::Services::Iscsid
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronBgpVpnBagpipe
     - OS::TripleO::Services::NeutronLinuxbridgeAgent
diff --git a/roles/ComputeRealTime.yaml b/roles/ComputeRealTime.yaml
index 42335df3c6..7b6d6a8b47 100644
--- a/roles/ComputeRealTime.yaml
+++ b/roles/ComputeRealTime.yaml
@@ -39,6 +39,7 @@
     - OS::TripleO::Services::Iscsid
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronBgpVpnBagpipe
     - OS::TripleO::Services::NeutronLinuxbridgeAgent
diff --git a/roles/ComputeSriov.yaml b/roles/ComputeSriov.yaml
index 9d10ea5bc3..c5fcfb1b99 100644
--- a/roles/ComputeSriov.yaml
+++ b/roles/ComputeSriov.yaml
@@ -32,6 +32,7 @@
     - OS::TripleO::Services::Iscsid
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronBgpVpnBagpipe
     - OS::TripleO::Services::NeutronSriovAgent
diff --git a/roles/ComputeSriovRT.yaml b/roles/ComputeSriovRT.yaml
index bd3ccb5cb5..e3f5a83fe9 100644
--- a/roles/ComputeSriovRT.yaml
+++ b/roles/ComputeSriovRT.yaml
@@ -33,6 +33,7 @@
     - OS::TripleO::Services::Iscsid
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronBgpVpnBagpipe
     - OS::TripleO::Services::NeutronSriovAgent
diff --git a/roles/Controller.yaml b/roles/Controller.yaml
index 77a79f7374..c4bb47cd0a 100644
--- a/roles/Controller.yaml
+++ b/roles/Controller.yaml
@@ -109,6 +109,7 @@
     - OS::TripleO::Services::ManilaScheduler
     - OS::TripleO::Services::ManilaShare
     - OS::TripleO::Services::Memcached
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MistralApi
     - OS::TripleO::Services::MistralEngine
     - OS::TripleO::Services::MistralExecutor
diff --git a/roles/ControllerAllNovaStandalone.yaml b/roles/ControllerAllNovaStandalone.yaml
index b750d5e040..79159b0f2d 100644
--- a/roles/ControllerAllNovaStandalone.yaml
+++ b/roles/ControllerAllNovaStandalone.yaml
@@ -41,6 +41,7 @@
     - OS::TripleO::Services::CinderScheduler
     - OS::TripleO::Services::CinderVolume
     - OS::TripleO::Services::Collectd
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::Congress
     - OS::TripleO::Services::DesignateApi
     - OS::TripleO::Services::DesignateCentral
diff --git a/roles/ControllerNoCeph.yaml b/roles/ControllerNoCeph.yaml
index aad0a391ca..fb42bcc8d6 100644
--- a/roles/ControllerNoCeph.yaml
+++ b/roles/ControllerNoCeph.yaml
@@ -102,6 +102,7 @@
     - OS::TripleO::Services::ManilaScheduler
     - OS::TripleO::Services::ManilaShare
     - OS::TripleO::Services::Memcached
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MistralApi
     - OS::TripleO::Services::MistralEngine
     - OS::TripleO::Services::MistralExecutor
diff --git a/roles/ControllerNovaStandalone.yaml b/roles/ControllerNovaStandalone.yaml
index 268167f07a..ef685919c7 100644
--- a/roles/ControllerNovaStandalone.yaml
+++ b/roles/ControllerNovaStandalone.yaml
@@ -87,6 +87,7 @@
     - OS::TripleO::Services::ManilaScheduler
     - OS::TripleO::Services::ManilaShare
     - OS::TripleO::Services::Memcached
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MistralApi
     - OS::TripleO::Services::MistralEngine
     - OS::TripleO::Services::MistralExecutor
diff --git a/roles/ControllerOpenstack.yaml b/roles/ControllerOpenstack.yaml
index 8f27aee3ff..202d171a20 100644
--- a/roles/ControllerOpenstack.yaml
+++ b/roles/ControllerOpenstack.yaml
@@ -86,6 +86,7 @@
     - OS::TripleO::Services::ManilaBackendVMAX
     - OS::TripleO::Services::ManilaScheduler
     - OS::TripleO::Services::ManilaShare
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::Memcached
     - OS::TripleO::Services::MistralApi
     - OS::TripleO::Services::MistralEngine
diff --git a/roles/ControllerStorageNfs.yaml b/roles/ControllerStorageNfs.yaml
index 68c1ca0385..98a250223a 100644
--- a/roles/ControllerStorageNfs.yaml
+++ b/roles/ControllerStorageNfs.yaml
@@ -99,6 +99,7 @@
     - OS::TripleO::Services::ManilaScheduler
     - OS::TripleO::Services::ManilaShare
     - OS::TripleO::Services::Memcached
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MongoDb
     - OS::TripleO::Services::MySQL
     - OS::TripleO::Services::MySQLClient
diff --git a/roles/Database.yaml b/roles/Database.yaml
index f72a4caa78..efe0aad512 100644
--- a/roles/Database.yaml
+++ b/roles/Database.yaml
@@ -19,6 +19,7 @@
     - OS::TripleO::Services::Ipsec
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQL
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::Ntp
diff --git a/roles/HciCephAll.yaml b/roles/HciCephAll.yaml
index 72eef8659a..9dfb2fa42d 100644
--- a/roles/HciCephAll.yaml
+++ b/roles/HciCephAll.yaml
@@ -37,6 +37,7 @@
     - OS::TripleO::Services::Iscsid
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronBgpVpnBagpipe
     - OS::TripleO::Services::NeutronLinuxbridgeAgent
diff --git a/roles/HciCephFile.yaml b/roles/HciCephFile.yaml
index 639aee8ba9..a947b23ef8 100644
--- a/roles/HciCephFile.yaml
+++ b/roles/HciCephFile.yaml
@@ -33,6 +33,7 @@
     - OS::TripleO::Services::Iscsid
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronBgpVpnBagpipe
     - OS::TripleO::Services::NeutronLinuxbridgeAgent
diff --git a/roles/HciCephMon.yaml b/roles/HciCephMon.yaml
index d3d0468898..ab26e893af 100644
--- a/roles/HciCephMon.yaml
+++ b/roles/HciCephMon.yaml
@@ -34,6 +34,7 @@
     - OS::TripleO::Services::Iscsid
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronBgpVpnBagpipe
     - OS::TripleO::Services::NeutronLinuxbridgeAgent
diff --git a/roles/HciCephObject.yaml b/roles/HciCephObject.yaml
index d35376e9e5..bec418590b 100644
--- a/roles/HciCephObject.yaml
+++ b/roles/HciCephObject.yaml
@@ -33,6 +33,7 @@
     - OS::TripleO::Services::Iscsid
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronBgpVpnBagpipe
     - OS::TripleO::Services::NeutronLinuxbridgeAgent
diff --git a/roles/IronicConductor.yaml b/roles/IronicConductor.yaml
index b01d872de5..4d6df73ca4 100644
--- a/roles/IronicConductor.yaml
+++ b/roles/IronicConductor.yaml
@@ -18,6 +18,7 @@
     - OS::TripleO::Services::IronicPxe
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::Ntp
     - OS::TripleO::Services::ContainersLogrotateCrond
diff --git a/roles/Messaging.yaml b/roles/Messaging.yaml
index 7269a34ff0..7dc42a1275 100644
--- a/roles/Messaging.yaml
+++ b/roles/Messaging.yaml
@@ -18,6 +18,7 @@
     - OS::TripleO::Services::Ipsec
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::Ntp
     - OS::TripleO::Services::ContainersLogrotateCrond
     - OS::TripleO::Services::Pacemaker
@@ -30,4 +31,3 @@
     - OS::TripleO::Services::TripleoFirewall
     - OS::TripleO::Services::TripleoPackages
     - OS::TripleO::Services::Tuned
-
diff --git a/roles/Networker.yaml b/roles/Networker.yaml
index d518ae01c9..d475a0756c 100644
--- a/roles/Networker.yaml
+++ b/roles/Networker.yaml
@@ -20,6 +20,7 @@
     - OS::TripleO::Services::IronicNeutronAgent
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronDhcpAgent
     - OS::TripleO::Services::NeutronL2gwAgent
diff --git a/roles/Novacontrol.yaml b/roles/Novacontrol.yaml
index 5b4119eaac..c56c918d59 100644
--- a/roles/Novacontrol.yaml
+++ b/roles/Novacontrol.yaml
@@ -18,6 +18,7 @@
     - OS::TripleO::Services::Ipsec
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NovaApi
     - OS::TripleO::Services::NovaConductor
diff --git a/roles/ObjectStorage.yaml b/roles/ObjectStorage.yaml
index 343212d5f1..aa21666511 100644
--- a/roles/ObjectStorage.yaml
+++ b/roles/ObjectStorage.yaml
@@ -27,6 +27,7 @@
     - OS::TripleO::Services::Ipsec
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::Ntp
     - OS::TripleO::Services::ContainersLogrotateCrond
diff --git a/roles/Standalone.yaml b/roles/Standalone.yaml
index a12ef6d47e..33dc85f6d2 100644
--- a/roles/Standalone.yaml
+++ b/roles/Standalone.yaml
@@ -98,6 +98,7 @@
     - OS::TripleO::Services::ManilaShare
     - OS::TripleO::Services::MasqueradeNetworks
     - OS::TripleO::Services::Memcached
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MistralApi
     - OS::TripleO::Services::MistralEngine
     - OS::TripleO::Services::MistralEventEngine
diff --git a/roles/Telemetry.yaml b/roles/Telemetry.yaml
index 6a53dc80a8..9e6811084e 100644
--- a/roles/Telemetry.yaml
+++ b/roles/Telemetry.yaml
@@ -31,6 +31,7 @@
     - OS::TripleO::Services::Ipsec
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::Ntp
     - OS::TripleO::Services::Pacemaker
diff --git a/roles_data.yaml b/roles_data.yaml
index 98806399d5..fe7eeb8936 100644
--- a/roles_data.yaml
+++ b/roles_data.yaml
@@ -112,6 +112,7 @@
     - OS::TripleO::Services::ManilaScheduler
     - OS::TripleO::Services::ManilaShare
     - OS::TripleO::Services::Memcached
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MistralApi
     - OS::TripleO::Services::MistralEngine
     - OS::TripleO::Services::MistralExecutor
@@ -224,6 +225,7 @@
     - OS::TripleO::Services::Iscsid
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::NeutronBgpVpnBagpipe
     - OS::TripleO::Services::NeutronLinuxbridgeAgent
@@ -275,6 +277,7 @@
     - OS::TripleO::Services::Iscsid
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::Ntp
     - OS::TripleO::Services::ContainersLogrotateCrond
@@ -318,6 +321,7 @@
     - OS::TripleO::Services::Ipsec
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::Ntp
     - OS::TripleO::Services::ContainersLogrotateCrond
@@ -357,6 +361,7 @@
     - OS::TripleO::Services::Ipsec
     - OS::TripleO::Services::Kernel
     - OS::TripleO::Services::LoginDefs
+    - OS::TripleO::Services::MetricsQdr
     - OS::TripleO::Services::MySQLClient
     - OS::TripleO::Services::Ntp
     - OS::TripleO::Services::ContainersLogrotateCrond
diff --git a/tools/yaml-validate.py b/tools/yaml-validate.py
index 7b58bb086d..7b5e639bb7 100755
--- a/tools/yaml-validate.py
+++ b/tools/yaml-validate.py
@@ -69,7 +69,8 @@ OPTIONAL_DOCKER_SECTIONS = ['docker_puppet_tasks', 'upgrade_tasks',
                             'kolla_config', 'global_config_settings',
                             'logging_source', 'logging_groups',
                             'external_deploy_tasks', 'external_post_deploy_tasks',
-                            'docker_config_scripts', 'step_config']
+                            'docker_config_scripts', 'step_config',
+                            'monitoring_subscription']
 # ansible tasks cannot be an empty dict or ansible is unhappy
 ANSIBLE_TASKS_SECTIONS = ['upgrade_tasks', 'pre_upgrade_rolling_tasks',
                           'fast_forward_upgrade_tasks',
@@ -212,6 +213,7 @@ PREFERRED_CAMEL_CASE = {
     'ec2api': 'Ec2Api',
     'haproxy': 'HAProxy',
     'tripleo-ui': 'TripleoUI',
+    'metrics-qdr': 'MetricsQdr'
 }
 
 # Overrides for docker/puppet validation