summaryrefslogtreecommitdiffstats
path: root/bin/nova-cells
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-50/+15
| | | | | | | | | | | | 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/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Cells: Add the main code.Chris Behrens2013-01-041-0/+53
This introduces *EXPERIMENTAL* compute cells functionality as a way to scale nova in a more distributed fashion without having to use complicated technologies like DB and message queue clustering. Cells are configured as a tree and the top level cell should contain nova-api without any nova-computes while child cells contain everything except nova-api. One can think of a cell as a normal nova deployment in that each cell has its own DB server and message queue broker. The top level cell keeps a subset of data about ALL instances in all cells in its DB. Child cells send messages to the top level cell when instances change state. Data in 1 child cell is not shared with another child cell. A new service, nova-cells, is introduced that handles communication between cells and picking of a cell for new instances. This service is required for every cell. Communication between cells is pluggable with the only option currently implemented being communnication via RPC. Cells scheduling is separate from host scheduling. nova-cells first picks a cell (currently randomly -- future patches add filtering/weighing functionality and decisions can be based on broadcasts of capacity/capabilities). Once a cell has been selected and the new build request has reached its nova-cells service, it'll be sent over to the host scheduler in that cell and the build proceeds as it does without cells. New config options are introduced for enabling and configuring the cells code. Cells is disabled by default. All of the config options below go under a '[cells]' section in nova.conf. These are the options that one may want to tweak: enable -- Turn on cells code (default is False) name -- Name of the current cell. capabilities -- List of arbitrary key=value pairs defining capabilities of the current cell. These are sent to parent cells, but aren't used in scheduling until later filter/weight support is added. call_timeout -- How long to wait for replies from a calls between cells When using cells, the compute API class must be changed in the API cell, so that requests can be proxied via nova-cells down to the correct cell properly. Thus, config requirements for API cell: -- [DEFAULT] compute_api_class=nova.compute.cells_api.ComputeCellsAPI. [cells] enable=True name=api-cell -- Config requirements for child cell: -- [cells] enable=True name=child-cell1 -- Another requirement is populating the 'cells' DB table in each cell. Each cell needs to know about its parent and children and how to communicate with them (message broker location, credentials, etc). Implements blueprint nova-compute-cells DocImpact Change-Id: I1b52788ea9d7753365d175abf39bdbc22ba822fe