summaryrefslogtreecommitdiffstats
path: root/bin/nova-compute
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-79/+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/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix nova-compute use of missing DBErrorDan Smith2013-02-121-1/+1
| | | | | | | | | | | Apparently exception.DBError disappeared at some point, but nova- compute was still using it. Since it was a stretch in the first place, and nothing else in exception.py looks reasonable, this adds exception.DBNotAllowed. Fixes bug 1120390 Change-Id: Ifbfa0b09f3dc011ad87f6f3b06eb0fdaa7247ec0
* Ban database access in nova-computeDan Smith2013-02-061-0/+23
| | | | | | | | | | | | | | | | | | | | | | | This adds a wedge between nova-compute and the database implementation to specifically catch, log, and deny accesses. Theoretically, this should not be needed as a production environment would not even have the compute nodes configured to talk to the database. However, testing and upgraded environments may retain database access and thus avoid hitting real issues that can be fixed up prior to release. Putting this into the tree now will help ensure we have a consistent error scenario for test setups prior to release. Note that if nova is configured to use a local conductor, we do not insert the wedge, which provides an easy out for anyone needing to get a production system past a missed database access. Related to bp no-db-compute. Based on Russell's original tracer hack: I328fa92d5bfdadd5022f5c7efe981396d8ae7962 Change-Id: I478230220633e0d2ff94b6a4d756e07eab8517d7
* Handle waiting for conductor in nova.service.Russell Bryant2013-01-111-1/+2
| | | | | | | | | | | | | | | | | | | Previously we were waiting for conductor to respond to a ping() in the compute manager. This patch moves this down to the base Service class. A nova service binary can indicate that db access is not allowed and if so, as soon as the service gets created, it will block while waiting for conductor to respond. The compute service has been updated to use this. This should not result in any real functional difference. The reason for this is that there is some database access that needs to be avoided down at this level. This allows us to divert these actions to conductor if needed. Part of bp no-db-compute. Change-Id: Idd6387b9428e3f9f4e4dbfe51293693238b2daf0
* Move compute_topic into nova.compute.rpcapiMark McLoughlin2013-01-091-1/+1
| | | | | | | | Even though the compute_topic opt is used outside nova.compute.rpcapi, it makes sense for the RPC module to "own" the topic option. blueprint: scope-config-opts Change-Id: I453951825481b9a5ba1865f6bf1223f7b1e25f98
* 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
* Merge "Switch from FLAGS to CONF in bin"Jenkins2012-11-061-2/+3
|\
| * Switch from FLAGS to CONF in binMark McLoughlin2012-11-041-2/+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
* | Merge "Fixes volume attach issue on Hyper-V"Jenkins2012-11-061-1/+8
|\ \ | |/ |/|
| * Fixes volume attach issue on Hyper-VAlessandro Pilotti2012-11-051-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes Bug: #1074717 During volume attach on Windows a process is spawned. The process currently fails with the following exception, due to eventlet monkey patching of the os module. NotImplementedError: set_nonblocking() on a file object with no setblocking() method (Windows pipes don't support non-blocking I/O) The fix consists in avoiding monkey patching the os module in nova-compute on Hyper-V Change-Id: Ib513bc218da83b751439bad114baac24b08e3d02
* | 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
* Fix hardcoded topic strings with constants.Michael H Wilson2012-10-251-1/+3
| | | | | | | | Replace hardcoded topic strings like 'volume' or 'compute' with config constants like FLAGS.volume_topic, etc. See bug #1057831 and bug #1061628. Change-Id: I817ecc3cbe3245b51a0c047be58d17edfec8a838
* 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
* 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-3/+2
|\
| * fix typoVishvananda Ishaya2011-08-181-1/+1
| |
| * more cleanup of binaries per reviewVishvananda Ishaya2011-08-181-3/+2
| |
* | Added monkey patching notification code functionNachi Ueno2011-08-191-0/+1
|/ | | | w
* Pylinted nova-compute.Josh Kearney2011-04-201-3/+3
|
* fix pep8 and remove extra reference to resetVishvananda Ishaya2011-02-211-1/+0
|
* switch to explicit call to logging.setup()Vishvananda Ishaya2011-02-211-0/+5
|
* merged from upstreamtermie2010-12-151-0/+3
|\
| * Initial i18n commit for endpoints. All endpoints must installjaypipes@gmail.com2010-12-111-0/+3
| | | | | | | | gettext, which injects the _ function into the builtins.
| * Removed a blank line.Michael Gundlach2010-12-011-1/+0
| |
| * Move default_flagfile() call to where it will be parsed in time to load the ↵Michael Gundlach2010-12-011-1/+2
| | | | | | | | flagfile
| * Unify the location of the default flagfile.Soren Hansen2010-11-231-0/+2
| | | | | | | | | | | | | | | | | | Not all workers called utils.default_flagfile, and nova-manage explicitly said to use the one in /etc/nova/nova-manage.conf. This made development awkward since everything but nova-manage would use defaults for everything, but nova-manage would use whatever config was in /etc/nova/nova-manage.conf which was likely put there by a package of some sort.
* | add back utils.default_flagflieAndy Smith2010-12-091-0/+2
| |
* | formatting and naming cleanupAndy Smith2010-12-091-3/+1
| |
* | remove service and rename service_eventlet to serviceAndy Smith2010-12-091-3/+3
| |
* | make nova binaries use eventletAndy Smith2010-12-091-0/+1
| |
* | part way through porting the codebase off of twistedAndy Smith2010-10-251-7/+5
|/ | | | | | | | this provides a very basic eventlet-based service replacement for the twistd-based services, a replacement for task.LoopingCall also adds nova-combined with the goal of running a single service when doing local testing and dev
* merged trunkVishvananda Ishaya2010-09-071-0/+11
|\
| * Make the scripts in bin/ detect if they're being run from a bzr checkoutSoren Hansen2010-09-081-0/+11
| | | | | | | | | | or an extracted release tarball or whatever and adjust PYTHONPATH accordingly.
* | updated models a bit and removed service classesVishvananda Ishaya2010-09-021-2/+2
| |
* | instance runsVishvananda Ishaya2010-08-301-1/+1
|/
* More bin/ pep8/pylint cleanup.Eric Day2010-08-181-1/+1
|
* renamed xxxservice to serviceVishvananda Ishaya2010-07-261-2/+2
|
* renamed xxxnode to xxserviceVishvananda Ishaya2010-07-231-2/+2
|
* typo fixes and extra print statements removedVishvananda Ishaya2010-07-221-2/+2
|
* refactor daemons to use common base class in preparation for network refactorVishvananda Ishaya2010-07-211-67/+1
|
* remove all of the unused saved return values from attach_to_twistedVishvananda Ishaya2010-07-211-2/+2
|
* make nova-volume start with twisteds daemonize stuffVishvananda Ishaya2010-07-161-6/+3
|
* remove import of vendor since we have PPA nowJesse Andrews2010-07-151-1/+1
|
* update copyrightsTodd Willey2010-07-151-2/+0
|