Implements blueprint fast-cloning-for-xenserver
1. use_cow_images flag is reused for xenserver to check if copy on write images should be used.
2. image-id is used to tag an image which has already been streamed from glance.
3. If cow is true, when an instance of an image is created for the first time on a given xenserver, the image is streamed from glance and copy on write disk is created for the instance.
4. For subsequent instance creation requests (of the same image), a copy on write disk is created from the base image that is already present on the host.
5. If cow is false, when an instance of an image is created for the first time on a host, the image is streamed from glance and its copy is made to create a virtual disk for the instance.
6. For subsequent instance creation requests, a copy of disk is made for creating the disk for the instance.
7. Snapshot creation code was updated to handle cow=true. Now there can be upto 3 disks in the chain. The base disk needs to be uploaded too.
8. Also added a cache_images flag. Depending on whether the flag is turned on on not, images will be cached on the host.
Change-Id: I54838a24b061c134877f3479c925c6ee78da14bc
Provides two drivers for implementing security groups in xenapi:
1) domU driver that enforces security groups on the Openstack virtual appliance (use advised with FlatDHCP in HA mode)
2) dom0 driver that enforces security groups where VIFs are attached
Both drivers translate security groups into iptables rules.
Existing libvirt code has been refactored to reduce the amount of duplicated code to a minimum
Now Addressing reviewers's comments on style. Fixing issue spotted with snapshots
Change-Id: Ifa16a8f2508a709be03241bac0f942fe1a51d1e8
This patch implements resizing an instance to a smaller disk. It implements
this by copying the VDI and running e2resize, before transferring to the
new host.
Change-Id: Ic901a59cb6cdb79605c70528cf85064d8335ee2f
instance uuids. The only references to instance id's left are calls to
the wait_for_task() method. I will address that in another branch.
blueprint: internal-uuids
Change-Id: I268706f2429e47195a97054187ff7da8c55e3719
Move openvswitch-nova to 23 in the boot order.
The openvswitch-nova init.d script used on XenServer has been set to run
at 96 in the boot order (i.e. very late). This is inconvenient, because it
means that it runs after the firstboot scripts, so if you want to do an
automated install of a compute VM, say, you can't rely on the Open vSwitch
rules being ready.
23 places it after the networking start up (9 through 14) and before the
firstboot scripts (24).
Change-Id: I5c4f2f02c78bd7b8ccc6cac4d6549209a6dcbdb0
Also add some extra logging to help track down problems that occur
when getting images from glance.
Change-Id: I2246d06364211ae377c7a89f93a76f339a201a8d
Currently the plugin uses httplib which does not handle redirects
natively. XenAPI plugins require Python 2.4+ so using httplib2
as far as I know is not a possibility.
(Patch Set 2) Oops, forgot to PEP8 before putting up for review.
(Patch Set 3) Updated logging to be more verbose as per Waldon
Change-Id: I189093fe26dfee30b5b8b3c0f2c21a35fbfbc05e
The original design for host filtering in the scheduler required the
entire filtering process be contained in a single class; contrast this
with the design for weighting the hosts, which allowed you to specify
a list of functions that would apply various weighting factors to the
hosts.
This commit modifies the filtering process to resemble the way that
the weighting process is designed. Filters can now be small, focused
classes, and you specify which filters to apply by setting the
'FLAGS.default_host_filters' flag to a list of the filter classes
that match your needs.
This is a port of the code from Launchpad, where it was orphaned:
https://code.launchpad.net/~ed-leafe/nova/scheduler-multifilter/+merge/72478
Change-Id: I5f3eff6f21409a9f0eddda3392e9ff9d03039ebe
If domain 0 has an IP address on a given bridge, then add a flow rule to
allow traffic to leave that port. This allows for the case where domain 0
and the tenant network are sharing a bridge, which is useful in non-production
environments.
At the same time, simplify the interface to ovs_configure_base_rules.py.
There is no need to pass the bridge in, because it's implicit in the selection
of the physical interface, and can be obtained using ovs-vsctl iface-to-br.
Having made these two changes, it's now reasonable to apply flow rules to all
interfaces as a default (if not overridden in the sysconfig file).
Change-Id: I2a33ed55246d49b0e4f57db909e1b40351d27602