Previous _ was monkey patched into builtins whenever
certain modules were imported. This removes that and
simply imports it when it is needed.
Change-Id: I0af2c6d8a230e94440d655d13cab9107ac20d13c
First time run of the console rotate script failed, due to the fact that
the logs did not exist at that time.
Fixes bug 1204440
Change-Id: I49b5569c1ba3349d911caace42685fa0f19a1f66
We already mostly use:
from nova import db
instead of:
import nova.db.api
So change remaining few cases to use nova.db instead of nova.db.api.
Help make code more uniform and easy to work with.
Change-Id: I6183352c4bbe77b88a5b277788f588b0b48c6476
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
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
importing some nova modules expects _() to be defined, so lets define it
before we start importing them.
Change-Id: I7f951a24c19a53434c090cd2c01eded77c703943
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
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
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
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
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
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
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
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
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
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
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
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
cleanup_instance() would fail because of using old get_connection().
This refactors everything to use XenAPIDriver().
Fixes bug 1017282
Change-Id: I8822f322bb8f60e5992afbe1feb45c0f4fffc893
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
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
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>
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
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