Merge "Managing filesystem_store_metadata_file variable"
diff --git a/glance/files/juno/glance-api.conf.Debian b/glance/files/juno/glance-api.conf.Debian
index c4152b9..4254065 100644
--- a/glance/files/juno/glance-api.conf.Debian
+++ b/glance/files/juno/glance-api.conf.Debian
@@ -98,7 +98,7 @@
# be returned to the user in the 'direct_url' meta-data field.
# The default value is false.
#show_image_direct_url = False
-show_image_direct_url = True
+show_image_direct_url = {{ server.get('show_image_direct_url', True)|lower }}
# Send headers containing user and tenant information when making requests to
# the v1 glance registry. This allows the registry to function as if a user is
@@ -500,7 +500,7 @@
# Directory that the Filesystem backend store
# writes image data to
-filesystem_store_datadir = /var/lib/glance/images/
+filesystem_store_datadir = {{ server.get('filesystem_store_datadir', '/var/lib/glance/images/') }}
# A list of directories where image data can be stored.
# This option may be specified multiple times for specifying multiple store
diff --git a/glance/files/juno/glance-cache.conf.Debian b/glance/files/juno/glance-cache.conf.Debian
index ab7a87f..0f88d1a 100644
--- a/glance/files/juno/glance-cache.conf.Debian
+++ b/glance/files/juno/glance-cache.conf.Debian
@@ -63,7 +63,7 @@
# Directory that the Filesystem backend store
# writes image data to
-filesystem_store_datadir = /var/lib/glance/images/
+filesystem_store_datadir = {{ server.get('filesystem_store_datadir', '/var/lib/glance/images/') }}
# ============ Swift Store Options =============================
diff --git a/glance/files/kilo/glance-api.conf.Debian b/glance/files/kilo/glance-api.conf.Debian
index 7bb0ba8..67a6b7e 100644
--- a/glance/files/kilo/glance-api.conf.Debian
+++ b/glance/files/kilo/glance-api.conf.Debian
@@ -62,7 +62,7 @@
# Allow access to version 2 of glance api
#enable_v2_api = True
-filesystem_store_datadir=/var/lib/glance/images/
+filesystem_store_datadir = {{ server.get('filesystem_store_datadir', '/var/lib/glance/images/') }}
# Return the URL that references where the data is stored on
# the backend storage system. For example, if using the
@@ -70,7 +70,7 @@
# be returned to the user in the 'direct_url' meta-data field.
# The default value is false.
#show_image_direct_url = False
-show_image_direct_url = True
+show_image_direct_url = {{ server.get('show_image_direct_url', True)|lower }}
# Send headers containing user and tenant information when making requests to
# the v1 glance registry. This allows the registry to function as if a user is
@@ -590,7 +590,7 @@
# Directory that the Filesystem backend store
# writes image data to
-filesystem_store_datadir = /var/lib/glance/images/
+filesystem_store_datadir = {{ server.get('filesystem_store_datadir', '/var/lib/glance/images/') }}
# A list of directories where image data can be stored.
# This option may be specified multiple times for specifying multiple store
diff --git a/glance/files/kilo/glance-cache.conf.Debian b/glance/files/kilo/glance-cache.conf.Debian
index c8c8f37..d233076 100644
--- a/glance/files/kilo/glance-cache.conf.Debian
+++ b/glance/files/kilo/glance-cache.conf.Debian
@@ -55,7 +55,7 @@
# Directory that the Filesystem backend store
# writes image data to
-filesystem_store_datadir = /var/lib/glance/images/
+filesystem_store_datadir = {{ server.get('filesystem_store_datadir', '/var/lib/glance/images/') }}
# ============ Swift Store Options =============================
diff --git a/glance/files/liberty/glance-api.conf.Debian b/glance/files/liberty/glance-api.conf.Debian
index 17eb3d8..1b432ca 100644
--- a/glance/files/liberty/glance-api.conf.Debian
+++ b/glance/files/liberty/glance-api.conf.Debian
@@ -66,7 +66,7 @@
# Allow access to version 2 of glance api
#enable_v2_api = True
-filesystem_store_datadir=/var/lib/glance/images/
+filesystem_store_datadir = {{ server.get('filesystem_store_datadir', '/var/lib/glance/images/') }}
# Return the URL that references where the data is stored on
# the backend storage system. For example, if using the
@@ -74,7 +74,7 @@
# be returned to the user in the 'direct_url' meta-data field.
# The default value is false.
#show_image_direct_url = False
-show_image_direct_url = True
+show_image_direct_url = {{ server.get('show_image_direct_url', True)|lower }}
# Send headers containing user and tenant information when making requests to
# the v1 glance registry. This allows the registry to function as if a user is
@@ -599,7 +599,7 @@
# Directory that the Filesystem backend store
# writes image data to
-filesystem_store_datadir = /var/lib/glance/images/
+filesystem_store_datadir = {{ server.get('filesystem_store_datadir', '/var/lib/glance/images/') }}
# A list of directories where image data can be stored.
# This option may be specified multiple times for specifying multiple store
diff --git a/glance/files/liberty/glance-cache.conf.Debian b/glance/files/liberty/glance-cache.conf.Debian
index c8c8f37..d233076 100644
--- a/glance/files/liberty/glance-cache.conf.Debian
+++ b/glance/files/liberty/glance-cache.conf.Debian
@@ -55,7 +55,7 @@
# Directory that the Filesystem backend store
# writes image data to
-filesystem_store_datadir = /var/lib/glance/images/
+filesystem_store_datadir = {{ server.get('filesystem_store_datadir', '/var/lib/glance/images/') }}
# ============ Swift Store Options =============================
diff --git a/glance/files/mitaka/glance-api.conf.Debian b/glance/files/mitaka/glance-api.conf.Debian
index 54756a0..b4f1b69 100644
--- a/glance/files/mitaka/glance-api.conf.Debian
+++ b/glance/files/mitaka/glance-api.conf.Debian
@@ -64,7 +64,7 @@
# properties. Revealing storage location can be a security risk, so
# use this setting with caution! (boolean value)
#show_image_direct_url = false
-show_image_direct_url = true
+show_image_direct_url = {{ server.get('show_image_direct_url', True)|lower }}
# Whether to include the backend image locations in image properties.
# For example, if using the file system store a URL of
@@ -1150,7 +1150,7 @@
# Directory to which the Filesystem backend store writes images.
# (string value)
#filesystem_store_datadir = /var/lib/glance/images
-filesystem_store_datadir=/var/lib/glance/images/
+filesystem_store_datadir = {{ server.get('filesystem_store_datadir', '/var/lib/glance/images/') }}
# List of directories and its priorities to which the Filesystem
# backend store writes images. (multi valued)
diff --git a/glance/files/newton/glance-api.conf.Debian b/glance/files/newton/glance-api.conf.Debian
index 0d40d9a..90f6117 100644
--- a/glance/files/newton/glance-api.conf.Debian
+++ b/glance/files/newton/glance-api.conf.Debian
@@ -294,7 +294,7 @@
#
# (boolean value)
#show_image_direct_url = false
-show_image_direct_url = true
+show_image_direct_url = {{ server.get('show_image_direct_url', True)|lower }}
# DEPRECATED:
# Show all image locations when returning an image.
@@ -2271,7 +2271,7 @@
#
# (string value)
#filesystem_store_datadir = /var/lib/glance/images
-filesystem_store_datadir=/var/lib/glance/images/
+filesystem_store_datadir = {{ server.get('filesystem_store_datadir', '/var/lib/glance/images/') }}
#
# List of directories and their priorities to which the filesystem
diff --git a/glance/files/newton/glance-glare.conf.Debian b/glance/files/newton/glance-glare.conf.Debian
index 7341151..3936c0b 100644
--- a/glance/files/newton/glance-glare.conf.Debian
+++ b/glance/files/newton/glance-glare.conf.Debian
@@ -1034,7 +1034,7 @@
#
# (string value)
#filesystem_store_datadir = /var/lib/glance/images
-filesystem_store_datadir=/var/lib/glance/images/
+filesystem_store_datadir = {{ server.get('filesystem_store_datadir', '/var/lib/glance/images/') }}
#
diff --git a/glance/files/newton/glance-registry.conf.Debian b/glance/files/newton/glance-registry.conf.Debian
index 6385f25..f736108 100644
--- a/glance/files/newton/glance-registry.conf.Debian
+++ b/glance/files/newton/glance-registry.conf.Debian
@@ -1149,7 +1149,7 @@
#use_tpool = false
[glance_store]
-filesystem_store_datadir = /var/lib/glance/images
+filesystem_store_datadir = {{ server.get('filesystem_store_datadir', '/var/lib/glance/images/') }}
swift_store_endpoint_type = {{ server.identity.get('endpoint_type', 'publicURL') }}
diff --git a/glance/files/ocata/glance-api.conf.Debian b/glance/files/ocata/glance-api.conf.Debian
index 2f129c8..7ae7ded 100644
--- a/glance/files/ocata/glance-api.conf.Debian
+++ b/glance/files/ocata/glance-api.conf.Debian
@@ -294,7 +294,7 @@
#
# (boolean value)
#show_image_direct_url = false
-show_image_direct_url = true
+show_image_direct_url = {{ server.get('show_image_direct_url', True)|lower }}
# DEPRECATED:
# Show all image locations when returning an image.
@@ -2337,7 +2337,7 @@
#
# (string value)
#filesystem_store_datadir = /var/lib/glance/images
-filesystem_store_datadir=/var/lib/glance/images/
+filesystem_store_datadir = {{ server.get('filesystem_store_datadir', '/var/lib/glance/images/') }}
#
# List of directories and their priorities to which the filesystem
diff --git a/glance/files/ocata/glance-glare.conf.Debian b/glance/files/ocata/glance-glare.conf.Debian
index 7341151..3936c0b 100644
--- a/glance/files/ocata/glance-glare.conf.Debian
+++ b/glance/files/ocata/glance-glare.conf.Debian
@@ -1034,7 +1034,7 @@
#
# (string value)
#filesystem_store_datadir = /var/lib/glance/images
-filesystem_store_datadir=/var/lib/glance/images/
+filesystem_store_datadir = {{ server.get('filesystem_store_datadir', '/var/lib/glance/images/') }}
#
diff --git a/glance/files/ocata/glance-registry.conf.Debian b/glance/files/ocata/glance-registry.conf.Debian
index 6385f25..f736108 100644
--- a/glance/files/ocata/glance-registry.conf.Debian
+++ b/glance/files/ocata/glance-registry.conf.Debian
@@ -1149,7 +1149,7 @@
#use_tpool = false
[glance_store]
-filesystem_store_datadir = /var/lib/glance/images
+filesystem_store_datadir = {{ server.get('filesystem_store_datadir', '/var/lib/glance/images/') }}
swift_store_endpoint_type = {{ server.identity.get('endpoint_type', 'publicURL') }}
diff --git a/glance/meta/prometheus.yml b/glance/meta/prometheus.yml
index 4b1f8e1..7085f59 100644
--- a/glance/meta/prometheus.yml
+++ b/glance/meta/prometheus.yml
@@ -13,6 +13,16 @@
summary: "Endpoint check for '{{ $labels.service }}' is down"
description: >-
Endpoint check for '{{ $labels.service }}' is down for 2 minutes
-{% endraw %}
+ GlanceErrorLogsTooHigh:
+{%- endraw %}
+ {%- set log_threshold = prometheus_server.get('alert', {}).get('GlanceErrorLogsTooHigh', {}).get('var', {}).get('threshold', 0.2 ) %}
+ if: >-
+ sum(rate(log_messages{service="cinder",level=~"error|emergency|fatal"}[5m])) without (level) > {{ log_threshold }}
+{%- raw %}
+ labels:
+ severity: warning
+ service: "{{ $labels.service }}"
+ annotations:
+ summary: 'Too many errors in {{ $labels.service }} logs'
+ description: 'The rate of errors in {{ $labels.service }} logs over the last 5 minutes is too high on node {{ $labels.host }} (current value={{ $value }}, threshold={%- endraw %}{{ log_threshold }}).'
{%- endif %}
-
diff --git a/glance/meta/telegraf.yml b/glance/meta/telegraf.yml
index 11d6b0d..bdacc59 100644
--- a/glance/meta/telegraf.yml
+++ b/glance/meta/telegraf.yml
@@ -5,4 +5,5 @@
http_response:
glance-api:
address: "http://{{ server.bind.address|replace('0.0.0.0', '127.0.0.1') }}:{{ server.bind.port }}/"
+ expected_code: 300
{%- endif %}
\ No newline at end of file
diff --git a/metadata/service/support.yml b/metadata/service/support.yml
index 39ef63a..a711054 100644
--- a/metadata/service/support.yml
+++ b/metadata/service/support.yml
@@ -15,3 +15,5 @@
enabled: true
prometheus:
enabled: true
+ telegraf:
+ enabled: true