summaryrefslogtreecommitdiffstats
path: root/tools/xenserver
Commit message (Collapse)AuthorAgeFilesLines
* xenapi: script to rotate the guest logsJohn Garbutt2013-06-191-0/+62
| | | | | | | | | | | | | | | | | Xen will produce the guest logs in a specified directory. This scripts configures the above logging as expected by the xapi plugin nova uses to read the logs. In addition it ensures that any log that grows bigger than 1MB will be truncated down to 5KB. Ensuring the log directory is inside a loop back device of a restricted size, and running this script every minute using cron, will stop guests from using up too much Dom0 disk space, and taking out the hypervisor Part of blueprint xenapi-server-log Change-Id: I4caa82f4d0620d924e37e3b605cf62b4d5b73570
* xenapi: Always set other_config for VDIsRick Harris2013-05-021-0/+106
| | | | | | | | | | | | | The existing code only set `other_config` on a VDI when it was created using `create_vdi`. This patch updates the code so that `other_config` is also set when a VDI is created from a dom0 plugin or during a migration. Also included is a one-time script to set the other_config for existing VDIs that were affected by this bug. Fixes bug 1162029 Change-Id: I4fa856754487f77ce9c8e39d45eee7ea5187123e
* import and install gettext in vm_vdi_cleaner.pyAndrew Laski2013-04-301-0/+2
| | | | | | | importing some nova modules expects _() to be defined, so lets define it before we start importing them. Change-Id: I7f951a24c19a53434c090cd2c01eded77c703943
* Update OpenStack LLC to FoundationKurt Taylor2013-02-263-3/+3
| | | | | | Update all references of "LLC" to "Foundation". Change-Id: I009e86784ef4dcf38882d64b0eff484576e04efe
* Use oslo-config-2013.1b4Mark McLoughlin2013-02-192-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | The cfg API is now available via the oslo-config library, so switch to it and remove the copied-and-pasted version. Add the 2013.1b4 tarball to tools/pip-requires - this will be changed to 'oslo-config>=2013.1' when oslo-config is published to pypi. This will happen in time for grizzly final. Add dependency_links to setup.py so that oslo-config can be installed from the tarball URL specified in pip-requires. Remove the 'deps = pep8==1.3.3' from tox.ini as it means all the other deps get installed with easy_install which can't install oslo-config from the URL. Make tools/hacking.py include oslo in IMPORT_EXCEPTIONS like it already does for paste. It turns out imp.find_module() doesn't correct handle namespace packages. Retain dummy cfg.py file until keystoneclient middleware has been updated (I18c450174277c8e2d15ed93879da6cd92074c27a). Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
* Fix script argument parsing.Brian Elliott2013-02-141-5/+11
| | | | | | The vm_vdi_cleaner.py script's argument parsing was broken and unloved. Change-Id: I1662534d65fd0e8472e092ed9f10d6cc059f1cab
* Merge "xenapi: Add cleanup_sm_locks script"Jenkins2013-01-231-0/+123
|\
| * xenapi: Add cleanup_sm_locks scriptRick Harris2013-01-221-0/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XenServer 5.6 and 6.0 don't appear to be cleaning up sm locks when using a FileSR. When enough locks accumulate, this causes image related operations to fail. This cleanup script is a stop-gap solution that can be run against all of the dom0's in the cluster to prevent too many locks from accumulating. We can remove this script when the root-cause is fixed upstream. References 1103158 Change-Id: I798bcfeb727a59003910b82d331fdbe031c4a2b4
* | Sync latest cfg from oslo-incubatorMark McLoughlin2013-01-211-0/+1
|/ | | | | | | | | | The main change is: c5984ba Move logging config options into the log module Re-generate nova.conf.sample to reflect the options move. Change-Id: I3913ea54465658d93dc56e014dfe5d911b0541d6
* fix N402 on tools/Sean Dague2013-01-091-1/+1
| | | | | | fix N402 (single line docstrings should end in a period) Change-Id: I2086dfb33a6efeb6ef6edc6a326182b6deda2527
* Move zombie_instance_updated_at_window optionMark McLoughlin2012-12-111-2/+6
| | | | | | | | The zombie_instance_updated_at_window option is only used in vm_vdi_cleaner so declare it there. blueprint: scope-config-opts Change-Id: I8d95fbd858f8afe855c2b559dea6995497d8f682
* Correctly init XenAPIDriver in vm_vdi_cleaner.pyBrian Lamar2012-12-101-1/+4
| | | | | | Fixes bug 1088615 Change-Id: Iaf0569fd45ed180d141dc0367c547f014b7502e1
* Use CONF.import_opt() for nova.config optsMark McLoughlin2012-11-202-2/+1
| | | | | | | | | | | | | The only reason for importing nova.config now is where one of the options defined in that file is needed. Rather than importing nova.config using an import statement, use CONF.import_opt() so that it is clear which option we actually require. In future, we will move many options out of nova.config so many of these import_opt() calls will either go away or cause a module other than nova.config to be imported. Change-Id: I0646efddecdf2530903afd50c1f4364cb1d5dce1
* Remove nova.config.CONFMark McLoughlin2012-11-202-2/+3
| | | | | | | | | | | | | | | Modules import nova.config for two reasons right now - firstly, to reference nova.config.CONF and, secondly, if they use one of the options defined in nova.config. Often modules import nova.openstack.common.cfg and nova.config which is a bit pointless since they could just use cfg.CONF if they just want to nova.config in order to reference CONF. Let's just use cfg.CONF everywhere and we can explicitly state where we actually require options defined in nova.config. Change-Id: Ie4184a74e3e78c99658becb18dce1c2087e450bb
* Remove nova.flagsMark McLoughlin2012-11-172-2/+1
| | | | | | | | Now that options have all moved from nova.flags to nova.config, we can safely remove the nova.flags imports and replace them with nova.config imports. Change-Id: Ic077a72dd6419bbf1e1babe71acfa43c4e8b55c8
* Switch from FLAGS to CONF in misc modulesMark McLoughlin2012-11-041-4/+4
| | | | | | | | | | | Use the global CONF variable instead of FLAGS. This is purely a cleanup since FLAGS is already just another reference to CONF. We leave the nova.flags imports until a later cleanup commit since removing them may cause unpredictable problems due to config options not being registered. Change-Id: Ib110ba8d1837780e90b0d3fe13f8e6b68ed15f65
* Remove flags.DECLAREMark McLoughlin2012-11-041-3/+3
| | | | | | The cfg.ConfigOpts class has an equivalent method, so lets use that. Change-Id: I5860230336d00d7531a0ffd255c766ff77661625
* Move parse_args to nova.configMark McLoughlin2012-11-041-1/+2
| | | | | | | The flags module will eventually be removed and this is a first step towards that. Change-Id: I729b08900e53e2ae6db10633dcff3be59720fa6f
* XenAPI: Add script to destroy cached images.Rick Harris2012-08-011-0/+68
| | | | | | | | | | Operations will want the ability to clear out cached images when disk-space becomes an issue. This script allows ops to clear out all cached images or just cached images that aren't in current use. Change-Id: If87bd10ef3f893c416d2f0615358ba65aef17a2d
* Xen: Add race-condition troubleshooting script.Rick Harris2012-07-251-0/+172
| | | | | | | | This stress-test runs builds and migrations concurrently making it easier to uncovers certain types of race-conditions in the virt-layer code. Change-Id: I89c382b85aa6d0eb3dc957803f3ea34e3a36e9d4
* Fixes XenAPI driver import in vm_vdi_cleanerChris Behrens2012-07-171-3/+2
| | | | | | | | | | | xenapi/connection.py was renamed xenapi/driver.py, it appears, but vm_vdi_cleaner was not updated. Also removed unused optparse import. Fixes bug 1025912 Change-Id: Ia1a93400dc24455fe91fdf4283eb32bcca4037cf
* Switch to using new config parsing for vm_vdi_cleaner.pyJohannes Erdfelt2012-06-271-74/+45
| | | | | | | | Fixes bug 1018166 Also uses CONF.verbose instead of passing verbose flag everywhere Change-Id: Ifee832dd087cae8c36b7b7a4f08b2e22ef7f06a3
* Remove unknown shutdown kwarg in call to vmops._destroyJohannes Erdfelt2012-06-251-3/+1
| | | | | | | | | Fixes bug 1017562 Also, _destroy will now intelligently shutdown the VM first, so need to do that in vm_vdi_cleaner.py anymore Change-Id: I8c1e3aa8ecb98ed3c19ab4b8fa072b7fa8e5618f
* Refactor vm_vdi_cleaner.py connection useChris Behrens2012-06-241-40/+44
| | | | | | | | | cleanup_instance() would fail because of using old get_connection(). This refactors everything to use XenAPIDriver(). Fixes bug 1017282 Change-Id: I8822f322bb8f60e5992afbe1feb45c0f4fffc893
* Replaces functions in utils.py with openstack/common/timeutils.pyZhongyue Luo2012-06-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Fixes bug #1008628 1. Edit openstack-common.conf and import nova/openstack/common/timeutils.py 2. Move time related functions from utils.py to timeutils.py 3. Replace following functions in utils.py with timeutils.py - isotime - parse_isotime - strtime - parse_strtime - normalize_time - is_older_than - utcnow_ts - utcnow - set_time_override - advance_time_delta - advance_time_seconds - clear_time_override 4. Remove datetime related functions and datetime related unittests Change-Id: I9a92be286fb071b6237dd39495d88dae106e2ce0
* Use cfg's new global CONF objectMark McLoughlin2012-05-301-2/+1
| | | | | | | | | | Implements blueprint cfg-global-object Replace nova.flags.FLAGS with openstack.common.cfg.CONF. In future, we can do a s/FLAGS/CONF/ across the codebase. Change-Id: Ib293873089a5399febd7a3b0410f66e9bef115f1
* Update pep8 dependency to v1.1Brian Waldon2012-05-241-1/+1
| | | | | | | | The latest release of pep8 adds stricter rules for extraneous whitespace within lines. This patch also addresses these new violations acoss the codebase. Change-Id: Ib7e50281870473df1704ed50868c5c2e26bdb02e
* Merge "Modify vm_vdi_cleaner to handle `-orig`."Jenkins2012-05-171-15/+42
|\
| * Modify vm_vdi_cleaner to handle `-orig`.Chris Behrens2012-05-161-15/+42
| | | | | | | | | | | | | | | | Also modifies the code to better handle various race conditions. Fixes bug 1000359 Change-Id: I421b5827330da550810598cfbacc5bb679b477c7
* | Remove old flagfile support.Ghe Rivero2012-05-101-1/+1
|/ | | | | | | | | | | | | | | | | | | Implements blueprint remove-old-flagfile nova-manage can still be used to convert old flagfiles style files to new .ini files: $ ./bin/nova-manage config convert --help Usage: nova-manage config convert <args> [options] Options: -h, --help show this help message and exit --infile=<path> old-style flagfile to convert to config --outfile=<path> path for output file. Writes configto stdout if not specified. Change-Id: Ib8fbbd858b1db7faef70d7d97955e5042bf378f2 Signed-off-by: Ghe Rivero <ghe@debian.org>
* Trivial spelling fixJohannes Erdfelt2012-04-301-1/+1
| | | | Change-Id: Ib5ba181886a073742ace4a8927061f5d4dcd0773
* Use instance_get_by_uuid since we're looking up a UUIDJohannes Erdfelt2012-04-261-1/+1
| | | | Change-Id: I60869ace0890dcef887a7984e41abd9cf16ea9e3
* Use nova_uuid attribute instead of trying to parse out name_labelJohannes Erdfelt2012-04-261-71/+3
| | | | | | | | The name_label parsing code is out-of-date since key support was added to the format string, but it's not needed anymore since the internal uuid was added to other-config for a while now. Change-Id: I2902320ae7118e42cd3d18f2d6d0fab0fcbec687
* nova.virt.xenapi_conn -> nova.virt.xenapi.connectionJohannes Erdfelt2012-04-191-3/+3
| | | | | | This fixes a couple of references that were missed in the recent move Change-Id: I653b8b85294838a39f9d805bef094938f692e7be
* xenapi_conn -> xenapi.connectionJohannes Erdfelt2012-04-121-1/+1
| | | | | | | This keeps all of the XenAPI related code together in one directory, like libvirt. Change-Id: I1de51eb8bcead0695e9f8ede466416e0257d0148
* Add VDI chain cleanup script.Rick Harris2012-03-091-0/+128
| | | | | | References bug 949477 Change-Id: I819d4ed56675a4ef4e46adca2978b433386e128d
* Add ability to see deleted and active records.Rick Harris2011-12-071-2/+1
| | | | | | | | | | Fixes bug #900564 Changes `Context`.`read_deleted` from a bool to an enum string with values "yes" (can read deleted records), "no" (cannot read deleted records), and "only" (can only see deleted records, for backwards compatibility). Change-Id: Ic81db3664c33f23f751b73973782efb06fce90d9
* Further changes to the cleaner.Josh Kearney2011-10-101-7/+15
| | | | Change-Id: Ib11fe18a46e57df3498596a2909879d67e84fdda
* Reference orphaned_instance instead of instance.Josh Kearney2011-10-101-2/+2
| | | | Change-Id: I3170f7b67466645d4c410b1d58b3e4e15b9e3265
* Continue to the next iteration of the loop if an instance is not found.Josh Kearney2011-10-101-0/+1
| | | | Change-Id: I0342bfd9ec04c2bec25d03ce1200d38a57929bb9
* Adds a script that can automatically delete orphaned VDIs. Also had to move ↵Josh Kearney2011-09-301-0/+376
some flags around to avoid circular imports. Fixes bug 809614. Change-Id: I635f7eef9ede45bee1ee4a62a3882b55d4222ee3