Commit Graph

1156 Commits

Author SHA1 Message Date
Davanum Srinivas 7fe653eb82 Fix copyright - from LLC to Foundation
one last spot hopefully!

Change-Id: I4d557520a1a7a3e0b13bca7df6c8d06bd850b867
2013-03-13 17:59:13 -04:00
Jenkins 6a782754a4 Merge "Sync rpc from oslo-incubator." 2013-03-13 16:03:11 +00:00
Russell Bryant d984b0b0bc Sync rpc from oslo-incubator.
Changes include:

 * Fix Copyright Headers - Rename LLC to Foundation
 * Preserve exceptions in impl_zmq.
 * Don't log a traceback on rpc call timeout.
 * Redis-based matchmaker
 * AMQP: skip duplicate messages
 * some other minor fixes / cleanups

Fix bug 1154232.

Change-Id: I8afb6b9a919fca34b4a93f7fad1551a023eba6b2
2013-03-12 14:24:49 -04:00
Hans Lindgren 071a41f1d0 Fix: nova-manage throws uncaught exception on invalid host/service
Add a test case for this too.

Fix bug 1154089.

Change-Id: I3a60e581a9fac945fddf72c4f037ca5cae0005fc
2013-03-12 15:06:07 +01:00
Jenkins 27dc7d4625 Merge "Check CONF values *after* command line args are parsed" 2013-03-10 00:21:02 +00:00
Jenkins 63cf127766 Merge "Add conductor to nova-all." 2013-03-08 21:38:26 +00:00
Jenkins 9d836d828f Merge "Make nova-manage db archive_deleted_rows more explicit" 2013-03-08 20:55:22 +00:00
Rick Harris e403a23ba8 Add conductor to nova-all.
The conductor service was missing so running nova-all no longer results
in a complete environment.

This patch adds conductor to the binary list and updates the code to
handle the different way in which conductor specifies the topic and
manager.

Fixes bug 1152371

Change-Id: I4862ad66216ab980e8636e9f3cdbabbace6ee73c
2013-03-08 19:47:55 +00:00
Davanum Srinivas 5f5f8f616b Check CONF values *after* command line args are parsed
CONF.ssl_only will contain the default value till
parse_args is called.

Fix for LP# 1123540

Change-Id: Ib80d39b883c8ce2d6b813ca2b76051dd95ffb2b6
2013-03-07 21:07:20 -05:00
Joe Gordon abc0c94791 Make nova-manage db archive_deleted_rows more explicit
* 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
2013-03-08 01:32:30 +00:00
Devananda van der Veen de4b35a4ca Baremetal deploy helper sets ODIRECT.
Baremetal deploy helper should set oflag=direct when dd'ing images onto
iSCSI targets, so that it doesn't waste the local page cache.

Fixes bug 1114633.

Change-Id: Ia674afb34aff7b842cfcd520ecb7b75dc21944fa
2013-03-04 15:03:04 -08:00
Mark McLoughlin 2b6f37461b Regenerate nova.conf.sample
Fix generate_sample.sh script so that we include options from the bin/
scripts too. In order to make this work, sync a zmq-receive fix from
oslo-incubator to delay parsing its config file.

Change-Id: Ia3f9083b2ebc16425dbad8a2a55c2d45f1ff2be3
2013-03-01 12:12:41 +00:00
Kurt Taylor d17f9ab13d Update OpenStack LLC to Foundation
Update all references of "LLC" to "Foundation".

Change-Id: I009e86784ef4dcf38882d64b0eff484576e04efe
2013-02-26 19:15:29 -05:00
Jenkins f5fec8aa01 Merge "Sync nova with oslo DB exception cleanup." 2013-02-27 00:14:48 +00:00
Chris Behrens 625ecb610c Sync nova with oslo DB exception cleanup.
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
2013-02-25 21:32:59 +00:00
Brent Eagles 62b18ebb68 Change nova-dhcpbridge FLAGFILE to a list of files
This patch adds support to linux_net and nova-dhcpbridge for
specifying and conveying multiple dhcpbridge_flagfile values.
The support is implemented as follows:

dhcpbridge_flagfile is now a "MultiStr" configuration file option
allowing the flag files to be defined over multiple configuration files.
The configured files are concatenated into a comma separated string and
assigned to the FLAGFILE environment variable when invoking
nova-dhcpbridge. nova-dhcpbridge splits the value of the environment
variable on the comma an initializes its configuration with the provided
files (the configuration system already supports loading configuration
from multiple files)

Fixes bug 1131932

Change-Id: Ic9cc57b8f7d9356606b9134ef5b63ab07b6099d9
2013-02-24 23:41:56 -03:30
Jenkins cd9447f872 Merge "Add better status to baremetal deployments." 2013-02-20 20:03:29 +00:00
Jenkins f478fa6967 Merge "Prevent the unexpected with nova-manage network modify." 2013-02-20 18:30:19 +00:00
Devananda van der Veen c20110d15b Add better status to baremetal deployments.
This patch introduces a few new baremetal states, which are used to
track the deploy process. Now, nova-baremetal-deploy-helper updates the
bm_nodes record directly when it begins and finishes deploying an image
to that node.

The next patch will add a LoopingCall inside driver.spawn() to wait for
the deploy to complete.

Also, since there can not be >1 active deployment per node, there
is no need to have a separate table for storing them. This patch drops
the table bm_deployments and adds the important information it contained
to bm_nodes. Since the previous behavior was to mark a deployment as
deleted once it completed, there is no need to copy any data from
bm_deployments prior to dropping the table -- assuming that no active
deployments are in process when the migration is run.

Since this is the first migration for the baremetal database, it also
adds a new test class, TestBaremetalMigrations, and refactors the
test_migrations.py file to allow for multiple test classes.

partially implements fix for bug 1096723

Change-Id: Iad30b462d49c88fc19babed43a2fb8540b1fad30
2013-02-20 09:55:02 -08:00
Russell Bryant c2066facd0 Sync rpc from oslo-incubator.
This includes the following changes:

 * use oslo.config directly
 * implementation of rpc-amqp-fast-reply-queue
 * simplifications to bin/nova-rpc-zmq-receiver
 * add new join_consumer_pool API call
 * a bug fix to ensure kombu messages get acked even when an exception
   occurs in the message callback

Change-Id: I813ce0ee7d5442d7b5b0f9d477949adabc83174e
2013-02-20 08:58:58 -05:00
Mark McLoughlin 706a137005 Use oslo-config-2013.1b4
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
2013-02-19 21:16:32 -08:00
Brent Eagles 5cb12a2284 Prevent the unexpected with nova-manage network modify.
"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
2013-02-18 17:09:35 -03:30
Jenkins 26389d30f2 Merge "Synchronize code from oslo" 2013-02-16 01:38:07 +00:00
Jenkins 2ecf9e8bf1 Merge "Allow archiving deleted rows to shadow tables, for performance." 2013-02-15 13:20:38 +00:00
David Ripton 961d615ce6 Allow archiving deleted rows to shadow tables, for performance.
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
2013-02-14 16:38:23 -05:00
Alessio Ababilov 17daedc6cc Synchronize code from oslo
Use commit eaab5fae2502198e9fa57d0d90a7204a2bd83b16:
Merge "sort options to make --help output prettier"
(Wed Feb 13 12:52:14 2013 +0000).

Changes:
  9669767 Fix PEP8 error in oslo-rootwrap
  e3e5e0e Fixes "is not", "not in" syntax usage
  d156150 Implements import_group
  0ce65aa sort options to make --help output prettier
  580c259 Make tox run doctests
  d8c4e0c Change Exception MissingArgs's string
  6d102bc Provide i18n to those messages without _()
  cf705c5 Make project pyflakes clean
  9e5912f Fix pep8 E125 errors
  4a1ec21 Support testing args for LocalhostMatchMaker
  9fd6437 Exchanges should return directed topics
  a4b6c31 Allow running test in uninstalled source tree
  1461135 timeutils: considers that now is soon
  a956f7a Import timeutils.is_soon from keystoneclient
  a4b6c31 Allow running test in uninstalled source tree
  076e9e5 Add support for directly stringifying VersionInfo

Change-Id: I427508f0882a528d040c89290ff9ca68a1e91bcd
Fixes: bug #1124213
2013-02-14 11:13:15 +02:00
Jenkins d8a4848424 Merge "maint: remove unused imports from bin/nova-*" 2013-02-14 04:25:42 +00:00
Dan Smith e7bc52d3f2 Fix nova-compute use of missing DBError
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
2013-02-12 09:30:44 -05:00
Yun Mao 9e208ae6e3 Use ServiceGroup API to show node liveness
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
2013-02-11 15:37:18 -05:00
Jenkins c943e2f66b Merge "Ban database access in nova-compute" 2013-02-07 21:14:55 +00:00
Pádraig Brady 4284451ef5 maint: remove unused imports from bin/nova-*
Change-Id: I80b58ac41bbb0517221d5fd5ba9938f2b7836779
2013-02-07 19:10:56 +00:00
Dan Smith e5cbbcfc6a Ban database access in nova-compute
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
2013-02-06 21:45:17 -05:00
Eric Windisch cd0c765ced Use oslo database code
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
2013-02-05 10:13:04 +00:00
Jenkins 35ba1f88df Merge "fix nova-baremetal-manage version printing" 2013-02-02 14:56:03 +00:00
Vishvananda Ishaya dd5f2c82d7 Split floating ip functionality into new file.
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
2013-01-31 15:38:17 -08:00
Daniel P. Berrange 39e35d78c8 Change ''' to """ in bin/nova-{novncproxy,spicehtml5proxy}
Standard practice is for doc comment strings to be enclosed
in """ rather than '''. bin/nova-{novncproxy,spicehtml5proxy}
were exceptions to this.

Change-Id: I689063af2a51b26c971336b6fdbe60d5695b3ebc
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2013-01-29 09:36:03 +00:00
Pádraig Brady b8cc0340e3 fix nova-baremetal-manage version printing
version.version_string_with_vcs is no longer present

Change-Id: Iaecf793b82c030f7095de7e42222e28869d1cf33
2013-01-28 15:20:10 +00:00
Davanum Srinivas 9ed200d3cd Fix bad imports that cause nova-novncproxy to fail
Looks like it was introduced with
Iddba07ff13e10dc41a6930749044bb8c0572d279

Fixes LP# 1104907

Change-Id: Ie0c01af62a7fd20a6021b3c6fe89af88585e2fb2
2013-01-25 09:18:23 -05:00
Jenkins 1eb7cd735d Merge "Support optional 4 arg for nova-dhcpbridge" 2013-01-25 00:57:12 +00:00
Jenkins b93176a6ab Merge "Increase maximum URI size for EC2 API to 16k" 2013-01-25 00:02:15 +00:00
Chet Burgess d94e693bc4 Support optional 4 arg for nova-dhcpbridge
dnsmasq will call the add, old, and del actions with an optional
4 argument of hostname if the hostname is known. Since we populate
the hostname in the DHCP host file its always passed to us.

Add an optional 4 argument for hostname for the add, old, and del
actions.

Change-Id: I1a6c095324be2424d6c1d469877b254f88fba4aa
Fixes: bug #1103783
2013-01-24 23:46:37 +00:00
Burt Holzman dfec46ac8e Increase maximum URI size for EC2 API to 16k
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
2013-01-24 17:11:10 -06:00
Jenkins f9012e39ee Merge "Fix hacking N302 import only modules" 2013-01-24 22:59:13 +00:00
Joe Gordon 4845fc2720 Fix hacking N302 import only modules
* Includes some general tools/hacking cleanup
* Fix several N302 cases
* Disable N302 until all cases are fixed

Change-Id: Iddba07ff13e10dc41a6930749044bb8c0572d279
2013-01-24 09:52:58 -05:00
Jenkins 57956569ff Merge "Fixed nova-manage argument parsing error" 2013-01-23 17:30:26 +00:00
Ilya Alekseyev 7d31c7b15d Adds SSL support for API server.
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
2013-01-23 08:49:16 -05:00
Jenkins bb108c6bd3 Merge "Sync latest cfg from oslo-incubator" 2013-01-23 12:52:12 +00:00
Tony NIU a99ddf204a Fixed nova-manage argument parsing error
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
2013-01-23 09:29:07 +08:00
Jenkins 794b0ffc75 Merge "Tests for PXE bare-metal provisioning helper server." 2013-01-22 22:57:17 +00:00
Jenkins d15d525c88 Merge "Use common rootwrap from oslo-incubator" 2013-01-21 22:00:27 +00:00