Skip to content

Commit 741a723

Browse files
committed
multipath: Do not fail I/O after short outage
Since 3.6 we use "no_path_retry fail" for all devices by default. This setting is not new, but before 3.6 it was applied only to a few devices specified in our multipath conf, while other devices used the defaults hard-coded in the multipathd daemon. We have seen several reports in the user list showing that this setting makes oVirt too fragile considering short storage outage, and causing vms to pause too quickly. This patch changes the default setting to "no_path_retry 4". With this setting, once multipathd notices that the last path has failed, it will check all paths 4 more times (20 seconds assuming the default 5 second polling_interval). If no path is up, it will tell the kernel to stop queuing. After that, all outstanding and future I/O will immediately be failed, until a path is restored. Once a path is restored the 20 second delay is reset for the next time all paths fail. This change introduces a 20 seconds delay after the last path has failed, before outstanding I/O will fail. If there is a short storage outage on the server, and the server could recover in 20 seconds, no vm will pause, and commands ran by vdsm (e.g. lvm) will not fail. Note that this patch does not solve the issue of vm not resumed after a short storage outage, but it can decrease the chance that a vm will pause in this case. This change was merged in I6496dbdaafca6b110c952fcc5d51bf9ac04d49b4 but had to be reverted because of multipath regression in EL 7.3. The device-mapper-multipath version we require includes the fix for this regression. Change-Id: I5455df7a89ff8f7ea5123334a91c6ebfe4e5c552 Bug-Url:https://bugzilla.redhat.com/1335176 Signed-off-by: Nir Soffer <nsoffer@redhat.com>
1 parent a2b3776 commit 741a723

1 file changed

Lines changed: 17 additions & 8 deletions

File tree

‎lib/vdsm/tool/configurators/multipath.py‎

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@
3737
# "VDSM REVISION X.Y" tag. Note that older version used "RHEV REVISION X.Y"
3838
# format.
3939

40-
_CURRENT_TAG = "# VDSM REVISION 1.4"
40+
_CURRENT_TAG = "# VDSM REVISION 1.5"
4141

4242
_OLD_TAGS = (
43+
"# VDSM REVISION 1.4",
4344
"# VDSM REVISION 1.3",
4445
"# VDSM REVISION 1.2",
4546
"# RHEV REVISION 1.1",
@@ -60,6 +61,13 @@
6061
_PRIVATE_TAG = "# VDSM PRIVATE"
6162
_OLD_PRIVATE_TAG = "# RHEV PRIVATE"
6263

64+
# Once multipathd notices that the last path has failed, it will check
65+
# all paths "no_path_retry" more times. If no paths are up, it will tell
66+
# the kernel to stop queuing. After that, all outstanding and future
67+
# I/O will immediately be failed, until a path is restored. Once a path
68+
# is restored the delay is reset for the next time all paths fail.
69+
_NO_PATH_RETRY = 4
70+
6371
_CONF_DATA = """\
6472
%(current_tag)s
6573
@@ -94,11 +102,11 @@
94102
# (e.g. lvm) to get stuck for a long time, causing timeouts in
95103
# various flows, and may cause a host to become non-responsive.
96104
#
97-
# A small number of retries (e.g. no_path_retry 4) may be better,
98-
# protecting from short outage, but we cannot use it because of
99-
# https://bugzilla.redhat.com/1459370.
105+
# We use a small number of retries to protect from short outage.
106+
# Assuming the default polling_interval (5 seconds), this gives
107+
# extra 20 seconds grace time before failing the I/O.
100108
101-
no_path_retry fail
109+
no_path_retry %(no_path_retry)d
102110
103111
# Required for having same device names on all hosts.
104112
# DO NOT CHANGE!
@@ -170,7 +178,7 @@
170178
# settings in the "defaults" section), or to devices defined in
171179
# the "devices" section.
172180
all_devs yes
173-
no_path_retry fail
181+
no_path_retry %(no_path_retry)d
174182
}
175183
}
176184
@@ -179,10 +187,11 @@
179187
# multipathd.
180188
#
181189
# overrides {
182-
# no_path_retry fail
190+
# no_path_retry %(no_path_retry)d
183191
# }
184192
185-
""" % {"current_tag": _CURRENT_TAG}
193+
""" % {"current_tag": _CURRENT_TAG,
194+
"no_path_retry": _NO_PATH_RETRY}
186195

187196
# If multipathd is up, it will be reloaded after configuration,
188197
# or started before vdsm starts, so service should not be stopped

0 commit comments

Comments
 (0)