Merge "Add libvirt exporter in Prometheus config as source"
diff --git a/README.rst b/README.rst
index 7e3b28d..1ae8d07 100644
--- a/README.rst
+++ b/README.rst
@@ -412,6 +412,34 @@
compute:
cpu_mode: host-model
+Nova compute workarounds
+------------------------
+
+Live snapshotting is disabled by default in nova. To enable this, it needs a manual switch.
+
+From manual:
+
+.. code-block:: yaml
+
+ # When using libvirt 1.2.2 live snapshots fail intermittently under load
+ # (likely related to concurrent libvirt/qemu operations). This config
+ # option provides a mechanism to disable live snapshot, in favor of cold
+ # snapshot, while this is resolved. Cold snapshot causes an instance
+ # outage while the guest is going through the snapshotting process.
+ #
+ # For more information, refer to the bug report:
+ #
+ # https://bugs.launchpad.net/nova/+bug/1334398
+
+Configurable pillar data:
+
+.. code-block:: yaml
+
+ nova:
+ compute:
+ workaround:
+ disable_libvirt_livesnapshot: False
+
Documentation and Bugs
======================
diff --git a/nova/files/mitaka/nova-compute.conf.Debian b/nova/files/mitaka/nova-compute.conf.Debian
index be66daa..7e94913 100644
--- a/nova/files/mitaka/nova-compute.conf.Debian
+++ b/nova/files/mitaka/nova-compute.conf.Debian
@@ -186,3 +186,7 @@
os_region_name = {{ compute.identity.region }}
catalog_info=volumev2:cinderv2:internalURL
+{%- if compute.workaround is defined %}
+[workarounds]
+disable_libvirt_livesnapshot={{ compute.workaround.get('disable_libvirt_livesnapshot', True)|lower }}
+{%- endif %}
diff --git a/nova/files/newton/nova-compute.conf.Debian b/nova/files/newton/nova-compute.conf.Debian
index aed1670..8b44941 100644
--- a/nova/files/newton/nova-compute.conf.Debian
+++ b/nova/files/newton/nova-compute.conf.Debian
@@ -201,3 +201,8 @@
user_domain_name={{ compute.ironic.get('user_domain_name', 'Default') }}
password={{ compute.ironic.password }}
{%- endif %}
+
+{%- if compute.workaround is defined %}
+[workarounds]
+disable_libvirt_livesnapshot={{ compute.workaround.get('disable_libvirt_livesnapshot', True)|lower }}
+{%- endif %}
diff --git a/nova/files/ocata/nova-compute.conf.Debian b/nova/files/ocata/nova-compute.conf.Debian
index 2c3a771..42d913b 100644
--- a/nova/files/ocata/nova-compute.conf.Debian
+++ b/nova/files/ocata/nova-compute.conf.Debian
@@ -10059,6 +10059,7 @@
# there is a new enough libvirt and the backend storage supports it)
# (boolean value)
#disable_libvirt_livesnapshot=true
+disable_libvirt_livesnapshot={{ compute.get('workaround', {}).get('disable_libvirt_livesnapshot', True)|lower }}
#
# Enable handling of events emitted from compute drivers.