Commit Graph

255 Commits

Author SHA1 Message Date
Johannes Erdfelt 3a95d451ed Catch httplib.HTTPException as well
Fixes bug 932927

None of the httplib exceptions will get converted into urllib2 exceptions

Change-Id: Iad72821fa1ed54fdb213b371223e94e183dec334
2012-02-15 18:52:40 +00:00
Devdeep Singh 6c3bc216c1 Changes for supporting fast cloning on Xenserver.
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
2012-02-13 09:31:01 +05:30
Rick Harris 4cad8add20 Send image properties to Glance
Fixes bug 928549

Change-Id: Ie89e9c49c1fe25ed4acd680dd8c2c5e84173cdcd
2012-02-07 23:34:48 +00:00
Armando Migliaccio a5d5368a46 Bug #921730: plugins/xenserver/xenapi/etc/xapi.d/plugins/objectstore no longer in use
remove the plugin and update resources accordingly.

Change-Id: Ib4184c9b81b40e6892886c71fd8de09ba55322af
2012-01-26 14:09:26 +00:00
Vishvananda Ishaya 20b4d89512 Remove a whole bunch of unused imports
Change-Id: I6759e5b6250c48cc0deb4b198b44c948c64c47d1
2012-01-13 13:55:38 -08:00
Salvatore Orlando eac7888e72 Blueprint xenapi-security-groups
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
2012-01-10 17:16:31 +00:00
Dan Prince 93359c8476 Update glance Xen plugin w/ purge props header.
Update glance XenServer plugin to use X-Glance-Registry-Purge-Props.
Fixes LP Bug #908922.

Change-Id: I4d16fc8fb34e24195f3bc589d42bdbfadaf77398
2011-12-26 22:14:39 -05:00
Kevin L. Mitchell 6090313757 Updates OVS rules applied to IPv4 VIFs
Change-Id: I90cf18a6f60a792c184097f5eeea4282b58f85c5
2011-12-13 22:42:05 +00:00
Johannes Erdfelt c25f7e7e83 Implement resize down for XenAPI
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
2011-12-02 15:58:58 +00:00
Naveed Massjouni 9dbcd8bbc7 Replacing instance id's in in xenapi.vmops and the xen plugin with
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
2011-12-02 00:04:54 -05:00
Mark Washenberger a46e2a6e00 Workaround xenstore race conditions
Change-Id: I17791a78c2008e1bdc41f4f658200808ee72629c
2011-11-18 17:37:48 -05:00
Jenkins 7c34941b89 Merge "Add logging, error handling to the xenstore lib." 2011-11-16 21:19:31 +00:00
Rick Harris 84ac4d84ab Replacing disk config extension to match spec.
Related to instance-disk-management blueprint.

Change-Id: I84689583562f23356064a502577b2924bcbbc460
2011-11-16 14:12:03 -06:00
Mark Washenberger c51104ab01 Add logging, error handling to the xenstore lib.
Change-Id: If007ba117105d63b1eecfee5b8941d98032d2c9a
2011-11-15 16:21:54 -05:00
Ewan Mellor f11f6f789e Bug #888719: openvswitch-nova runs after firstboot scripts
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
2011-11-11 11:53:05 -08:00
Mark Washenberger 89f2fb00b9 Add more error handling to glance xenapi plugin
Also add some extra logging to help track down problems that occur
when getting images from glance.

Change-Id: I2246d06364211ae377c7a89f93a76f339a201a8d
2011-11-10 10:41:29 -05:00
Brian Lamar 9a32891107 Switch glance XenAPI plugin to use urllib2.
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
2011-11-08 11:17:41 -05:00
Naveed Massjouni 1b7fba648a Adding support for retrying glance image downloads.
Change-Id: Ifff40d90f7dc61a6d41ae2d6908d6e1e6f0aea7e
2011-10-26 14:48:46 -04:00
Jenkins d83f45faf1 Merge "Restructure host filtering to be easier to use." 2011-10-13 00:17:49 +00:00
Jenkins c12d610878 Merge "Allow tenant networks to be shared with domain 0." 2011-10-12 16:36:07 +00:00
Jenkins e47ddfd23e Merge "Use ovs-vsctl iface-to-br to look up the bridge associated with the given VIF. This avoids assuming that vifX.Y is attached to xenbrY, which is untrue in the general case." 2011-10-12 16:19:53 +00:00
Johannes Erdfelt 80e196069f Restructure host filtering to be easier to use.
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
2011-10-04 23:03:43 +00:00
Johannes Erdfelt 6574d1bb17 Make snapshots private by default
Fixes bug 850389

Change-Id: I22284c2f71b77aaa1aff0c0679320664cd23dae2
2011-09-28 03:22:41 +00:00
Dan Prince 21da183ede Make sure options is set before checking managed_disk setting. Fixes bug 860520.
Change-Id: I83c6c1cdb8e11959d6af5c08827e9f9ce82a5913
2011-09-27 08:58:54 -04:00
Jenkins a51533729a Merge "Adds disk config" 2011-09-27 05:05:35 +00:00
Dan Prince 14eb9c6ec9 Call endheaders when auth_token is None. Fixes bug 856721.
Change-Id: I2be932d3c532a7be03a0e5296e592e681c05b75d
2011-09-26 13:40:00 -04:00
Ewan Mellor 0a56ae6fa2 Allow tenant networks to be shared with domain 0.
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
2011-09-24 23:46:23 -07:00
Ewan Mellor 16e3f2effc Use ovs-vsctl iface-to-br to look up the bridge associated with the given VIF.
This avoids assuming that vifX.Y is attached to xenbrY, which is untrue in
the general case.

Change-Id: Ie3398b4a2231e0483acae272be71cb09a1744872
2011-09-24 23:40:26 -07:00
Matt Dietz 774b5aaa17 Adds disk config
Change-Id: If3e1765b659ead77f9cdaaa86ee8478a82bf67c0
2011-09-23 15:38:36 -05:00
Rick Harris 5652459c41 Fixing list prepend 2011-09-16 20:07:38 +00:00
Rick Harris 6f3ae6e1e5 Allowing resizes to the same machine 2011-09-16 00:22:31 +00:00
Dan Prince 9482275a60 Update GlanceClient, GlanceImageService, and Glance Xen plugin to work with
Glance keystone.
2011-09-10 13:56:54 -04:00
Ed Leafe ecc4e9ee38 Added the host 'enabled' status to the host_data returned by the plugin. 2011-08-17 19:58:22 +00:00
Ed Leafe fee2812193 Fixed typo found in review 2011-08-08 21:46:33 +00:00
Ed Leafe 8f6b59f0a1 Merged trunk. 2011-08-08 20:06:54 +00:00
Ed Leafe de23e5ad63 cleaned up unneeded line 2011-08-08 20:03:14 +00:00
Ed Leafe b23387ef7a Review fixes 2011-08-08 17:34:42 +00:00
Ed Leafe 6dcea0da62 Merged trunk 2011-08-08 15:34:04 +00:00
Ed Leafe 966b7218a0 Merged trunk 2011-08-08 15:31:29 +00:00
Ed Leafe 10ab2e76b1 Updated with code changes on LP 2011-08-08 14:07:03 +00:00
Ed Leafe f1f86d229c Merged trunk 2011-08-08 13:55:04 +00:00
Rick Harris 66916be1ad Read response to reset HTTPConnection state machine 2011-08-05 00:12:19 +00:00
Ed Leafe eb66810f60 Merged in the power action changes 2011-08-04 21:17:21 +00:00
Ed Leafe 75b110aa45 Changed all references to 'power state' to 'power action' as requested by review. 2011-08-04 20:49:21 +00:00
Ed Leafe 6ff2d660d7 Added xenhost config get/setting. 2011-08-04 19:32:10 +00:00
Dan Prince 5e1d63cf3b Updates to the XenServer glance plugin so that it obtains the set of
existing headers and sends them along with the request to PUT a
snapshotted image into glance.
2011-08-04 10:41:42 -04:00
Ed Leafe 3f7c71fd38 Merged trunk 2011-08-03 16:39:48 +00:00
Ed Leafe 8eab369a89 Merged trunk 2011-08-03 00:52:33 +00:00
Ed Leafe a0ec6a6aa5 Removed duplicate methods created by previous merge. 2011-08-03 00:52:15 +00:00
Ed Leafe 0bd6bf4a79 Merged from lab 2011-08-02 19:29:40 +00:00