summaryrefslogtreecommitdiff
path: root/nova/privsep
diff options
context:
space:
mode:
authorBalazs Gibizer <balazs.gibizer@est.tech>2021-06-14 14:05:05 +0200
committerBalazs Gibizer <balazs.gibizer@est.tech>2021-06-15 12:39:26 +0200
commite59fc77c3d924cfab6ddcd780ae0604a84e64c30 (patch)
treea5cbc596348f1d3ea69078567ad85fe4b058cb1a /nova/privsep
parent052cf963583ab7c6bbe4fcbf7bfe69f8f6733bdb (diff)
downloadnova-e59fc77c3d924cfab6ddcd780ae0604a84e64c30.tar.gz
Retry lvm volume and volume group query
We observed that the vgs and lvs queries the our lvm driver uses can intermittently fail with error code 11 (EAGAIN). So this patch enabled the retry in oslo_concurrency.processutils for these calls. Change-Id: I93da6cb1675d77bcdcd1075641dea9e2afc0ee1a Closes-Bug: #1931710
Diffstat (limited to 'nova/privsep')
-rw-r--r--nova/privsep/fs.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/nova/privsep/fs.py b/nova/privsep/fs.py
index 4173c8e11e..11249322a4 100644
--- a/nova/privsep/fs.py
+++ b/nova/privsep/fs.py
@@ -57,14 +57,21 @@ def lvcreate(size, lv, vg, preallocated=None):
@nova.privsep.sys_admin_pctxt.entrypoint
def vginfo(vg):
- return processutils.execute('vgs', '--noheadings', '--nosuffix',
- '--separator', '|', '--units', 'b',
- '-o', 'vg_size,vg_free', vg)
+ # NOTE(gibi): We see intermittent faults querying volume groups failing
+ # with error code -11, hence the retry. See bug 1931710
+ return processutils.execute(
+ 'vgs', '--noheadings', '--nosuffix',
+ '--separator', '|', '--units', 'b',
+ '-o', 'vg_size,vg_free', vg,
+ attempts=3, delay_on_retry=True,
+ )
@nova.privsep.sys_admin_pctxt.entrypoint
def lvlist(vg):
- return processutils.execute('lvs', '--noheadings', '-o', 'lv_name', vg)
+ return processutils.execute(
+ 'lvs', '--noheadings', '-o', 'lv_name', vg,
+ attempts=3, delay_on_retry=True)
@nova.privsep.sys_admin_pctxt.entrypoint