Commit Graph

11 Commits

Author SHA1 Message Date
Chris Behrens e374fb0389 Remove nova.flags imports from bin/*
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
2012-11-15 23:03:04 +00:00
Mark McLoughlin efede80046 Move parse_args to nova.config
The flags module will eventually be removed and this is a first step
towards that.

Change-Id: I729b08900e53e2ae6db10633dcff3be59720fa6f
2012-11-04 21:37:39 +00:00
Andrew Bogott d335457f48 Switch to common logging.
I only just moved logging from nova to common, so behavior should remain the same.

Change-Id: I1d7304ca200f9d024bb7244d25be2f9a670318fb
2012-07-02 15:57:09 -05:00
Johannes Erdfelt 46c1b6eaee Add multi-process support for API services
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
2012-06-28 19:57:37 +00:00
James E. Blair 626f64a716 Revert "blueprint <multi-process-api-service>"
This reverts commit e599636d09

The nova test runner is leaking processes after this change.

Change-Id: Id74463d53f3b7cd749cba293619abef01499b90d
2012-06-04 22:19:10 -07:00
Zhiteng Huang e599636d09 blueprint <multi-process-api-service>
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
2012-06-02 00:34:55 +08:00
Mark McLoughlin 00786bc554 Use cfg's new global CONF object
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
2012-05-30 21:24:53 +01:00
Ghe Rivero 7e3e9b8e9c Remove old flagfile support.
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>
2012-05-10 19:17:34 +02:00
Nachi Ueno 9059902c72 Merged with trunkw 2011-08-19 13:25:49 -07:00
Vishvananda Ishaya a4d63f1897 fix docstrings in new api bins 2011-08-18 11:31:28 -07:00
Vishvananda Ishaya 0cf36be73e add separate api binaries 2011-08-18 10:56:14 -07:00