This legacy service is no longer used and was deprecated during the
Stein cycle [1]. It's time to say adios and remove them in their
entirety. This is pretty straightforward, with the sole exception of
schema for the 'remote-consoles' API, which has to continue supporting
requests for type 'xvpvnc' even if we can't fulfil those requests now.
[1] https://review.opendev.org/#/c/610076/
Part of blueprint remove-xvpvncproxy
Depends-On: https://review.opendev.org/695853
Change-Id: I2f7f2379d0cd54e4d0a91008ddb44858cfc5a4cf
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This is only used in three places now, each of which can be removed.
Part of blueprint remove-consoleauth
Change-Id: I89df8f8fa111b730ddd0aa73ae09a8cd5d152dad
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This service is EOL and likely unused in the wild. However, it was still
using the nova-consoleauth service for authentication. Correct this,
allowing us to remove nova-consoleauth.
Part of blueprint remove-consoleauth
Change-Id: If14244559b68276eb1e43c59c821978ec591ae14
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This is a relic that has long since been replaced by the noVNC proxy
service. Start preparing for its removal.
Change-Id: Icb225dec3ad291b751e475bd3703ce0eb30b44db
Move "vnc" config options to the central location 'nova/conf'. This
includes some typo fixes for the help strings along with removing some
unnecessary 'deprecated_name' args.
Change-Id: I5da0ad8cd42ef8b969ec05c07c497238e92f1f41
Implements: bp centralize-config-options
The latest oslo.config supports a minimum and maximum value for
IntOpt options. This patch utilizes this for a number of options
with well known ranges.
Change-Id: I897d8870fdf67a095915c8fcdf239024b092e9e3
Change Id52c30bb5ded2184d772e6026b0f04f9a0efeb55 added a hacking check
for greenthread.spawn(). Since eventlet.spawn() calls
greenthread.spawn() under the covers, it should also be checked. Because
there are still occurrences of eventlet.spawn(), these were also cleaned
up in order to pass the added hacking check.
Co-Authored-By: Qin Zhao <chaochin@gmail.com>
Change-Id: Ia125b4ad5e84bf48091af5a7a483b89629f0ec31
Related-Bug: #1404268
Closes-Bug: #1468513
Also renamed 'vnc_enabled' to 'enabled', and 'vnc_keymap' to 'keymap' now
that those options are prefixed by the 'vnc' group.
Change-Id: I2ff668d4ebd8e6ebf9bf4e8ca5b077958f051144
Closes-Bug: #1447528
Convert the use of the incubated version of the log module
to the new oslo.log library.
Sync oslo-incubator modules to update their imports as well.
Co-Authored-By: Doug Hellmann <doug@doughellmann.com>
Change-Id: Ic4932e3f58191869c30bd07a010a6e9fdcb2a12c
oslo.log does not have AUDIT level. This was a conscious
decision documented in blueprint:
https://blueprints.launchpad.net/oslo.log/+spec/remove-context-adapter
which was implemented in:
I10240f8af6c42508124659b3ed62c5ab93552953
So to prep for switching to oslo.log, this changeset removes
usage of LOG.audit and replaces it with LOG.info
Change-Id: I9cb1293529b2079b8a4778e27d60c6c760dfb622
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
I'm trying to debug a problem where the last thing in the logs is
"Starting instance...". Unfortunately this occurs twice in the same
source file, so it's hard to figure out a priori which log statement
it came from. Audit and info messages don't disambiguate their
function/line number, all you get is the logger name like:
2014-04-06 19:51:01.871 8288 AUDIT
nova.compute.manager [req-...] [instance: ...] Starting instance...
I think it doesn't hurt to to make sure all logs at this level are
unique, even if upstream were to log the function (see [1]). Most
duplicate LOG.info and LOG.audit level messages are in separate files
so we can disambiguate by the name, but there are a few that overlap.
For reference, the less-then-perfect but useful check I used was:
$ grep -r 'LOG.audit' * | sed 's/:\s*/ /' | sort -k1 | uniq -f1 -c
[1] https://review.openstack.org/#/c/85638/
Change-Id: If1ff573ffed1d12fcadfbdfd3365aae68a5fb977
oslo.i18n provides the i18n functions that were provided by
oslo-incubator's gettextutils module. Some tests that were
using internal details of the library were removed.
Change-Id: I44cfd5552e0dd86af21073419d31622f5fdb28e0
Both H305 and H307 are part of the OpenStack style guide.
Ensure that there are 3 groups of imports, stdlib,
third-party and project specific. Within each category
ensure that imports are in alphabetical order.
Change-Id: Id4994551c135c3c1a4982153f0c6cacba6176b95
We don't need to have the vi modelines in each source file,
it can be set in a user's vimrc if required.
Also a check is added to hacking to detect if they are re-added.
Change-Id: I347307a5145b2760c69085b6ca850d6a9137ffc6
Closes-Bug: #1229324
These were initially noted during import into the manuals at
https://review.openstack.org/67502
Fixes include rework of text, missing or extra spaces, wrong
capitalization and no sentence style capitalization.
A hacking check has been added that tests that all config options
start with a capital letter.
Change-Id: I0a1c333bbb3a812932d3972a7403f94da0bff341
Co-Authored-By: Daniel Berrange <berrange@redhat.com>
Co-Authored-By: Diane Fleming <diane.fleming@rackspace.com>
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
Kill some of the variables marked as unused by flakes8. This should
allow to enable F841 check in the future.
Only trivial cases with no function calls and obviously pure functions
(like datetime.now(), or len()) are cleaned up here.
Part 1, split to reduce conflicts.
Change-Id: I82854349574ec4bcb9336aba626eefdaed81a8c8
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
The VCS version string in nova/version.py has been hardcoded
to 'LOCALBRANCH:LOCALVERSION' since change
0bbb0e8cb1
The only places which use this info are some logging calls,
and since 'nova-manager version' command. The latter would
more usefully output the distro specific package string.
Delete the VCS related methods in version.py and replace their
usage with a new method version_string_with_package() which
appends the distro-specific package tag
Change-Id: I972b79c329198cb5376d537c6b672830094cd759
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Fix missing space between words, and capitalize "IP" fully
in vncserver_listen config param
Change-Id: Ica525910a883e8ff99793e950316d640e1750f98
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
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
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
Make FLAGS a ConfigOpts instance and fix up all the places where we
expected FlagValues behaviour.
Change-Id: I8f96f42e0d8d30ba6b362d29861e717cf0fa9e89
Move it here so that it can be kept in sync with openstack-common using
the new update.py script for code in openstack-common's incubation area.
See here for more details:
http://wiki.openstack.org/CommonLibrary#Incubation
Note: this commit just moves the existing code in Nova with no other
changes. A subsequent commit will sync it with latest openstack-common
so that it is easier see the new changes.
Change-Id: If88d678b1b9bad3d37117de7f7159d7fea8ab4c8
The next obvious step in porting to cfg is to define all options using
cfg schemas directly rather than using the flags.DEFINE_* helpers.
This is a large change, but it is almost entirely pure refactoring and
does not result in any functional changes.
The only change to note is that the default values for glance_host,
glance_api_servers and default_publisher_id options are now using opt
value interpolation i.e.
-glance_host=_get_my_ip()
+glance_host='$my_ip'
-glance_api_servers=['%s:%d' % (FLAGS.glance_host, FLAGS.glance_port)]
+glance_api_servers=['$glance_host:$glance_port']
-default_publisher_id=FLAGS.host
+default_publisher_id='$host'
Also note that the lower_bound check on the {report,periodic}_interval
options are no more, but this has been true since cfg was first added.
Change-Id: Ia58c8f0aaf61628bb55b1b8485118a2a9852ed17
* Improves deployment flexibility by allowing deployers to choose which address proxies like nova-xvpvncserver should use to to connect to instance proxies. For xenserver, this will generally be the management ip of dom0. For libvirt, this will be the management ip of the host.
* Fixes bug 918451
* Renames vncserver_host to vncserver_listen for slightly better usage clarity
* Updates docs
Change-Id: I85c9850c57ffac3dfecaec4510eb808a6a2af79c
* Creates a unified way to access vnc consoles for xenserver and libvirt
* Now supports both java and websocket clients
* Removes nova-vncproxy - a replacement version of this (nova-novncproxy) can be found as described in vncconsole.rst
* Adds nova-xvpvncproxy, which supports a java vnc client
* Adds api extension to access java and novnc access_urls
* Fixes proxy server to close/shutdown sockets more cleanly
* Address style feedback
* Use new-style extension format
* Fix setup.py
* utils.gen_uuid must be wrapped like str(utils.gen_uuid()) or it can't be serialized
Change-Id: I5e42e2f160e8e3476269bd64b0e8aa77e66c918c
Add flags called vncproxy_flash_socket_policy_port and
vncproxy_flash_socket_policy_host, to allow the admin to configure
the Flash socket policy listener.
Change-Id: If42839ccd86f1c8723221049d7c76b6f5ad0aa2d
Anywhere "except:" occurs, I tried to replace it with an explicit except on
known error types. If none were known, Except was used.
In the process I've been able to unearth a few evasive bugs and clean up some
adjacent code.