Allow fixed to float ping with external gateway.

If you ping an a floating ip from an instance with only a fixed ip, the
traffic will be sent to the default gateway. If the default gateway has
a route to the floating ip, it will then be sent to the host of the
instance with the floating ip. The source address will be on the fixed
network, so if the floating addresses are on a different network, the
receiving host to drop the packet due to the default rp_filter.
Essentially, the route for the fixed range is on a different interface
so it the kernel assumes the packet is spoofed and drops it.

In order to fix this issue this patch adds a new config option called
force_snat_range. Traffic that originates in fixed_range and has a
destination in force_snat_range will always be routed. This forces
the packet to hit the fallback floating roule and be snatted to
routing_source_ip. This means the traffic will originate from the
proper network and the packet will make it through.

DocImpact

Fixes bug 1122335

Change-Id: I7e31c25d37a5c4fd02c8238aec58a28af3fd7f6a
Added a service heartbeat driver using Memcached.

Today the heartbeat information of Nova services/nodes
is maintained in the DB, while each service updates the
corresponding record in the Service table periodically
(by default -- every 10 seconds), specifying the timestamp
of the last update. This mechanism is highly inefficient
and does not scale. E.g., maintaining the heartbeat
information for 1,000 nodes/services would require 100 DB
updates per second (just for the heartbeat).

This patch adds nova.servicegroup.drivers.memcached, a
service heartbeat driver using Memcached. You can reduce
DB updates with it.

blueprint memcached-service-heartbeat

Change-Id: I60bdb1cfbce1fea051f276ebfd6ccc4ad8fe6d2b
libvirt: Fix LXC container creation

Recent changes to the blockdev creation introduced in
7be531fe9462f2b07d4a1abf6687f649d1dfbb89 caused a regression
when LXC containers were being created.

When the image is being fetched from glance, the disk mappings
for the disk bus, disk information, etc is checked before being
copied. However since LXC does not understand this concept it was
not passing any information, so the image was never being copied.

Send some basic information about the disk when the instance is being
created in order for the image to begin. Fixes LP: #1126348

Change-Id: I90daf853903737013be0cd23f78c7f61e4e15a77
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Change all instances of the non-word "inteface" to "interface"

Change-Id: I64f92a6346461670330a0c6e066b6685d4fc1b06
Fibre channel block storage support (nova changes)

implements blueprint libvirt-fibre-channel

These changes constitute the required libvirt changes to
support attaching Fibre Channel volumes to a VM.

This requires a few new packages to be available on the system
sysfsutils -- This is needed to discover the FC HBAs
sg3-utils -- this package is needed for scsi device discovery
multipath -- This package is needed for multipath support.

Typical Fibre Channel arrays support exporting volumes via
multiple ports, so multipath support is highly desirable
for fault tolerance.  If multipath is not installed,
the new FibreChannel libvirt volume driver will still work.

If multipath is enabled, the new Fibre Channel volume driver
detects each of the attached devices for the volume, and
properly removes every one of them on detach.

In order to use this, the cinder volume driver's
initialize_connection will simply return a dictionary
with a new driver_volume_type called 'fibrechan'.

The target_wwn can be a single entry or a list of wwns
that correspond to the list of remote wwn(s) that will
export the volume.

return {'driver_volume_type': 'fibre_channel',
        'data': {'target_lun', 1,
                 'target_wwn': '1234567890123'}}

or

return {'driver_volume_type': 'fibre_channel',
        'data': {'target_lun', 1,
                 'target_wwn': ['1234567890123',
                                '0987654321321']}}

Change-Id: Ifccc56f960ef434f7cb56a9367e4cad288358440
Fix XML config tests for disk/net/cpu tuning

Due to a bug in the XML matching code, some XML formatting
problems related to disk/net/cpu tuning were not flaged as
errors. The problems were all simply ordering of the elements.
This patch also fixes some indentation problems at the same time

Fixes bug #1130146
Change-Id: Iee392ed823002b8231b33c27b487c2538b2dc8cd
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Fix XMLMatcher error reporting

The nova.tests.matchers.XMLMismatch class implements the
get_details() method returning a dictionary with the expect
and actual XML output. It is returning a string values, but
the testtools code requires that the dictionary values are
instances of the testtools.content.Content object.

To quote the 'get_details' docs on testtools.matchers.Mismatch

     :return: a dict mapping names to Content objects. name is a string to
         name the detail, and the Content object is the detail to add
         to the result. For more information see the API to which items from
         this dict are passed testtools.TestCase.addDetail.

Related bug #1130146
Change-Id: I75ec07d8b34b04c7b8009229fda49b344ed13bec
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
libvirt: Use uuid for instance directory name

This is done in a backwards compatible manner to deal with instances
started under the old regieme where we used a less unique name.

Resolves bug 1023865.

Change-Id: I4c9b7b291a30a7f3c2c9305c8fa346dc582bee88
Merge "Fibre channel block storage support (nova changes)"
Merge "Fix XML config tests for disk/net/cpu tuning"
Merge "Fix XMLMatcher error reporting"
Merge "libvirt: Fix LXC container creation"
Merge "Allow fixed to float ping with external gateway."
Merge "Change all instances of the non-word "inteface" to "interface""
Merge "Added a service heartbeat driver using Memcached."
Merge "libvirt: Use uuid for instance directory name"