Extend OpenContrail salt-formula by disable_vnc_api_stats option
Add support of disable_vnc_api_stats configuration option for
config-api service to disable/enable sending statistics to collector
service
Related-PROD: PROD-35795
Change-Id: I81e6f10d3480ac6a2d2799ad9cc0ea4794ccba4b
diff --git a/README.rst b/README.rst
index 4ab05bb..d4d2507 100644
--- a/README.rst
+++ b/README.rst
@@ -1633,6 +1633,21 @@
disable_stats_collection: True
....
+Disable sending VncApi stats to collector
+---------------------------------------------
+On every http resource request(create/update/list/etc...) config-api server throws
+statistics to collector. This option can be used to reduce amount of these messages
+to collector service.
+
+.. code-block:: yaml
+
+ opencontrail:
+ ....
+ config
+ ....
+ disable_vnc_api_stats: True
+ ....
+
Usage
=====
diff --git a/metadata/service/control/cluster.yml b/metadata/service/control/cluster.yml
index 5b7ff7d..c7fb5c1 100644
--- a/metadata/service/control/cluster.yml
+++ b/metadata/service/control/cluster.yml
@@ -75,6 +75,7 @@
- backup
contrail-device-manager:
- backup
+ disable_vnc_api_stats: True
control:
version: ${_param:opencontrail_version}
enabled: true
diff --git a/metadata/service/control/control.yml b/metadata/service/control/control.yml
index 4c152b5..7fd3470 100644
--- a/metadata/service/control/control.yml
+++ b/metadata/service/control/control.yml
@@ -75,6 +75,7 @@
- backup
contrail-device-manager:
- backup
+ disable_vnc_api_stats: True
control:
version: ${_param:opencontrail_version}
enabled: true
diff --git a/metadata/service/control/single.yml b/metadata/service/control/single.yml
index 7012569..b3422e6 100644
--- a/metadata/service/control/single.yml
+++ b/metadata/service/control/single.yml
@@ -59,6 +59,7 @@
members:
- host: ${_param:single_address}
id: 1
+ disable_vnc_api_stats: True
control:
version: ${_param:opencontrail_version}
enabled: true
diff --git a/opencontrail/files/4.0/contrail-api.conf b/opencontrail/files/4.0/contrail-api.conf
index 20ac10f..a9eb0c3 100644
--- a/opencontrail/files/4.0/contrail-api.conf
+++ b/opencontrail/files/4.0/contrail-api.conf
@@ -65,6 +65,9 @@
# Eg. to set utf-8 as the encoder
# default_encoding = utf-8
+# Enable/Disable sending VncApi stats to collector
+disable_vnc_api_stats={{ config.get('disable_vnc_api_stats', 'true')|lower }}
+
[SECURITY]
use_certs=False
keyfile=/etc/contrail/ssl/private_keys/apiserver_key.pem