summaryrefslogtreecommitdiffstats
path: root/bin/nova-api
Commit message (Collapse)AuthorAgeFilesLines
* Delete unused bin directoryJoe Gordon2013-06-031-22/+0
| | | | | | | | | | | | Delete last bits of bin/. With the move to entrypoints these aren't needed anymore. Update CONF.bindir to default to os.path.join(sys.prefix, 'local', 'bin') Part of blueprint entrypoints-plugins Change-Id: I95250d3779433e7b85aaa889a873b16c86a7d2be
* Move console scripts to entrypoints.Monty Taylor2013-04-041-57/+14
| | | | | | | | | | | | As part of the move of plugins to entrypoints, take advantage of the entrypoints based console scripts, which will make our command line scripts available for unittesting. Part of blueprint entrypoints-plugins Co-authored-by: Michael Still <mikal@stillhq.com> Change-Id: I5f17348b7b3cc896c92263dd518abb128757d81f
* Remove gettext.install() from nova/__init__.pyMark McLoughlin2013-04-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gettext.install() function installs a builtin _() function which translates a string in the translation domain supplied to the install() function. If gettext.install() is called multiple times, it's the last call to the function which wins and the last supplied translation domain which is used e.g. >>> import os >>> os.environ['LANG'] = 'ja.UTF-8' >>> import gettext >>> gettext.install('keystone', unicode=1, localedir='/opt/stack/keystone/keystone/locale') >>> print _('Invalid syslog facility') 無効な syslog ファシリティ >>> gettext.install('nova', unicode=1, localedir='/opt/stack/nova/nova/locale') >>> print _('Invalid syslog facility') Invalid syslog facility Usually this function is called early on in a toplevel script and we assume that no other code will call it and override the installed _(). However, in Nova, we have taken a shortcut to avoid having to call it explicitly from each script and instead call it from nova/__init__.py. This shortcut would be perfectly fine if we were absolutely sure that nova modules would never be imported from another program. It's probably quite incorrect for a program to use nova code (indeed, if we wanted to support this, Nova code shouldn't use the default _() function) but nevertheless there are some corner cases where it happens. For example, the keystoneclient auth_token middleware tries to import cfg from nova.openstack.common and this in turn causes gettext.install('nova') in other projects like glance or quantum. To avoid any doubt here, let's just rip out the shortcut and always call gettext.install() from the top-level script. Change-Id: If4125d6bcbde63df95de129ac5c83b4a6d6f130a
* Use oslo-config-2013.1b4Mark McLoughlin2013-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Increase maximum URI size for EC2 API to 16kBurt Holzman2013-01-241-1/+5
| | | | | | | | | | The EC2 API supports both HTTP GET and POST agnostically. It also supports user-data of 16k -- meaning that client tools could generate 16k URIs. The WSGI default limit is 8k; this raises it. Fixes bug 1098646. Change-Id: Idec460d88b2affab970c9d9f39fa61295db035c5
* Adds SSL support for API server.Ilya Alekseyev2013-01-231-1/+4
| | | | | | | | | | | | | Part of code in test for accessing with ipv6 and part of ssl socket wrapping developed by Davanum Srinivas. Original patch could be found here: https://review.openstack.org/#/c/19559 DocImpact Fixes bug 869884. Change-Id: I6d60df77c3fb49552e597f94abae7f4d6f54044d
* Move enabled_apis option into nova.serviceMark McLoughlin2013-01-091-1/+1
| | | | | | | | | | The enabled_apis option is only used in nova-api and nova-all but there's no more obvious place to put it than nova.service. At least this location is consistent, since we quite have a number of other options related to the APIs in nova.service. blueprint: scope-config-opts Change-Id: I86e200fa5ad91ac0b7ab6837cc61e5927b2ebeb7
* Use CONF.import_opt() for nova.config optsMark McLoughlin2012-11-201-0/+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-201-1/+2
| | | | | | | | | | | | | | | 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.flags imports from bin/*Chris Behrens2012-11-151-1/+0
| | | | | | | | | | nova.flags is no longer needed except to load nova config options shared across multiple daemons. This removes nova.flags from the bin programs and makes sure that nova.flags is imported in nova.config for now. Change-Id: If066ac0070387bee4b41e6a78ad972f7a0955c75
* Switch from FLAGS to CONF in binMark McLoughlin2012-11-041-1/+3
| | | | | | | | | | | 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: Id0c59b2dc8002ec89ccbc5e5d7986fb68d3a693d
* 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
* Switch to common logging.Andrew Bogott2012-07-021-2/+2
| | | | | | I only just moved logging from nova to common, so behavior should remain the same. Change-Id: I1d7304ca200f9d024bb7244d25be2f9a670318fb
* Add multi-process support for API servicesJohannes Erdfelt2012-06-281-5/+5
| | | | | | | | | | | | | | | | | Implements blueprint multi-process-api-service This is based on Huang Zhiteng's patch. This patch adds support for running services as multiple processes. This is primarily intended to be used with the API service as a way to provide more concurrency than eventlet can sometimes provide. A SIGTERM or SIGINT signal will cause the parent process to gracefully terminate the child processes, allowing them to finish processing the requests currently being processed. The parent will wait for the children to finish before exiting. Change-Id: Ie6d6802626eb42d5e64c4167be363fbf6cea2a1b
* Revert "blueprint <multi-process-api-service>"James E. Blair2012-06-041-1/+1
| | | | | | | | This reverts commit e599636d09755f635604f64f17e9f56cac14575e The nova test runner is leaking processes after this change. Change-Id: Id74463d53f3b7cd749cba293619abef01499b90d
* blueprint <multi-process-api-service>Zhiteng Huang2012-06-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add multiprocess support for API serivces (EC2/OSAPI_Compute/OSAPI_Volume/Metadata). 2012-06-1 v7: * Add unittest to cover worker recovery, service termination functionality in wsgi.py, fix python 2.6 compatibility issue. * Modify generate_uid() to introduce per-process seeds in utils.py to avoid collisions. * Add worker session to nova.conf.sample. 2012-05-21 v6: * Fix 'test_wsgi' unittest error. 2012-04-28 v5: * Add SIGINT handler and fix child-parent race condition when Ctrl+C is pressed. 2012-03-31 v4: * Fixed typo, removed debug code. 2012-03-30 v3: * Fixed localization/pep8 error in unittest, add metadata test. * nova/wsgi.py:Server: use the greenthread pool created for each process. * nova/service.py: remove debug code 2012-03-27 v2: * Fixed unittest error. * nova/wsgi.py:Server: Use self._logger to do logging in multiprocess mode. * nova/wsgi.py:Server: Move self._pool creation into proper place. * code style fix. 2012-03-25 v1: * Modification to nova/service.py and nova/wsgi.py in order to support multiprocess (a.k.a. workers) for various API services. If multiprocess mode is enabled, (i.e. flags 'APINAME_workers' set to positive numbers), corresponding API service will run in target number of process(es). There is also a master_worker process spawned for managing all workers (handling signal/termination). * Add unittest for multiprocess API service, also alter testing/runner.py to adopt new unittest. Change-Id: Ia045e595543ddfd192894b2a05801cc4b7ca90cb
* 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
* 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>
* Merged with trunkwNachi Ueno2011-08-191-27/+16
|\
| * more cleanup of binaries per reviewVishvananda Ishaya2011-08-181-5/+3
| |
| * Make all services use the same launching strategyVishvananda Ishaya2011-08-171-27/+17
| |
* | Added monkey patching notification code functionNachi Ueno2011-08-191-1/+1
|/ | | | w
* Add a flag to disable ec2 or osapi.Josh Kearney2011-07-081-5/+9
|
* PEP8 passed.Nikolay Sokolov2011-07-061-2/+3
|
* Formatting fix.Nikolay Sokolov2011-07-061-0/+1
|
* Signal handler cleanup, proper ^C handling.Nikolay Sokolov2011-07-061-8/+6
|
* Gracefull shutdown of nova-api.Nikolay Sokolov2011-07-041-5/+9
|
* Use milestone cut.Josh Kearney2011-06-281-0/+6
|
* Created Bootstrapper to handle Nova bootstrapping logic.Brian Lamar2011-06-231-2/+3
|
* run launcher first since it initializes global flags and loggingMark Washenberger2011-06-221-1/+2
|
* Removed unneeded import.Brian Lamar2011-06-211-1/+0
|
* Tests for WSGI/LauncherBrian Lamar2011-06-211-2/+2
|
* Removed logging logic from __init__, added concept of Launcher...no tests ↵Brian Lamar2011-06-201-29/+11
| | | | for it yet.
* pep8 fixesBrian Lamar2011-06-201-2/+0
|
* Cleanup and addition of tests for WSGI server.Brian Lamar2011-06-201-1/+1
|
* Introduced Loader concept, for paste decouple.Brian Lamar2011-06-191-0/+2
|
* Cleanup of the cleanup.Brian Lamar2011-06-191-4/+2
|
* Further nova-api cleanup.Brian Lamar2011-06-191-26/+37
|
* Cleaned up nova-api binary and logging a bit.Brian Lamar2011-06-191-23/+9
|
* Removed debugging, made objectstore tests pass again.Brian Lamar2011-06-191-3/+0
|
* General cleanup and refactor of a lot of the API/WSGI service code.Brian Lamar2011-06-181-2/+16
|
* disable-msg -> disableBrian Lamar2011-03-181-1/+1
|
* Sorted imports correctlyJustin Santa Barbara2011-03-081-1/+1
|
* Moved FLAGS.paste_config to its re-usable locationJustin Santa Barbara2011-03-071-11/+3
|
* Merged with trunk and fixed conflict. Sigh.Justin Santa Barbara2011-03-071-2/+5
|\
| * Create --paste_config flag defaulting to api-paste.ini and mv ↵Kevin L. Mitchell2011-03-071-2/+5
| | | | | | | | etc/nova-api.conf to match
* | Converted tabs to spaces in bin/nova-apiJustin Santa Barbara2011-03-071-1/+1
| |
* | Merge with trunk, resolve conflicts and refactorJustin Santa Barbara2011-03-071-2/+15
|\|
| * use default flagfile in nova-apiVishvananda Ishaya2011-02-251-0/+2
| |
| * add help back to the scripts that don't use service.pytermie2011-02-231-0/+3
| |