949 Commits

Author SHA1 Message Date
Kevin L. Mitchell
b7f0946bbd Finish quota refactor.
Finishes quota refactoring by making use of the new quota infrastructure.
Partially implements blueprint quota-refactor (the final piece is to
remove the old quota architecture).

This change is fairly substantial.  To make it easier to review, it has been
broken up into 3 parts.  This is the second part.

Change-Id: I1c8b43198f0d44e9e13a45575361aa043fd0639e
2012-05-23 10:17:41 -05:00
Russell Bryant
21e9d2e2b7 Add version to scheduler rpc API.
Part of blueprint versioned-rpc-apis.

One side effect of this change was that nova.scheduler.api was removed
in favor of nova.scheduler.rpcapi.  In this case, the api was just a
direct wrapper around rpc usage.  For other APIs, I've been following
the pattern that the rpcapi module provides the rpc client wrapper, and
if any other client-side logic is needed, that's where an api module is
used.

Change-Id: Ibd0292936f9afc77aeb5d040660bfa857861eed1
2012-05-23 07:59:29 -04:00
Jenkins
5d90b39c36 Merge "Remove old flagfile support." 2012-05-16 22:27:36 +00:00
Joe Gordon
6cb7801ac7 Alphabetize imports
Except for nova/api/, nova/tests/, nova/virt/
In preparation for automated checking being enabled (N306)

Change-Id: I5af70ea13b470ce58695ef0a5e0ff9da3ac1b135
2012-05-14 15:52:21 -07:00
Craig Vyvial
fbae8d09fd Adding notifications for volumes
Added notifications for volumes have been added with tests.
This includes create/delete/exists events for volumes.

blueprint nova-notifications

Change-Id: I21b74974fac22c3621ccf7564dc5c0d339f8751a
2012-05-14 16:34:08 -05: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
Jason Kölker
b7e894b196 Do not fail on notify when quantum and melange are out of sync.
This patch adds the `ignore_missing_network_data` flag which will log
exceptions rather than raising them when generating usage exists
notifications.

Change-Id: Ie11bc9028790c2d1b3de1f4709a9e17a67e06f26
2012-05-08 12:52:44 -05:00
Antony Messerli
95d2e9082e A previous patch decoupled the RPC drivers from the nova.flags, breaking instance audit usage in the process.
This configures the xvpvncproxy to configure the RPC drivers properly with FLAGS so that xvpvncproxy can run.

Change-Id: I71d27a06060120448bd3401ee91566dbc3b6a289
2012-05-07 20:53:39 -05:00
Matt Dietz
995235ac26 A previous patch decoupled the RPC drivers from the nova.flags, breaking instance audit usage in the process.
This configures the instance audit usage to configure the RPC drivers properly with FLAGS so that the job can run.

Change-Id: Ia189d18d7b25a839de67439ccd363103c5af2f8f
2012-05-01 17:38:57 +00:00
Jenkins
9c1e5e5d8f Merge "Use openstack.common.importutils." 2012-04-30 21:47:16 +00:00
Matt Dietz
8577aeb128 Adds better bookending and robustness around the instance audit usage generation
Change-Id: Ib5f68ea0b8d4ed866b5dade268e63cf99241ce4b
2012-04-30 18:01:49 +00:00
Russell Bryant
7593a6948c Use openstack.common.importutils.
Use import_class(), import_object(), and import_module() from
openstack-common's importutils module.  The equivalent functions have
been removed from nova.utils.  A few modules had import order cleaned up
in passing, as well.

My initial motivation for this was to remove some more usage of nova
bits from nova.rpc as another step towards being able to move nova.rpc
import openstack-common.  Since I was pulling importutils into nova, I
went ahead and converted the whole thing.

Change-Id: I7c7786cf0001bcd06db52b9a99ff4284a3f6c6fa
2012-04-28 23:33:15 -04:00
Jenkins
8972e9544d Merge "Refactor nova.rpc config handling." 2012-04-27 14:42:01 +00:00
Joe Gordon
60b1154b14 Imports to human alphabetical order
Problems identified by enabling N306 in run_tests.sh

Change-Id: Ifddfe58da020dd041bcbbf5f14941514a09f61c1
2012-04-26 16:25:49 -07:00
Mandar Vaze
2cea9b0413 Disallow network creation when label > 255. Fixes bug 965008
Added length check for label. Without length check,
label is truncated. Warning is shown by sqlalchemy layer.

Raise an InvalidInput exception when validation fails (like
rest of the surroudning code)

Change-Id: Iae517e03099e36f1c00f4742049834a9231a2fff
2012-04-26 01:42:23 -07:00
Russell Bryant
0b11668e64 Refactor nova.rpc config handling.
This patch does a couple of things:

1) Remove the dependency of nova.rpc on nova.flags.  This is a step
toward decoupling nova.rpc from the rest of nova so that it can be moved
to openstack-common.

2) Refactor nova.rpc so that a configuration object is passed around as
needed instead of depending on nova.flags.FLAGS.

This was done by avoiding changing the nova.rpc API as much as possible
so that existing usage of nova.rpc would not have to be touched.  So,
instead, a config object gets registered, cached, and then passed into
the rpc implementations as needed.  Getting rid of this global config
reference in nova.rpc will require changing the public API and I wanted
to avoid doing that until there was a better reason than this.

Change-Id: I9a7fa67bd12ced877c83e48e31f5ef7263be6815
2012-04-25 17:04:30 -04:00
Rick Harris
d55823d8d4 Typo fix in bin/instance-usage-audit.
The notify method now requires a context, which in this case should be
`admin_context` not `context`.

Change-Id: I53275d0e1c9a898a7c0d9685382bb52ffb2efa2c
2012-04-24 17:04:39 +00:00
Rick Harris
b916b06f10 Adding context to usage notifications.
This patch passes context objects all the way down to the usage
generating code. This allows that code (in future) patches to make
context-dependent calls in order to augment the usage_info dict.

Change-Id: I6592d7aecd99750cab6a91bbadc2c761155d2d4d
2012-04-23 21:30:15 +00:00
Johannes Erdfelt
0acc214602 Keep nova-manage commands sorted
Change-Id: Id9934ff278a87c3ccb629cb6c9b27fd57276992c
2012-04-20 17:31:52 +00:00
Brian Elliott
d207b37fa6 Renamed current_audit_period function to last_completed_audit_period to clarify its purpose.
Change-Id: I7bcfbd1a0545f992b1deae54e4deb956ae33e15d
2012-04-12 12:44:06 +00:00
Jenkins
1e133f60c7 Merge "Improved localization testing." 2012-04-10 19:14:02 +00:00
Yuriy Taraday
4fe6f839bd Improved localization testing.
Moved localization tests to tools/hacking.py.

Change-Id: I903b90dfb09a46a72b1c64c30301f90661999f5b
2012-04-10 22:01:55 +04:00
Joe Gordon
2c14f1818d Remove nova Direct API
blueprint remove-nova-direct-api

Change-Id: I3229f8d7f37d66fcd6b978966f3a428a69e08bb1
2012-04-10 09:23:30 -04:00
MotoKen
0f7db908f9 Fixes bug 952176
Checks if value is string or not before decode.

Change-Id: I3f839770fdd7b00223ce02b95b2a265d903fa00e
2012-04-09 10:46:54 +08:00
Michael Still
37dad352a1 Handle instances being missing while listing floating IPs
This resolves bug 964950, which is a nova-manage crash while
listing floating IPs when an instance has gone missing.

Change-Id: Ib628356608bc0cbb9089029876ab1df7e9f02531
2012-03-31 00:58:55 -07:00
Mark McLoughlin
283ea4a166 Export user id as password to keystone when using noauth
Fixes bug #969208

When using noauth, a user's password is her user id (e.g. in novarc).

When we export to keystone, we should make sure the same credentials
keep working rather than effectively switching all the passwords to
random UUIDs which users would never have seen before.

Change-Id: Ie77c622ce1952d03e836bb64167184022a02e902
2012-03-30 14:36:59 +01:00
Mark McLoughlin
9576d92586 Fix 'nova-manage config convert'
Fixes bug #965069

Looks like this never worked. The dest of the infile and outfile
arguments sets up an unknown kwarg.

Change-Id: I428f56564b39f5586229325db03dccb0b4a01ef6
2012-03-26 09:58:05 +01:00
Vishvananda Ishaya
4071161f38 Stop notifications from old leases
* Fixes performance issue with lots of instances
 * Also removes some commented out code
 * Fixes bug 959356

Change-Id: I6e4cf3cd6ebe9d5d1ae4fc2472ef1765d13f49f6
2012-03-19 07:57:37 -07:00
Brian Waldon
a3bab242db Remove Virtual Storage Array (VSA) code
* Remove core vsa code (api, manager, drivers)
* Remove nova-vsa executable
* Remove OpenStack Compute API v2 vsa extension
* Remove vsa scheduler
* Remove vsa db api methods
* Remove Zadara volume driver
* Do not migrate out any existing data
* Fixes bug 954490

Change-Id: Idab3d60796d5edbc23ef9f0887fcc1af558c6215
2012-03-15 20:35:09 -07:00
Jenkins
30b8e35e80 Merge "Fix up docstring" 2012-03-16 03:27:19 +00:00
Vishvananda Ishaya
2d142f3b1c Use getLogger for nova-all
* logging.exception is not defined to to logging refactor

Change-Id: Id95b3ca4dd3fd2cf3396e0b90d90c4a0edf90cf6
2012-03-15 17:42:11 -07:00
Yuriy Taraday
a123f26a3f HACKING fixes, TODO authors.
Looks like this fixes all HACKING problems that were around.
Thanks to Dina Belova and Alexander Kovalev for this work.

Change-Id: I63ae1ab2f1bb37daa236cde4096c3c893fd80dd2
2012-03-16 01:24:12 +04:00
Joe Gordon
d64564d4be Remove broken bin/*spool* tools
Change-Id: Ia67f35374917d7037887b2d2c39ca92ff79587c8
2012-03-14 15:35:08 -07:00
Joe Gordon
036c34f44f Fix up docstring
Change-Id: I0b9e29455393c34e2861360418297b60bd073d9d
2012-03-14 15:16:43 -07:00
Jesse Andrews
22ee7378c6 fix nova-manage floating delete
use address_to_hosts

bug 953716

Change-Id: I041b12204028d43a30cc412a8ea6c17f1fc6f6ff
2012-03-12 22:10:49 -07:00
Dan Prince
da23487487 fixed list warn when ip allocated to missing inst.
Update 'nova-manage fixed list' so it prints a warning if an IP
is allocated to a deleted/missing instance.

Fixes LP Bug #953685.

Change-Id: I72b7ad2cb01e31cf9bb6cab904ab10d8769a3526
2012-03-12 23:52:40 -04:00
Jenkins
f734f75175 Merge "Use cPickle and not just pickle." 2012-03-12 22:45:34 +00:00
Jenkins
d15fbe92e7 Merge "Avoid nova-manage floating create <IP addr>/32" 2012-03-12 21:57:47 +00:00
Alex Meade
00592cfa0b Use cPickle and not just pickle.
Fixes bug 953423

cPickle is up to 1000 times faster than pickle. We should use it instead.

Change-Id: I1facbdcf60d88c9fba56687abf75524498d2502e
2012-03-12 21:50:15 +00:00
Dan Prince
35ec9f3c25 Make nova-manage syslog check /var/log/messages.
Updates nova-manage syslog so that it checks /var/log/messages.

Fixes LP Bug #953354.

Change-Id: I0b4b61225285e9f0668f6f0af3928896e2700840
2012-03-12 15:59:43 -04:00
Eoghan Glynn
c5e5141528 Avoid nova-manage floating create <IP addr>/32
Fixes bug 951161

Avoid the counter-intuitive use of the /32 range to indicate a specific
individial IP address.

Instead a floating IP for a specific individual address is created by
dropping the range specifier altogether, e.g.:

  nova-manage floating create 192.168.1.150

Change-Id: I54b124e961accefa47f6faa7f201809c545c3fa5
2012-03-12 17:12:07 +00:00
Alex Meade
77495cfed1 Fix nova-manage backend_add with sr_uuid
Fixes bug 950964

Remove FIXME in db.sm_backend_conf_get_by_sr
Add first() to sm_backend_conf_get_by_sr query
Change db/api.py:sm_backend_conf_get_by_sr to call correct impl method
Have nova-manage generate an actuall sr_uuid instead of always 'None'
Actually update backend values when specifying uuid

Change-Id: I620da4563d8c936b5a072c4683ae145280104fc2
2012-03-09 19:29:07 +00:00
Vishvananda Ishaya
996c222dab Remove cruft and broken code from nova-manage
* Deletes live migration code. This code will not work in keystone
   installs, and there is an api extension that can be used through
   the python-novaclient cli
 * Deletes image management code. This was for upgrading pre-diablo
   images and doesn't work properly with glance/keystone. The glance
   cli already has the necessary functionality for uploading images.

Change-Id: Id7257833a280663af6d0b90085d03344d75a502f
2012-03-07 15:07:27 -08:00
Julien Danjou
e430c8424a nova-manage: allow use of /32 IP range
The current code does not allow to add an IP range which is /32, because
netaddr considers that there's no host in such a network. While this is
probably debatable, it disallow to add specific IP address in a pool, which
is really handy and was possible before.
This patch fix that by treating the /32 subnet as a special case.

Change-Id: I38685e6f1a3541519d1f2a9ec8d3b00dd522b44a
2012-03-07 17:26:52 +01:00
Jenkins
f5f5ad427a Merge "Fix bug 948611. Fix 'nova-manage logs errors'" 2012-03-07 07:43:19 +00:00
Joe Gordon
61d49f9ddf Fix bug 948611. Fix 'nova-manage logs errors'
Change-Id: Ica0de2bebfbadbaede698ae0e9db9bff208c358c
2012-03-06 17:16:07 -08:00
Vishvananda Ishaya
8231215589 Adds nova-manage command to convert a flagfile
Change-Id: I80edabc99f8934168956c8687103d8870c5137e7
2012-03-06 16:41:41 -08:00
Jenkins
cab9a483e8 Merge "Decode nova-manage args into unicode." 2012-03-06 18:39:05 +00:00
Jenkins
700459891e Merge "sm volume driver: fix backend adding failure" 2012-03-06 18:16:46 +00:00
Renuka Apte
60afa733c1 sm volume driver: fix backend adding failure
Fixes bug 915085

Change-Id: I908d2090815a90bae479d5caf8516e52fd879c8e
2012-02-27 23:41:42 -08:00