Go to file
Daniel P. Berrange d1a1feb91f Fix launching of guests where instances_path is on GlusterFS
The FUSE module does not (currentl) support O_DIRECT on files.
This prevents QEMU from starting guests using 'cache=none' for
their disks located on a GlusterFS filesystem. The same also
applies for a handful of other filesystems (notably tmpfs, or
any other FUSE filesystem).

This patch introduces a startup check in Nova compute service
which tries to create a file $instances_path/.direct_io.test
using the O_DIRECT flag. If this succeeds, then cache=none
will be used for all disks, otherwise it will fallback to
using cache=writethrough. While the latter does not have
performance which is as consistent as cache=none, it is still
host-crash safe and preserves data integrity with migration,
if the filesystem is cache coherant (cluster filesystems like
GlusterFS are, NFS by constrast is not).

By doing the dynamic check for O_DIRECT, we ensure that if
future FUSE modules gain O_DIRECT support, Nova will automatically
do the right thing.

* nova/tests/test_libvirt.py: Stub out os.open in
  the _check_xml_and_disk_driver() to enable testing of
  both O_DIRECT and non-O_DIRECT code paths
* nova/tests/test_virt_drivers.py: Set instances_path to
  the current directory
* nova/virt/libvirt.xml.template: Replace hardcoded 'none'
  string with the '$cachemode' variable for all disks.
  Add missing 'cache' attribute for the config disk
* nova/virt/libvirt/connection.py: Check whether O_DIRECT
  is supported on the "FLAGS.instances_path" directory
  and use 'none' for cachemode if it is, 'writethrough'
  otherwise

Bug: 959637
Change-Id: I60cbff1c3ad8299fe2aa37099390f9235f6724d0
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-03-23 16:43:14 +00:00
2012-03-19 07:57:37 -07:00
2012-02-20 11:54:37 -08:00
2010-05-27 23:05:26 -07:00
2012-03-15 14:00:42 +01:00
2011-11-20 18:54:08 -05:00

The Choose Your Own Adventure README for Nova

You have come across a cloud computing fabric controller. It has identified itself as "Nova." It is apparent that it maintains compatibility with the popular Amazon EC2 and S3 APIs.

To monitor it from a distance: follow @openstack on twitter.

To tame it for use in your own cloud: read http://docs.openstack.org

To study its anatomy: read http://nova.openstack.org

To dissect it in detail: visit http://github.com/openstack/nova

To taunt it with its weaknesses: use http://bugs.launchpad.net/nova

To watch it: http://jenkins.openstack.org

To hack at it: read HACKING

To cry over its pylint problems: http://jenkins.openstack.org/job/nova-pylint/violations

Description
RETIRED, Client code for the common scheduler for OpenStack
Readme 18 MiB