Change in vdsm[master]: vm: consider 'action' when handling I/O errors

fromani at redhat.com fromani at redhat.com
Thu Feb 27 12:06:48 UTC 2014


Francesco Romani has uploaded a new change for review.

Change subject: vm: consider 'action' when handling I/O errors
......................................................................

vm: consider 'action' when handling I/O errors

When VDSM receives an I/O error event from libvirt,
it does not consider the value of the 'action' callback
field, and thus considers the guest CPU stopped.

This is true in the default configuration, which translates
to the disk write error policy 'stop', but not necessarily
true if the said policy is 'enospace'.

In this case the reported state of the CPU goes out of sync.

Since the error policy may be changed through an hook,
the safest thing to do is actually check the 'action'
value as reported by libvirt in the IOError callback.

This patch adds this check, and additional logging in
the case the guest CPU is reported running after I/O
errors.

Change-Id: I9299399c3e5bef7e6e3111aa35e3483827ad57da
Bug-Url: https://bugzilla.redhat.com/1064630
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/clientIF.py
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/57/25157/1

diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py
index f8fe499..0169e81 100644
--- a/vdsm/clientIF.py
+++ b/vdsm/clientIF.py
@@ -550,7 +550,12 @@
                 v._rtcUpdate(utcoffset)
             elif eventid == libvirt.VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON:
                 srcPath, devAlias, action, reason = args[:-1]
-                v._onAbnormalStop(devAlias, reason)
+                if action == libvirt.VIR_DOMAIN_EVENT_IO_ERROR_PAUSE:
+                    v._onAbnormalStop(devAlias, reason)
+                else:
+                    self.log.warn('I/O error event on %s (%s) reason %s'
+                                  ' ignored due to action %i',
+                                  srcPath, devAlias, reason, action)
             elif eventid == libvirt.VIR_DOMAIN_EVENT_ID_GRAPHICS:
                 phase, localAddr, remoteAddr, authScheme, subject = args[:-1]
                 v.log.debug('graphics event phase '


-- 
To view, visit http://gerrit.ovirt.org/25157
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9299399c3e5bef7e6e3111aa35e3483827ad57da
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>


More information about the vdsm-patches mailing list