Fixes bug 943188

Enusre when an aggregate is re-created, it is in the created state,
not just the state it was when last created.

Change-Id: Ie8d63e3d334a872d52d81a9bd66730f08323d5c9
Checks image virtual size before qemu-img resize.

Checks virtual size instead of file size. Fixes bug 905350.

Change-Id: I1772b0996b7c9a2e07d3e298b156f777df67ef5f
Improve vnc proxy docs.

Change-Id: I306be059a3215b6c51b6cd8d546a208479dfe5e3
Use a high number for our default mac addresses

 * FE has the locally administered bit set and multicast bit unset
 * fixes bug 921838

Change-Id: Id33a06985c4150da4c5367c700f894590fdac2b9
Fixes os-volume/snapshot delete

 * includes test
 * fixes bug 929773

Change-Id: I4c37617dc9377e26c491fb42c3e3e60a58e2404f
Don't use glance when verifying images.

Using glance means that admin contexts need to know how to use
keystone when that is enabled. Its safer to avoid calling glance
at all from inside the periodic task.

This should resolve bug 934464.

Change-Id: Ib730e3f57721fca7080d90ae80b5f8916c1dc76c
fix up nova-manage man page

Change-Id: If78542faef536b9897f771a091f096745b3ece8a
Simply & unify console handling for libvirt drivers

Currently the libvirt.xml.template file contains the following
console definitions

        <!-- The order is significant here.  File must be defined first -->
        <serial type="file">
            <source path='${basepath}/console.log'/>
            <target port='1'/>
        </serial>

        <console type='pty' tty='/dev/pts/2'>
            <source path='/dev/pts/2'/>
            <target port='0'/>
        </console>

        <serial type='pty'>
            <source path='/dev/pts/2'/>
            <target port='0'/>
        </serial>

There are multiple things wrong with this

 - LXC and Xen guests don't honour the <serial> elements
 - The <console> element shouldn't have any <source> element
   of 'tty' attribute set when type=pty, since they are
   dynamically allocated
 - The <console> element will ignored if the <serial>
   element is set and the hypervisor supports this
 - It doesn't say why multiple serial elements are used
   or why the order is important. The reason is that
   the QEMU pty driver throws away data when no client
   is connected. This means we can't use it as a basis
   for the persistent log file. Instead we need two
   separate serial ports, the first of which is used for
   the logfile

In addition in the nova/virt/libvirt/connect.py class the
'get_console_output' method has separate special-case
handling for Xen and LXC despite the fact that both work
in the same way.

All this can be significantly simplified, to unify console
handling across all libvirt drivers. First replacing all
the existing XML with just

  #if $type == 'qemu'
        <serial type='file'>
            <source path='${basepath}/console.log'/>
        </serial>
        <serial type='pty'/>
  #else
        <console type='pty'/>
  #end if

This lets Xen/UML/LXC just use a regular PTY based console,
while special casing QEMU. It is minimal XML, letting
libvirt automatically fill in other attributes

In the code, the get_console_output method can remove the
explicit checks for Xen/LXC and instead be conditionalized
based on what the XML shows.

Finally calling out to 'virsh ttyiname' is pointless since
nova already has a connection to libvirt which can be used
to fetch the XML & extract the TTY path.

Change-Id: I6a966df4ea72e07dbc227683c4225670984fc507
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Add pybasedir and bindir options

Add a pybasedir option so that it can be used for interpolation in the
default values of other options. This helps eliminate hard-coded paths
from the sample config file.

Also add a bindir option for similar reasons, but it also helps with
packaging.

Change-Id: Iadc746dcf2a24adbdf9bac945b5b330f01faeeb5
Update cfg from openstack-common

Change-Id: Ic4eba98d6fe1868f8da82e02eb2ab3d6e37b1b40
Use cache='none' for all disks

The default QEMU disk cache mode has changed several times in
QEMU's history. This means OpenStack launched VMs have unpredictable
data consistency guarantees and performance characteristics. Using
cache=none bypasses the host page cache by using direct IO. This
ensures:

 - Consistent I/O performance for VMs
 - Avoids data loss on a host OS crash
 - Avoids data corruption of images during migration

Change-Id: I099dac55b8cfa1f0ec5d0e49d1d9ffbe4ae2560d
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
fixup ldapdns default config

This results in cleaner sample configs
generated from the new generator tool

Change-Id: I2a8b7dd1ef3840cfb4e7e4ebcc416aaead2972ea
Hack to fixup absolute pybasedir in nova.conf.sample

We want to avoid e.g. /home/markmc or /Users/vishvananda in this
file.

/usr/lib/python/site-packages is pretty dumb too, but it's suffices
as an example.

Change-Id: I851841a30ca01790c7b5a9b6bdbd160f4a84467c
Switch all xenapi async plugin calls to be sync

Originally all calls were required to be async because of integration
with twisted, but that has long since been changed and just using the
synchronous calls is easier and less code.

Change-Id: Ib86fc721326de34fd71d68bbec42ecd65280aa8a
Fix nova-manage backend_add with sr_uuid

Fixes bug 950964

Remove FIXME in db.sm_backend_conf_get_by_sr
Add first() to sm_backend_conf_get_by_sr query
Change db/api.py:sm_backend_conf_get_by_sr to call correct impl method
Have nova-manage generate an actuall sr_uuid instead of always 'None'
Actually update backend values when specifying uuid

Change-Id: I620da4563d8c936b5a072c4683ae145280104fc2
Since 'net' is of nova.network.model.VIF class and 'ips' is an empty
list, net needs to be pulled from hydrated nw_info.fixed_ips(), and
appended to ips.

bug 942593

Change-Id: I9c2f55e300d1dad503b15c261027d988073e8e61
Merge "Switch all xenapi async plugin calls to be sync"
Reduce duplicated code in xenapi

Reduce three implementations of creating VBDs to one. Use helper
functions in other places.

Change-Id: I34ea03fc1fb3cb5d5d343cffa28da5bf3dff888b
Add VDI chain cleanup script.

References bug 949477

Change-Id: I819d4ed56675a4ef4e46adca2978b433386e128d
Use utils.temporary_chown to ensure permissions get reset

Change-Id: I8df1851acebf62f633e8422a2549a8d0227b307d