These were deprecated in Queens:
Id793ac2c5cdc5dc473f95eac53b77617a1e389da
And can now be removed.
Change-Id: I27518d1154ec09c57700905bc58ae6a3ce1d8049
For xenapi driver, there needs to be some way to delete cached
images based on when they were created. add an optional arg to
control delete operation.
Change-Id: I24fc45e989aa951aab55a261fce77f7e3667d988
Closes-bug: 1481689
XenServer 6.0 has long since been replaced and the bug was fixed in 6.1
[1]. No need to keep this legacy script around.
[1] https://bugs.launchpad.net/nova/+bug/1103158/comments/1
Change-Id: I8c41e88281aaf4250859622142a2f03f4452e1be
oslo.log deprecate config option verbose since aug 1, 2015 in review:
in https://review.openstack.org/#/c/206437/
That was a long time ago so it should be possible to remove it now. This
was already merged once but had to be reverted because some projects
were still relying on it. Oslo team plan to remove it, so we need clean
up its usage before removing it.
Closes-Bug: #1663570
Change-Id: I072e1078486f50cebea92695ff46c1af879eb23d
XenServer has released os-xenapi lib on pypi, this patch is to
use os-xenapi in nova project. In this patch, we only change
the usage of XenAPI to os-xenapi and fix unit tests. In the next
patch, we will delete those unused files.
Partially-Implements: blueprint add-os-xenapi-library
Depends-On: Ic327135b893a77672fd42af919f47f181e932773
Change-Id: I424dfcd507c4b7fbeea5245cc1c234dec01d5781
As per OpenStack licensing guide lines [1]:
[H102 H103] Newly contributed Source Code should be licensed under
the Apache 2.0 license.
[H104] Files with no code shouldn't contain any license header nor
comments, and must be left completely empty.
[1] http://docs.openstack.org/developer/hacking/#openstack-licensing
Change-Id: I74d25d88ac285c456cbb8874deb000ed782c2192
Following OpenStack Style Guidelines:
http://docs.openstack.org/developer/hacking/#dictionaries-lists
Using locals() for formmatting strings is not clear as using explicit dictionaries
and can hire errors during refactoring.
Change-Id: If3930d62fea166760161eaa3bdf85efca95be121
In PY3,remove the print "", join the print () function to achieve
the same function,this patch is to fix it.
Change-Id: Ie860e912b0c7101fd9d1d5c8373db8688f99122c
Closes-Bug: #1595773
This change moves the config options in nova/compute/
manager.py to a central location "nova/conf/compute.py".
Change-Id: Iac75f966571d1224fcd9487b110cb5a4eaa29219
Implements: blueprint centralize-config-options-newton
The config options of
"nova/virt/xenapi/driver.py" got moved
to the new central location
"nova/conf/xenserver.py”
Change-Id: I87f6163c7a3b69ef8ede947132b771f32742781e
Implements: blueprint centralize-config-options-newton
There is a race between where Xen creates the domain and starts logging
and when XAPI returns to say that the domain has started.
If the cronjob to rotate the guest logs runs in this period, it can
delete the console logs before we set the last_dom_id which is used to
preserve logs.
This change adds a fixed delay before deleting any log files, allowing
the VM start operation to return after the domain has been successfully
created.
Change-Id: I82ae3e008974f33b60256366f171abf1f0369e60
Closes-Bug: 1535616
It's possible that a log file is created while this script is
running, and if being created after we get the valid last_dom_ids
then the log file may be deleted incorrectly.
Also add some logging which can be used to trace any future race
conditions
Change-Id: I1df1a0775a7dae41105d6c41b046c86002eb5eec
Closes-Bug: 1516721
Fixes cache cleaner script by removing import of
driver and using session directly to call vm_utils.
There is no test included for this. Since this is out of nova
tree, adding tests is tracked in 1481705
Closes-Bug: #1481693
Change-Id: I25ee22777baecaf64de63a39d19e8f8f514f70b3
Moving console logs to a temporary file is a clear race when Nova tries to
access a file it might not be there.
We need to keep the readable file in place at all times. Atomic operations
like mv are fine as if the file was opened before the mv operation Linux
will keep the contents available until the file is closed by Nova's plugin.
Futher, we need to be able to report the console logs from domains that have
been shutdown but still exist on the host. Ensure we keep track of the domain
that we last booted with
Change-Id: Icfff9886d79f788be871bf28c8b729a57dcd94d2
Fixes-bug: 1466914
The oslo team is recommending everyone to switch to the
non-namespaced versions of libraries. Updating the hacking
rule to include a check to prevent oslo.* import from
creeping back in.
This commit includes:
- using oslo_utils instead of oslo.utils
- using oslo_serialization instead of oslo.serialization
- using oslo_db instead of oslo.db
- using oslo_i18n instead of oslo.i18n
- using oslo_middleware instead of oslo.middleware
- using oslo_config instead of oslo.config
- using oslo_messaging instead of "from oslo import messaging"
- using oslo_vmware instead of oslo.vmware
Change-Id: I3e2eb147b321ce3e928817b62abcb7d023c5f13f
oslo.utils library now provides the functionality previously in
oslo-incubator's excutils, importutils, network_utils, strutils
timeutils, units etc. Some modules already moved to oslo.utils
will still be around since other code in nova/openstack/common/
are using it and will be removed in a subsequent commit.
Change-Id: Idc716342535fdfa680963e0e073ddb46f5f1eb34
CLI options must be registered before the command line is parsed or a
cfg.ArgsAlreadyParsedError is raised.
Since commit 2cbea24 we are registering two 'remote_debug' arguments
in nova.service. In commit b506529, we see a hack being added to
ensure that nova.service is imported and the CLI opts registered
before config.parse_args() is called.
To clean this up somewhat, refactor all the elements of this remote
debugger support into nova.debugger. Avoid importing modules at
module import time since we need to import this before monkey
patching. Add a function for registering the CLI options just before
config.parse_args() is called. And fail gracefully if the CLI options
aren't registered when we called debugger.init().
Note that because the options aren't registered at module import time
any more, the config generator doesn't pick them up. However, that's
actually a good thing since this support doesn't work if you enable it
via config files since debugger.enabled() only looks at the command
line.
DocImpact: remote_debug options are not available via the config file,
only via the command line.
Change-Id: I97f747a2fb9222137203657df1d86ba89f3219e2
Added missing imports along with adding a call to config.parser_args as needed
to allow vm_vdi_cleaner to work against current master.
Corrected spelling error in comment.
Change-Id: I4d30d0f7f9718cb29fb8c4c18e9e6fa23f3496ef
Closes-Bug: #1279942
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