From 694d8f092a277350a8ca69b2b4229a865f3ba380 Mon Sep 17 00:00:00 2001 From: Andreas Karis Date: Thu, 1 Jun 2017 12:03:57 -0400 Subject: [PATCH] Enable service capabilities update at less than 60 seconds periodic_interval only works at a minimum of 60 seconds for periodic_tasks that update service capabilities Make it possible for service capabilities updates to run at intervals < 60 seconds as defined in parameter periodic_interval in cinder.conf Change-Id: I0f78aa7dc04dc0d74fed7c2c84d3442f2993258d Closes-Bug: #1695018 --- cinder/volume/manager.py | 2 +- releasenotes/notes/bug-1695018-a2c01fb9e638a105.yaml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/bug-1695018-a2c01fb9e638a105.yaml diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py index 011f5fd355a..89f4dae7f08 100644 --- a/cinder/volume/manager.py +++ b/cinder/volume/manager.py @@ -2625,7 +2625,7 @@ class VolumeManager(manager.CleanableManager, return volume_stats - @periodic_task.periodic_task + @periodic_task.periodic_task(spacing=CONF.periodic_interval) def publish_service_capabilities(self, context): """Collect driver status and then publish.""" self._report_driver_status(context) diff --git a/releasenotes/notes/bug-1695018-a2c01fb9e638a105.yaml b/releasenotes/notes/bug-1695018-a2c01fb9e638a105.yaml new file mode 100644 index 00000000000..39cc4d5f005 --- /dev/null +++ b/releasenotes/notes/bug-1695018-a2c01fb9e638a105.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixed issue where Cinder periodic tasks could not be configured to run + more often than every 60 seconds. Setting ``periodic_interval`` in + cinder.conf to less than 60 will now work as expected.