Fix for lvm_filters in case if storage.lvm is not defined.
- lvm_filters are not managed if no lvm pillar is in place.
One should be able to manage lvm_filters without managing lvm
items.
Prod-Related: PROD-36201
Change-Id: Ibef8244f27ffea6f7babced5634ed2b287eb8304
diff --git a/README.rst b/README.rst
index 03dc3d5..4d66e8a 100644
--- a/README.rst
+++ b/README.rst
@@ -2485,6 +2485,7 @@
parameters:
linux:
storage:
+ enabled: true
mount:
data:
enabled: true
diff --git a/linux/map.jinja b/linux/map.jinja
index 672566c..4250ef2 100644
--- a/linux/map.jinja
+++ b/linux/map.jinja
@@ -337,6 +337,7 @@
'swap': {},
'disk': {},
'lvm': {},
+ 'lvm_filters': {},
'lvm_services': ['lvm2-lvmetad', 'lvm2-lvmpolld', 'lvm2-monitor'],
'loopback': {},
'nfs': {
@@ -352,6 +353,7 @@
'mount': {},
'swap': {},
'lvm': {},
+ 'lvm_filters': {},
'disk': {},
'lvm_services': ['lvm2-lvmetad', 'lvm2-lvmpolld', 'lvm2-monitor'],
'loopback': {},
@@ -369,6 +371,7 @@
'mount': {},
'swap': {},
'lvm': {},
+ 'lvm_filters': {},
'disk': {},
'lvm_services': ['lvm2-lvmetad', 'lvm2-lvmpolld', 'lvm2-monitor'],
'loopback': {},
diff --git a/linux/storage/init.sls b/linux/storage/init.sls
index b996b73..6668b51 100644
--- a/linux/storage/init.sls
+++ b/linux/storage/init.sls
@@ -1,22 +1,22 @@
{%- from "linux/map.jinja" import storage with context %}
-{%- if storage.mount|length > 0 or storage.swap|length > 0 or storage.multipath.enabled or storage.disk|length > 0 or storage.lvm|length > 0 or storage.loopback|length > 0 %}
+{%- if storage.mount|length > 0 or storage.swap|length > 0 or storage.multipath.enabled or storage.disk|length > 0 or storage.lvm|length > 0 or storage.lvm_filters|length > 0 or storage.loopback|length > 0 %}
include:
-{%- if storage.loopback|length > 0 %}
+ {%- if storage.loopback|length > 0 %}
- linux.storage.loopback
-{%- endif %}
-{%- if storage.disk|length > 0 %}
+ {%- endif %}
+ {%- if storage.disk|length > 0 %}
- linux.storage.disk
-{%- endif %}
-{%- if storage.lvm|length > 0 %}
+ {%- endif %}
+ {%- if storage.lvm|length > 0 or storage.lvm_filters|length > 0 %}
- linux.storage.lvm
-{%- endif %}
-{%- if storage.mount|length > 0 %}
+ {%- endif %}
+ {%- if storage.mount|length > 0 %}
- linux.storage.mount
-{%- endif %}
-{%- if storage.swap|length > 0 %}
+ {%- endif %}
+ {%- if storage.swap|length > 0 %}
- linux.storage.swap
-{%- endif %}
-{%- if storage.multipath.enabled %}
+ {%- endif %}
+ {%- if storage.multipath.enabled %}
- linux.storage.multipath
-{%- endif %}
+ {%- endif %}
{%- endif %}