Bug 865336

Summary: RFE: add werror=stop,rerror=stop to -drive parameter in QEMU command line (so VMs will pause upon IO errors)
Product: Red Hat OpenStack Reporter: Yaniv Kaul <ykaul>
Component: openstack-novaAssignee: Solly Ross <sross>
Status: CLOSED NOTABUG QA Contact: Ami Jeain <ajeain>
Severity: high Docs Contact:
Priority: unspecified    
Version: 1.0 (Essex)CC: apevec, dallan, jkt, kchamart, markmc, yeylon
Target Milestone: betaKeywords: FutureFeature
Target Release: 4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-11 18:07:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yaniv Kaul 2012-10-11 09:09:38 UTC
Description of problem:
Unless this is the default of downstream QEMU, we should have the VM pause upon IO errors to prevent data loss.

Version-Release number of selected component (if applicable):
Essex

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 Alan Pevec 2012-12-13 17:16:41 UTC
What would be the recovery action / alert to the user?

Comment 3 Dave Allan 2013-04-30 15:27:17 UTC
Dan, stop is the qemu default, right, so there's nothing needed here, is there?

Comment 4 Daniel Berrangé 2013-04-30 15:30:02 UTC
Yeah, but the bigger question is what todo when this situation occurs. Just marking the VM as paused in libvirt is not a full soltion

Comment 5 Dave Allan 2013-04-30 17:43:31 UTC
What needs to happen?

Comment 6 Daniel Berrangé 2013-05-01 07:40:07 UTC
I don't know - that's what someone needs to figure out.

Comment 8 Solly Ross 2013-06-03 13:56:31 UTC
According to the official qemu documentation (http://qemu.weilnetz.de/qemu-doc.html, linked from qemu.org), the default flags are werror=enospc and rerror=report, meaning report read errors to guest and on write errors pause qemu if host disk is full, otherwise report them to the guest..

HOWEVER:

This is supported via libvirt's error_policy (for both, override read error policy with rerror_policy) on the driver tag for the disk specification.  According to the libvirt doc, the default setting for libvirt is REPORT (I'm guessing that libvirt actually passes these to qemu, so the qemu defaults are moot).

So, injecting it in to the configuration should be pretty easy, but we probably also want to provide a configuration option.  As for state, perhaps we could use the metadata tag (http://libvirt.org/formatdomain.html#elementsMetadata) and have to store a flag, but we'd need to figure out how to detect if the stopping of the VM was intentional or accidental (we could manually set the flag to "on_purpose" whenever we intentionally shut down the vm, then look and see if the vm is shut down but on_purpose is not set).

Comment 9 Solly Ross 2013-06-06 20:35:34 UTC
(ping -- see above)

Comment 10 Solly Ross 2013-06-10 16:48:25 UTC
Bug added upstream: https://bugs.launchpad.net/nova/+bug/1189543 (no review id yet, though)

Comment 11 Solly Ross 2013-06-11 18:07:26 UTC
Polled upstream, consensus was WORKS AS INTENDED --

The thought was that this would be confusing for people running software in VMs (why is my VM suddenly stopped when I have code inside to handle IO errors) and that much existing software would rather just have the default (REPORT), and have the guest software (OS, database, etc) deal with the IO errors instead.