summaryrefslogtreecommitdiffstats
path: root/bin/nova-manage
Commit message (Collapse)AuthorAgeFilesLines
* Delete unused bin directoryJoe Gordon2013-06-031-23/+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-1247/+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
* Raise rather than generating millions of IPs.David Ripton2013-04-021-0/+8
| | | | | | | | | | | | | | | | | Fixes bug #1163394 Formerly if we tried to create many millions of floating IPs with a range like "192.168.2.224/2", address_to_hosts would happily iterate over all of them (which would take a long time) and then nova-manage would eventually crash with an OutOfMemoryError when we tried putting all of them in a list. Or, if the initial list wasn't quite big enough to use all memory, it would blow up later (even more slowly) when we tried to put them in the database via SQLAlchemy. Now, raise exception.InvalidInput if the number of IPs is a million or more. (A million is erring on the side of caution.) Change-Id: Ifc6b6a8faadc2e97e09f9f6c975e52229f705789
* Show quota 'in_use' and 'reserved' infogengjh2013-03-281-14/+32
| | | | | | | | | | We need show all the quotas related info, including 'in_use' and 'reserved'--not just the limit--when executing 'nova-manage project quota'. Fix bug 1160752 Change-Id: I25e10e58c6af705e2189550ad762e6f39bca342e
* nova-manage vm list fails looking 'instance_type'Phil Day2013-03-211-1/+2
| | | | | | | | | | The recent set of changes to remove the join on instance_types and get data from instance_system_metadata missed out the use in "nova-manage vm list" fixes bug: #1158352 Change-Id: I5b06a4fef34331abe40e7429b3abda47070bcbbc
* Merge "nova-manage: remove unused import"Jenkins2013-03-211-1/+0
|\
| * nova-manage: remove unused importZhiteng Huang2013-03-131-1/+0
| | | | | | | | | | | | Unused since commit 9ff3121b Change-Id: I76bb49669d1cdfc3bf5b1c20087b4bd77420cd91
* | Merge "nova-manage: remove redundant 'dest' args"Jenkins2013-03-211-103/+79
|\|
| * nova-manage: remove redundant 'dest' argsZhiteng Huang2013-03-081-103/+79
| | | | | | | | | | | | | | Includes a hack to calculate 'dest' from the argument name. This hack is removed in a later commit. Change-Id: I60567ff232ab7699f3234b3bfc1618a17a648976
* | Fix: nova-manage throws uncaught exception on invalid host/serviceHans Lindgren2013-03-121-10/+14
| | | | | | | | | | | | | | | | Add a test case for this too. Fix bug 1154089. Change-Id: I3a60e581a9fac945fddf72c4f037ca5cae0005fc
* | Make nova-manage db archive_deleted_rows more explicitJoe Gordon2013-03-081-1/+4
|/ | | | | | | | | | | | | * max_rows must be positive Provide a better error message of 'nova-manage db archive_deleted_rows --max_rows=' is negative. * Requires a max_rows * No hidden default of 5000 Fix bug 1145609 Fix bug 1151064 Change-Id: I9078ff2700a0329ac4aff68bb434be5f16a5a3f1
* Sync nova with oslo DB exception cleanup.Chris Behrens2013-02-251-5/+5
| | | | | | | | | | | | | DB exceptions have moved to openstack/common/db/exception module so that they can be shared with multiple DB implementations. Deadlock checking was also added to oslo to consolidate with DuplicateKey checking. This allows us to clean up our _retry_on_deadlock decorator in sqlalchemy/api.py Fixes unrelated pep8 issue with duplicate test in test_compute also. Change-Id: I7e985b384d1ef345e0d67c919b84b4faff869699
* Merge "Prevent the unexpected with nova-manage network modify."Jenkins2013-02-201-4/+21
|\
| * Prevent the unexpected with nova-manage network modify.Brent Eagles2013-02-181-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "nova-manage network modify" can misinterpret arguments if the user provides values where they are unexpected, specifically the --disassociate-project and --disassociate-host options. If the user provides a project or hostname value for either of these values, it will be interpreted as a positional argument and modify handler may behave as if other options were provided (e.g. project or host). This change handles the presence of a project or host option along with --disassociate-project or --disassociate-host as an error, printing a message and exiting immediately with an error code. While there are other approaches (e.g. perform the disassociate modifications while ignoring the others), preventing unexpected or inconsistent results by doing nothing seems safest. Change-Id: Iff7817fe3ed19a4ff330b4029f9c558d3b405e9b
* | 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
* | Merge "Allow archiving deleted rows to shadow tables, for performance."Jenkins2013-02-151-0/+11
|\ \
| * | Allow archiving deleted rows to shadow tables, for performance.David Ripton2013-02-141-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements bp db-archiving Add versions of all tables with "shadow_" prepended to their names. These shadow tables do not have indexes. Adds API function archive_deleted_rows, which moves some deleted rows from production tables to the corresponding shadow tables. (It only does a few rows, to avoid blocking the process or hitting the database too hard. So it needs to be called regularly.) Also adds a db archive_deleted_rows command to nova-manage. Uses Boris Pavlovic's code for copying columns from existing tables to new tables. Change-Id: I7c8f2fb8794b6f9cd2531e54a1a9635010f8c97e
* | | Merge "maint: remove unused imports from bin/nova-*"Jenkins2013-02-141-1/+0
|\ \ \ | |/ / |/| |
| * | maint: remove unused imports from bin/nova-*Pádraig Brady2013-02-071-1/+0
| |/ | | | | | | Change-Id: I80b58ac41bbb0517221d5fd5ba9938f2b7836779
* / Use ServiceGroup API to show node livenessYun Mao2013-02-111-2/+3
|/ | | | | | | | Previously it's direct db access. Now we use the servicegroup API to show node liveness. Note that db access is still needed to get other service attributes such as `disabled'. Change-Id: I65ef3a136fd90036a8d009ed97a5f48ae461d8d9
* Use oslo database codeEric Windisch2013-02-051-4/+5
| | | | | | | | | | | | | Bring in the new database code from oslo. Uses get_session() from oslo as well as changing NovaBase to derive from a common class. Remove test_sqlalchemy.py now that this code is test in oslo. Implements blueprint db-common. Change-Id: I090754981c871250dd981cbbe1a08e7181440120
* Split floating ip functionality into new file.Vishvananda Ishaya2013-01-311-1/+1
| | | | | | | | | | | | | This is to prepare for moving this code into network.api. There was one minor change made to associate_floating_ip. It no longer checks access to the fixed ip's network before associating the floating ip to the fixed ip. The calling side was already verifying access to the instance so this is unnecessary. A note was added to the method call to ensure future usage of associate_floating keeps this in mind. Part of blueprint optimize-nova-network Change-Id: I4fcda82eebee46d167e028bb68c8fedf2c3e03a1
* Fixed nova-manage argument parsing errorTony NIU2013-01-231-2/+7
| | | | | | | | | | | | In the dictionary CATEGORIES of file nova-manage, both 'flavor' and 'instance_type' refer to InstanceTypeCommands, so the category would be handled twice by add_command_parsers(). It would mess the arguments if a command category is handled more than once by function add_command_parsers(). Added a check to avoid the mess. Change-Id: I7a314a9b389b3dea848a7111cedfc762bbb6b30e Fixes: bug #1098733
* Merge "Cells: Add cells API extension"Jenkins2013-01-151-4/+4
|\
| * Cells: Add cells API extensionChris Behrens2013-01-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | Enables cells-related functionality such as adding neighbor cells, listing neighbor cells, and showing the capabilities of the local cell. Implements blueprint nova-compute-cells DocImpact Change-Id: Iacc1e68721a7867aeaf233903cbe6d18f09ad96e
* | Fix typos in docstringChangbin Liu2013-01-141-1/+1
|/ | | | | | | | * code in bin/ * code in nova/api/ Change-Id: Ic643d640b66785d4bb54defcddc3d2312292bfdf
* Merge "Cleanup pyflakes in nova-manage"Jenkins2013-01-111-4/+1
|\
| * Cleanup pyflakes in nova-manageJoe Gordon2013-01-101-4/+1
| | | | | | | | | | | | Also fixes bug 1097830 Change-Id: Id0d73950709b92f39b7ab7a915373ace0b1616ae
* | Merge "Move service_down_time to nova.service"Jenkins2013-01-101-1/+1
|\ \
| * | Move service_down_time to nova.serviceMark McLoughlin2013-01-091-1/+1
| |/ | | | | | | | | blueprint: scope-config-opts Change-Id: I5fddb3768348c43a38b72dbf738b0c7fa2967691
* / fix N402 for nova-manageSean Dague2013-01-091-21/+21
|/ | | | | | fix N402 (docstrings should end in a period) for nova-manage Change-Id: Ia07796117fb9fce6c098a58aa86a6b47c6f7eda0
* Move manager options into nova.serviceMark McLoughlin2013-01-091-1/+1
| | | | | | | | | | | | Move the compute_manager, console_manager, cert_manager, network_manager and scheduler_manager options into nova.service. Apart from the tests, these options are mostly just used in nova.service so it makes sense for them to live there. Also, metadata_manager already lives there. blueprint: scope-config-opts Change-Id: I180859817b57c081b83d6a6f075a6ff76bb0ef6d
* Remove availability_zones from service tableJoe Gordon2013-01-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the final step in enabling availability_zones using aggregate metadata. Previously all services had an availability_zone, but the availability_zone is only used for nova-compute. Services such as nova-scheduler, nova-network, nova-conductor have always spanned all availability_zones. After this change only compute nodes (nova-compute), will have an availability_zone. In order to preserve current APIs, when running: * nova host-list (os-hosts) * euca-describe-availability-zones verbose * nova-manage service list Internal services will appear in there own internal availability_zone (CONF.internal_service_availability_zone) Internal zone is hidden in euca-describe-availability_zones (non-verbose) CONF.node_availability_zone has been renamed to CONF.default_availability_zone and is only used by the nova-api and nova-scheduler. CONF.node_availability_zone still works but is deprecated DocImpact Completes blueprint aggregate-based-availability-zones Change-Id: Ib772df5f9ac2865f20df479f8ddce575a9ce3aff
* Cells: Add cells commands to nova-manageChris Behrens2013-01-021-0/+64
| | | | | | | | | | Add commands to nova-manage for configuring cells in the DB. Implements blueprint nova-compute-cells DocImpact Change-Id: Ic1a950181d5ce191780647838c5d06e5410676f7
* Merge "Fix stack trace on incorrect nova-manage args."Jenkins2012-12-291-1/+4
|\
| * Fix stack trace on incorrect nova-manage args.Michael Still2012-12-181-1/+4
| | | | | | | | | | | | | | | | | | | | This error reporting needs more work, but this at least stops us from presenting a stack trace to the user and is as broken as before. Resolves bug 1091403. Change-Id: I941983b60cc3762a916d57b7ea67264e093cfa44
* | Remove obsolete VCS version info completelyDaniel P. Berrange2012-12-191-3/+1
|/ | | | | | | | | | | | | | | | | | The VCS version string in nova/version.py has been hardcoded to 'LOCALBRANCH:LOCALVERSION' since change 0bbb0e8cb1daa351af91cf97b2bcababfc0c7f9f 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>
* Merge "Port to argparse based cfg"Jenkins2012-12-121-115/+76
|\
| * Port to argparse based cfgMark McLoughlin2012-12-111-115/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Import latest cfg from oslo-incubator with these changes: Add deprecated --logdir common opt Add deprecated --logfile common opt. Allow nova and others to override some logging defaults Fixing the trim for ListOp when reading from config file Fix set_default() with boolean CLI options Improve cfg's argparse sub-parsers support Hide the GroupAttr conf and group attributes Fix regression with cfg CLI arguments Fix broken --help with CommonConfigOpts Fix ListOpt to trim whitespace updating sphinx documentation Don't reference argparse._StoreAction Fix minor coding style issue Remove ConfigCliParser class Add support for positional arguments Use stock argparse behaviour for optional args Use stock argparse --usage behaviour Use stock argparse --version behaviour Remove add_option() method Completely remove cfg's disable_interspersed_args() argparse support for cfg The main cfg API change is that CONF() no longer returns the un-parsed CLI arguments. To handle these args, you need to use the support for positional arguments or sub-parsers. Switching nova-manage to use sub-parser based CLI arguments means the following changes in behaviour: - no more lazy matching of commands - e.g. 'nova-manage proj q' will no longer work. If we find out about common abbreviations used in peoples' scripts, we can easily add those. - the help output displayed if you run nova-manage without any args (or just a category) has changed - 'nova-manage version list' is no longer equivalent to 'nova-manage version' Change-Id: I19ef3a1c00e97af64d199e27cb1cdc5c63b46a82
* | i18n raise Exception messagesChuck Short2012-12-101-4/+5
| | | | | | | | | | | | | | | | Provide i18n to some exceptions that were not provided before. Change-Id: Ia320ba5f12e82686c8ee7973a77f152eb4b02bd4 Signed-off-by: Chuck Short <chuck.short@canonical.com>
* | Fix regression allowing quotas to be applied to projects.Andrew Glen-Young2012-12-061-0/+4
| | | | | | | | | | Change-Id: I9c7dfa7664badcafb800c02ee608699e56b344ab Fixes: bug #1084261
* | Improve nova-manage usabilityJoe Gordon2012-12-061-5/+9
|/ | | | | | | | | Prevent nova-manage from stack tracing when the wrong number of arguments are passed in. Fixes bug 1083315 Change-Id: I7b9a237a82b4255d88c01c6a56ad0ccd4a6ee984
* Validate rxtx_factor as a float.Dan Prince2012-11-271-1/+1
| | | | | | | | | | | | | | | | | | | | Updates the rxtx_factor validations in the instance_types modules so that rxtx_factor is validated as a float. Given that rxtx_factor is stored as a float in the database this makes sense... and also adheres to some of the extension documentation as well (although some of the extension docs were incorrect as well). Previously rxtx_factor was being cast into an int which caused it to be stored and displayed incorrectly via the API. This patchset adds a test which fails with the old code. Additionally some of the API docs are corrected so that rxtx_factor is listed as a float in all examples. Fixes LP Bug #1081287. Change-Id: Iae98522a1f2ed63cbd2497b0b0af5ac2d9bb935c
* Use CONF.import_opt() for nova.config optsMark McLoughlin2012-11-201-0/+2
| | | | | | | | | | | | | 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/+1
| | | | | | | | | | | | | | | 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
* Remove nova-volume DBJoe Gordon2012-11-081-141/+0
| | | | | | | | | | | | | | | * Remove volume calls from nova.db.api * Remove volume calls from nova.db.sqlalchemy.api * Remove tables from nova/db/sqlalchemy/models.py * Remove Xen Storage Manager Volume Driver code * No migration to preserve data in unused tables * Remove quota support for volumes DocImpact part of bp delete-nova-volume Change-Id: I2c82c96d67f3746e5de28f917dd8ceb0c8037e27
* Switch from FLAGS to CONF in binMark McLoughlin2012-11-041-12/+10
| | | | | | | | | | | 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
* Remove flags.DECLAREMark McLoughlin2012-11-041-8/+10
| | | | | | The cfg.ConfigOpts class has an equivalent method, so lets use that. Change-Id: I5860230336d00d7531a0ffd255c766ff77661625
* 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