summaryrefslogtreecommitdiffstats
path: root/plugins
Commit message (Collapse)AuthorAgeFilesLines
* xenapi: Make BitTorrent url more flexibleBrian Elliott2013-06-261-4/+3
| | | | | | | | | Change xenapi bittorrent plugin to not assume that torrent file is under CONF.xenapi_torrent_base_url + image_id + ".torrent". This allows for sources images from arbitrary torrent URLs. Change-Id: Ica9462a51c6299b5affc861781f3054d18866458
* xenapi: Improve cross-device linking error message.Brian Elliott2013-06-261-1/+7
| | | | | | | Catch invalid-cross device linking exceptions raise from os.rename and provide a more intelligible error message. Change-Id: I22b6a145141431b6d4e4cb0176881f0cf0dd609f
* Fix xenstore-rm race conditionChris Behrens2013-06-231-1/+7
| | | | | | | | | | | | | | | | | | | If an entry is already gone from xenstore, any other xenstore-rm will raise. When we make calls to nova-agent, we wait for the response in Xenstore. After a timeout period, we attempt to remove it. If the DomID has changed (due to a Windows VM rebooting at the right time via sysprep, etc)... or if the agent picked up the command and didn't respond in a timely fashion, the removal attempt will fail. It would be normal for the entry to be gone in this case. This fixes the plugin to ignore when the entry is already deleted. Fixes bug 1193720 Change-Id: I8585a9f147cad3c5abe531620872b475eb4128c9
* xenapi: implement get_console_output for XCP/XenServerJohn Garbutt2013-06-122-0/+81
| | | | | | | | | | | | | | | | If an administrator has enabled the logging of guest consoles on XCP/XenServer, this enables nova to return the last MB of those logs to the user. The management of the logs on the server is a little tricky, and will be sorted in a later patch. Change was based on this previous idea: https://review.openstack.org/#/c/17959/ DocImpact Part of blueprint xenapi-server-log Change-Id: I23c83bcf8c648cc2714a0c78951acc29a16d5c31
* Merge "Improve message and logging for corrupt VHD footers"Jenkins2013-05-141-15/+39
|\
| * Improve message and logging for corrupt VHD footersMatthew Sherborne2013-05-101-15/+39
| | | | | | | | | | | | | | | | * Handles the output of vhd-util check a bit more intelligently. * Changes it to use LOG like in other modules * Adds a necessary import (errno) Change-Id: I75d6b9e081159bc29732a721deb7a557e5f2ee06
* | Enable live block migration when using iSCSI volumesBob Ball2013-05-072-0/+20
|/ | | | | | | | | | | | | | | | | | | | | | | | | | Fix for bug 1160323. DocImpact Depends on a version of XAPI supporting relax-xsm-sr-check. Currently no release versions support this, so the change at https://github.com/xen-org/xen-api/pull/1116 would need to be applied to the source to enable this. XenServer 6.2 is expected to support this mode, and possibly some future hotfixes for XenServer 6.1. It also depends on a configuration change which must be documented and added to devstack: * Set "relax-xsm-sr-check = true" in /etc/xapi.conf This commit makes the following changes: * Attach the SR on the destination host prior to migrate * Returns the SR-ref from the pre_migrate call (API change) * Populates the XS VDI map with the sr-ref on the destination host * Removes the connection to the SR from the source host post-migrate * Added plugin to determine if iSCSI block migration is enabled Associated tempest test at https://review.openstack.org/#/c/26478/ Change-Id: I917d9cf094190d636f4b9e14f6c8e728ff85af0e Fixes: bug 1160323
* xenapi: rpmbuild fixesMate Lakat2013-03-202-3/+4
| | | | | | | | | | Fixes bug 1157695 This fix removes the parted dependency from the rpm specification file, and also gets rid of the assumption, that the build-rpm.sh is executed at a specific directory. Change-Id: I1dcf9096a783a88bc09af0f4f4d5541a7e505748
* Merge "xenapi: Adding logging for migration plugin"Jenkins2013-03-192-4/+17
|\
| * xenapi: Adding logging for migration pluginAndy Hill2013-03-182-4/+17
| | | | | | | | | | | | | | With this change administrators will be able to examine hypervisor logs for real-time progress of rsync operations (resizes, migrates). Change-Id: I463b574be1021e141fe2c8380b9c07f6cd860c78
* | Revert 1154253 causes XenServer image compat issueDan Prince2013-03-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 1154253 we: Drop gzip flag from tar command for OVF archives While support more OVF file formats is a worthy goal the approach in 1154253 is going to cause serious issues for existing Nova XenServer users who are already zipping their OVS images. I would also point out that our utils.py xenserver plugins still zips tarballs we create (see create_tarball) so the new code causes internal inconsistencies as well. This should fix SmokeStack. Fixes LP Bug #1155783. Change-Id: Iff6db314c0dec6df2e48d98db2a547f6624b9d9a
* | Drop gzip flag from tar command for OVF archivesGreg Ball2013-03-131-1/+1
| | | | | | | | | | | | Fixes bug 1154253 Change-Id: I3880d9b187dc25d2ff44fe502eec4d1e0bce4218
* | Merge "Adds retry on upload_vhd for xapi glance plugin"Jenkins2013-03-041-10/+22
|\ \
| * | Adds retry on upload_vhd for xapi glance pluginNicholas Kuechler2013-02-271-10/+22
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a retry for the xapi glance plugin to handle transient issues when uploading the vhd. An example issue we're seeing is a connection timeout: ['XENAPI_PLUGIN_FAILURE', 'upload_vhd', 'error', "(110, 'Connection timed out')"] To work around transient issues such as a connection timeout, we should retry based on glance_num_retries before outright failing. Change-Id: Ice6fdd3dd39ef40e5997d69209aaafa66bff5d6e Fixes: bug #1134493
* / Update OpenStack LLC to FoundationKurt Taylor2013-02-2617-17/+17
|/ | | | | | Update all references of "LLC" to "Foundation". Change-Id: I009e86784ef4dcf38882d64b0eff484576e04efe
* Harmonize PEP8 checking between tox and run_tests.shRick Harris2013-02-153-4/+4
| | | | | | | | | | | | | | | | | Tox and run_tests.sh were running PEP8 checks against different file-sets. This patch refactors the logic to determine which files to run PEP8 checks on into `tools/run_pep8.sh` where it can be called by both tox and `run_tests.sh`. Additional fixes: Some of our Python XenAPI Dom0 plugins don't end in *.py but should still be checked by PEP8. This patches fixes the hacking.py violations in the files and adds them back to the srcfiles list. Merged tools/unused_imports.sh into tools/run_pep8.sh Change-Id: Id5edd1acb644ab938beffc3473494a179d9d8cda
* fix misspellings in logs, comments and testsPádraig Brady2013-01-211-1/+1
| | | | | | | | Flagged with: https://github.com/lyda/misspell-check Run with: git ls-files | misspellings -f - Fixes bug: 1100083 Change-Id: Icf1f844fea8ad0a1101d1dc64b9a126608e9536e
* fix new N402 errorsSean Dague2013-01-102-3/+3
| | | | | | | | | | | | fix the N402 errors that have slipped in in the last 48 hrs since starting this patch series. fix an N401 error that our scanner current can't find because it only looks for doc strings on classes and defs. this is the xeno's paradox of patch series, but we're getting close. Change-Id: I4a763bb4c812335d853eae05c72464f18ab93297
* Fix bandwidth polling exception.Monsyne Dragon2012-11-051-1/+1
| | | | | | | | | | | | | | When the bandwidth polling task tries to update bw usage for an instance that does not have an entry for the last two periods already in the bw_usage_cache table, it will throw an exception in the polling task. This was just a misses 'if' statement. Also: xenserver: fix swapped bw data in xs plugin. This fixes bug 1075255 Change-Id: I44bb143039fcdfc8dacb13b67ae8f79dc5f38777
* Add ability to download images via BitTorrent.Rick Harris2012-10-034-0/+432
| | | | | | | | | | | | | | This patch adds a new dom0 plugin which supports downloading images via BitTorrent. Torrent metadata files are assumed to be served from a webserver which is specified by the `torrent_base_url` config. Under the hood, the dom0 plugins calls out to rasterbar's libtorrent via Python bindings in order perform the initial download as well as the seeding thereafter. Implements BP xenserver-bittorrent-images Change-Id: I824720a6e3a37317080a22cd7405d2a88172c3ef
* Merge "xenapi: Removing legacy swap-in-image."Jenkins2012-10-011-18/+3
|\
| * xenapi: Removing legacy swap-in-image.Rick Harris2012-09-261-18/+3
| | | | | | | | | | | | | | This patch removes our legacy handling of swap in the image. Now that we're generating swap on-the-fly, this stop-gap solution can go away. Change-Id: Ied3198f77af8dabb6cfbf2ab9cfb3a4eb18e32ea
* | Update RPM SPEC to include new bandwidth plugin.Brian Lamar2012-10-011-0/+1
| | | | | | | | | | | | | | | | | | RPM builds will fail until this line is added to include the new plugin. Fixes bug 1059772 Change-Id: I06d78cf199d4cb580003e4c220af3efc8dbe437c
* | Merge "Fix XenServer's ability to boot xen type images"Jenkins2012-09-301-1/+3
|\ \
| * | Fix XenServer's ability to boot xen type imagesMate Lakat2012-09-251-1/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug 1055431. As the scheduler wants to boot a vm_mode=xen type of image, the host's "supported_instances" capability is used for finding a good candidate. In the Xapi case, this field was not populated. This fix modifies the xapi xenhost plugin, so the Xen host capabilities are returned back to the compute node, as "host_capabilities". On the compute side, the mentioned information is used, to extract the "supported_instances" information. Change-Id: I2da11ab81f74b5b52e2c30832a694470978e21b0
* | Merge "Collect more accurate bandwidth data for XenServer"Jenkins2012-09-291-0/+51
|\ \
| * | Collect more accurate bandwidth data for XenServerMonsyne Dragon2012-09-251-0/+51
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the method used to poll xenserver for bandwidth data. The reccomended way of collecting such data from xenserver (namely the RRD files provided by the hosts) do not seem to be reliable, they will sometimes be correct, often will be signifigantly under (> 10%), and occasionally will show artifacts, such as phantom 4gb bandwidth 'spikes'. This patch changes that to use the much simpler method of simply polling the byte counters on the VIF network devices on the host. (We have old non-nova code that does that on xenserver, and that method is known to work). This should also make it much easier for other hypervisors other than xenserver to implement bandwidth polling, as polling the counters is a rather more universal method. Fixes bug 1055737 Change-Id: I6a280d8bbfcc74914f888b11bc09349a270a5f58
* / xenapi: increase timeout for resetnetwork agent requestJohannes Erdfelt2012-09-261-14/+20
|/ | | | | | | | | | Windows can take longer than the default 30 seconds for resetnetwork requests. Double the timeout for the command to 60 seconds, but add a flag so it can be changed without code changes in the future. At the same time, add a flag for all other agent requests too. Change-Id: Iba91c37fd5596ea0dd63c20f74925972df1ca715
* xenapi: Make dom0 serialization consistent.Rick Harris2012-09-074-92/+34
| | | | | | | | | | | | | | | | The dom0 plugin code had been using `pickle` for serializing input and `json` for serializing output which was needlessly inconsistent. This patch makes the code use `pickle`--chosen for its better handling of `datetime` objects--for both sending and receiving data. This patch also refactors the code so that neither the caller nor the callee need to explicitly worry about serialization: the caller just passes in args and kwargs, and the callee's function signature just accepts the args and kwargs as usual. Bonus: Removes unecessary imports Change-Id: I3abb42eeebd8d37d67e6c26fa7bcae66d876b3ee
* Allow connecting to a ssl-based glanceVincent Untz2012-08-271-7/+23
| | | | | | | | | | This introduces a new glance_api_insecure setting that can be used to not verify the certificate of the glance server against the certificate authorities. Fix bug 1042081. Change-Id: I0a9f081425854e9c01e00dfd641e42276c878c67
* OpenStack capitalization added to HACKING.rstJoe Gordon2012-08-174-4/+4
| | | | | | Along with capitalization fixes to comments in code Change-Id: I72ddc582001f80d954ca5a121903c689f40d08d1
* Merge "xenapi: reduce polling interval for agent"Jenkins2012-08-091-10/+10
|\
| * xenapi: reduce polling interval for agentJohannes Erdfelt2012-08-071-10/+10
| | | | | | | | | | | | | | | | | | Communicating with the agent requires polling for a response. The operation uses xenstore, which is lightweight, yet the interval in between polls was 3 seconds. This would cause longer than necessary sleeps when an instance was booting making the overall boot slower. Change-Id: I560c05887128f1a0e29228e859cca25ded4eceec
* | xenapi: wait for agent resetnetwork responseJohannes Erdfelt2012-08-071-7/+5
|/ | | | | | | | Unlike every other agent command, the resetnetwork command would not wait for a response. All failures were silently ignored. Change this to at least log a message if an error occurs. Change-Id: I40e323607b2ce50869f3bf11e4582ff83cbed1c0
* Merge "XenAPI: Fix race-condition with cached images."Jenkins2012-08-012-0/+66
|\
| * XenAPI: Fix race-condition with cached images.Rick Harris2012-08-012-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The core problem is that XenServer's `VDI.copy` call drops the destination file directly into the SR. This means that half-completed files are visible with no way to distinguish these from fully-copied files. We had some code that attempted to mitigate this issue by checking physical_utilisation against an expected value. The problem with this code is that it didn't account for VDI chaining where the physical_utilisation would not necessarily match the parent. The net effect of this was that 'cloned' VDIs would never be found because their physical_utilisation was far below what was expected. The work around is to create our own `_safe_copy_vdi` which is isolated and atomic. Long term, `VDI.copy` should be fixed so that half-completed files are never stored in the SR. Change-Id: I6eb3cb5259f9ee1c7394e58f76105a8b39bfc720
* | Merge "Fix ip6tables support in xenapi bug 934603"Jenkins2012-08-011-1/+4
|\ \ | |/ |/|
| * Fix ip6tables support in xenapi bug 934603Mate Lakat2012-07-271-1/+4
| | | | | | | | Change-Id: Id7c4b0c4f8710652249b5c4fcb82abd5cccde6dd
* | Xen: VHD sequence validation should handle swap.Rick Harris2012-07-301-0/+3
|/ | | | | | | | | | | | | | | The VHD sequence validation code was erroneously counting `swap.vhd`, which caused it to raise an exception when a corresponding numbered VHD was not found. The fix is to simply ignore the `swap.vhd` file. Other unknown VHDs will generate an exception, but from a sanity-checking perspective, this is a Good Thing(tm). Fixes bug 1030939 Change-Id: Ic82ae27a4af7ea8f7669fd006aea1a310b691218
* Xen: Validate VHD footer timestamps.Rick Harris2012-07-241-0/+24
| | | | | | | | | | | | | This is a sanity check to ensure the footer timestamps on a VHD are reasonable (e.g. not in the future). This condition can occur if the local time for the source and destination machines in a migration are not in agreement, requiring an adjustment to /etc/localtime and/or NTP reconfiguration. Without this check there is a risk of importing a corrupt VHD into the SR causing the entire SR to become corrupted. Change-Id: I17228e50d6f54632f3bfc32a682e511f876517ec
* Merge "Adds logging for renaming and hardlinking."Jenkins2012-07-201-5/+15
|\
| * Adds logging for renaming and hardlinking.Rick Harris2012-07-201-5/+15
| | | | | | | | | | | | | | This will provide a bit more visibility into what's happening when dom0 plugin generates an exception. Change-Id: Ia529956ee4fc56e49efdcf2cca4f42fc8ebcc3ea
* | Ensure VHDs in staging area are sequenced properly.Rick Harris2012-07-191-0/+19
|/ | | | | | | | | | This adds a check to raise a sensible error if the VHDs in the staging area are not sequence numbered properly, meaning 0 to n-1 with no gaps. The previous error was an UnboundLookupError which made it difficult to pinpoint the root cause. Change-Id: I6b9e4f854c271bf73711480568be384ba883775d
* Remove VDI chain limit for migrations.Rick Harris2012-07-163-75/+34
| | | | | | | | | The strategy for removing the limit is to refactor migration so that they work nearly identically to snapshots, meaning sequence-numbered VHDs are rsynced over into a staging-area and then imported into the SR using the `import_vhds` function. Change-Id: Ibf5c82c52ae7d505ea9e54d64fcc8b8fdce4d05d
* Merge "Use explicit destination user in xenapi rsync call"Jenkins2012-07-131-1/+2
|\
| * Use explicit destination user in xenapi rsync callJohannes Erdfelt2012-07-131-1/+2
| | | | | | | | | | | | | | | | | | Recent versions of xenserver use a newer, but buggy, version of rsync that will attempt to parse out the username and fail if it isn't in the destination. So, add it to the destination to ensure this works with both older and newer versions of rsync. Change-Id: I9b7f05a8ea5cf5b7fae1a55a2b8557b2bfe5b865
* | Remove VDI chain limit for snapshots.Rick Harris2012-07-121-162/+136
|/ | | | | | | | | | | | | | | | | Snapshots and migrations were coded with a simplifying assumption that the maximum length of a VDI chain would be 3. Now that fast-cloning has been added, this assumption no longer holds. The goal of this patch is to remove the restriction for snapshots. A follow-on patch will remove the restriction for migrations. This patch changes the image-format for XenAPI images. Instead of naming the VHDs, 'base', 'image', and 'snap', they are now numbered staring with 0 as the leaf and going to N as the base-copy (root). Old-style images are still supported. Change-Id: Ieb073b42dc25db7cee4dfca7ff6525f7e7f46e8e
* Ignore failure to delete kernel/ramdisk in xenapi driverJohannes Erdfelt2012-07-091-2/+11
| | | | | | | | | | | Fixes bug 1022681 If deleting the kernel/ramdisk fails because the files don't exist anymore, then ignore the error and continue. This will ensure that the instance will get destroyed properly even if the files were deleted outside of nova. Change-Id: I5d1f95ea2a6f552c48efbb9e92bb36767df19e34
* Merge "Get hypervisor uptime."Jenkins2012-07-051-1/+8
|\
| * Get hypervisor uptime.Kevin L. Mitchell2012-06-291-1/+8
| | | | | | | | | | | | | | | | | | Adds a call to retrieve the current uptime on a specific hypervisor. This version of the patch only adds the XenAPI variant; other virt drivers will raise a NotImplementedError until they implement the get_host_uptime() method. Change-Id: Ie259589757a460fcd91a49a8dd8099e4d91524e7