Fix xml metadata for volumes extension.

Fixes bug 1040891

Change-Id: I3a5d46af18f764e86ab457071d2b3afafdcdaa24
Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
Fix creation of iscsi targets

Previously when creating iscsi volumes, we were using

tgt-admin -e -c <config file> --update volume-id

Unfortunately the side affect of this is that tgt-admin
removed other volumes that wasnt connected to an iscsi
connector. Which is obvlously not what we want.

In order to fix this we create the targets.conf for the
volume but we call tgt-admin --update icssi qualified name.
We also set the tid in the configuration file now as well.

Fixes LP: #1038062

Change-Id: I23719390fbfaea5b55389a5c8ebaa8966cc283a8
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Get the extension alias to compose the path to save the api samples

Use extension alias instead of the whole module path to compose the directory
where the api-samples will be saved.

Change-Id: I7a1ae1deab4aa67643d960555fe6dbdcbc4e3c45
Move api_samples to doc dir

The generated api_samples aren't used for the tests, they're only
included in git so that they can be synced into the docs. Move them
to the doc/ dir to make that more clear since I keep forgetting.

Change-Id: I0851ac0ee234dc1e8740666716733e05f856ddec
Fixing call to hasManagedSaveImage

Fixes bug #1044090

hasManagedSaveImage is not implmented in the LXC libvirt driver, resulting
in the following error when a vm is deleted "Error from libvirt during saved
instance removal. Code=3 Error=this function is not supported by the
connection driver: virDomainHasManagedSaveImage"

This commit replaces the use of hasManagedSaveImage, managedSaveRemove and
undefine with undefineFlags which does the work of all 3 calls and is
implemented in versions of libvirt > 0.9.4. We also revert back to calling
undefine if undefineFlags raises an error.

Change-Id: Ib8d451aeff7767f835c3c1aab99ee4ab5e299852
Add missing argument to novncproxy websockify call

Current websockify constructor in nova-novncproxy requires
target_path to be explicitely set. This commit adds the missing
parameter. Fixes bug 1031998.

Change-Id: I05e346b5df5bc1501b55ff606fc4cefdda889d60
avoid the buffer cache when copying volumes

The dd process when clearing volumes, was seen to starve
the system when writing to an iSCSI SAN connected over GigE.

So use O_DIRECT within the dd process so that the system
buffer cache is not impacted, which is generally the
best thing to do when streaming large amounts of data.

Also one could drop the I/O priority of the dd process
by prepending "ionice -c3". That would change the priority
from "normal" (best effort) to "idle", which means zeroing
will only proceed when there is no other I/O on the system.
It was thought best to leave scheduling decisions to the
system however, rather than specifying them explicitly.

Fixes bug: 937694
Change-Id: Ic842d7b83209c41d8ff05075990ed12e6f86283a
Merge "Get the extension alias to compose the path to save the api samples"
Merge "Fixing call to hasManagedSaveImage"
Merge "Fix creation of iscsi targets"
Merge "avoid the buffer cache when copying volumes"
Merge "Add missing argument to novncproxy websockify call"
Fix and cleanup compute node stat tracking

Fix an issue where compute node stats are not reported correctly
if the instance's state was modified from outside of the compute
host. (e.g. nova-api server changing task_state prior to invoking
a rebuild_instance on the compute manager)

Also did some general cleanup on the stats code.

bug 1046591

Change-Id: I5d9fc78f22df6854777c5957cbc69c8dd5ec10d3
Allow cinder catalog match values to be configured

Depending on how a deployments keystone catalog is set up, the
default values passed in to the cinder client may be incorrect.
This adds a configuration option to specify exactly where to look
for the cinder endpoint in the service catalog.

Fixes bug 1047033

Change-Id: I93324b6930f384306311b0bbac375a9224283fbc
Merge "Fix and cleanup compute node stat tracking"
Merge "Move api_samples to doc dir"
Merge "Fix xml metadata for volumes extension."
Generate a flavorid if needed at flavor creation

When creating a new flavor, it's now possible to omit flavorid. In this
case it will be automatically generated using utils.gen_uuid().
nova-manage and OS API updated accordingly.

Fixes: bug #1043410
Change-Id: Ibf9229599dac953177fbf1ffac5242ed716142db
Merge "Allow cinder catalog match values to be configured"
Merge branch 'master' of https://github.com/openstack/nova