329 Commits

Author SHA1 Message Date
Matt Dietz
2774d7f252 Fixes lp883279
Nova sending instance_id in notifications instead of uuids

Change-Id: I411ea1a9aee53af4ee8cb4b1118dc41549c80227
2011-10-31 11:44:04 -05:00
Johannes Erdfelt
0ec6377092 Log original dropped exception when a new exception occurs
If a exception is caught while processing a previous exception, make sure
to log it so it doesn't silently get discarded

Change-Id: Ic887db9c2592229970737daf5dd9732b2258877b
2011-10-31 16:42:47 +00:00
David Subiros
a09755f599 Improve the liveness checking for services
With this modification both nova-manage and scheduler use the flag
service_down_time and check positive and negative values in a
correct way.
Fixes bug: 867674.

Change-Id: I15c48d80cafa2089cd228c09c61b0a1e513730e8
2011-10-21 13:32:01 +01:00
Rick Harris
d554f915f3 Repartition and resize disk when marked as managed.
Implements part of the instance-disk-management blueprint.

Change-Id: I16d0f816cdf82ee1e19a323cb9976477924e4c5c
2011-10-19 11:45:42 -05:00
Jenkins
471b7d8e8b Merge "Xenapi driver can now generate swap from instance_type" 2011-10-14 18:54:09 +00:00
Rick Harris
1115ecacee Xenapi driver can now generate swap from instance_type
Change-Id: I50268a85ccd62b019436a207c2b52b1901597564
2011-10-13 18:46:38 -05:00
Monsyne Dragon
831a60e88b Adds more usage data to Nova's usage notifications.
Adds in bandwidth, state and IP data on standard notifications,
and new notifications on add/remove IP.

These were missing before, and are needed to meet spec.
This fixes bug 849117

Change-Id: Ie586ff3a91a56e5f5eff8abc6905ba6a0b624451
2011-10-12 19:11:14 +00:00
Julien Danjou
e632f76e96 Include original exception in ClassNotFound exception
By doing this, we allow the error messages to be more useful. When an import
of a class fails because of a missing module dependency, it would have fail
that way for example:

$ nova-manage
Traceback (most recent call last):
  File "./bin/nova-manage", line 84, in <module>
    from nova import image
  File "/home/jd/Work/src/nova/nova/image/__init__.py", line 22, in <module>
    from nova.image import glance
  File "/home/jd/Work/src/nova/nova/image/glance.py", line 42, in <module>
    GlanceClient = utils.import_class('glance.client.Client')
  File "/home/jd/Work/src/nova/nova/utils.py", line 66, in import_class
    raise exception.ClassNotFound(class_name=class_str)
nova.exception.ClassNotFound: Class Client could not be found

This does not help the user, since it indicates the class Client cannot be
found, even if it is actually found but fail to import.

With this commit, the error message is better:
nova-manage
Traceback (most recent call last):
  File "./bin/nova-manage", line 84, in <module>
    from nova import image
  File "/home/jd/Work/src/nova/nova/image/__init__.py", line 22, in <module>
    from nova.image import glance
  File "/home/jd/Work/src/nova/nova/image/glance.py", line 42, in <module>
    GlanceClient = utils.import_class('glance.client.Client')
  File "/home/jd/Work/src/nova/nova/utils.py", line 66, in import_class
    raise exception.ClassNotFound(class_name=class_str, exception=exc)
nova.exception.ClassNotFound: Class Client could not be found: No module named kombu.connection

This helps to know that in this kombu is missing.

It would probably even better to rename ClassNotFound to
ClassCannotBeImported or something like that too.

Change-Id: I4100d931a0a825fa0729d5467d2f9268fdd2a261
Signed-off-by: Julien Danjou <julien.danjou@enovance.com>
2011-10-10 09:55:37 +02:00
Rick Harris
7f33611c19 Fixing tests 2011-09-21 15:59:40 -05:00
Josh Kearney
466c5ad651 Fixed unit tests with some minor refactoring. 2011-09-20 15:21:06 -05:00
Rick Harris
49c012d233 Adding progress 2011-09-14 23:11:03 +00:00
Tushar Patil
b2b69a423b Fixed review comments 2011-09-02 11:00:33 -07:00
Tushar Patil
8409af0f95 Fix for LP Bug #838251 2011-08-31 17:06:15 -07:00
Nachi Ueno
71e19faa0c Removed blank line 2011-08-23 08:51:44 -07:00
Nachi Ueno
0ea7bdf78b Merged with trunk 2011-08-23 08:46:55 -07:00
Nachi Ueno
6a7075b6d8 Fixed typo and docstring and example class name 2011-08-23 08:07:25 -07:00
Tushar Patil
ea0635f407 Merged from trunk,resolved conflicts and fixed broken unit tests due to changes in the extensions which now include ProjectMapper 2011-08-22 16:35:09 -07:00
Nachi Ueno
6d2f8203bf Fixed conflict with branch 2011-08-22 14:45:18 -07:00
Nachi Ueno
808ed1e6ed Added Test Code, doc string, and fixed pip-requiresw 2011-08-22 14:24:37 -07:00
William Wolf
3ea4a282d4 merge with trunk 2011-08-22 08:28:12 -04:00
Nachi Ueno
43d47f5a9f Fixed typo 2011-08-19 14:22:53 -07:00
Nachi Ueno
ac59605d2e Merged with trunkw 2011-08-19 13:25:49 -07:00
Nachi Ueno
82a1346485 Added monkey patching notification code function
w
2011-08-19 12:30:55 -07:00
Tushar Patil
e2a242fd55 Merged from trunk 2011-08-19 10:08:46 -07:00
Sandy Walsh
3c959d8890 Fixes primitive with builtins, modules, etc 2011-08-19 10:01:25 -07:00
William Wolf
2ea0693903 merge with trunk 2011-08-19 09:54:05 -04:00
Vishvananda Ishaya
f3af277911 Make all services use the same launching strategy 2011-08-17 16:25:53 -07:00
Tushar Patil
7bcbb7381d Merged with trunk and fixed broken unit testcases 2011-08-12 12:29:24 -07:00
William Wolf
d435f76a47 merge from trunk 2011-08-11 15:49:58 -04:00
Thierry Carrez
c031275174 * Removes rogue direct usage of subprocess module by proper utils.execute calls
* Adds a run_as_root parameter to utils.execute, that prefixes your command with FLAG.root_helper (which defaults to 'sudo')
* Turns all sudo calls into run_as_root=True calls
* Update fakes accordingly
* Replaces usage of "sudo -E" and "addl_env" parameter into passing environment in the command (allows it to be compatible with alternative sudo_helpers)
* Additionally, forces close_fds=True on all utils.execute calls, since it's a more secure default
2011-08-11 12:34:04 +00:00
William Wolf
5250aa7d9e tenant_id -> project_id 2011-08-10 15:47:22 -04:00
Tushar Patil
efca65b98c Merged with trunk 2011-08-09 16:26:12 -07:00
Thierry Carrez
ef63c85c8e Rename sudo_helper FLAG into root_helper 2011-08-09 14:11:15 +01:00
Thierry Carrez
34930a48dc Command args can be a tuple, convert them to list 2011-08-09 13:30:06 +01:00
Thierry Carrez
140eb4d1d0 Fix usage of sudo -E and addl_env in dnsmasq/radvd calls, remove addl_env support, fix fake_execute allowed kwargs 2011-08-09 12:21:28 +01:00
Thierry Carrez
a36757e183 Use close_fds by default since it's good for you 2011-08-09 12:05:05 +01:00
Thierry Carrez
48911f8b7e Fix ajaxterm's use of shell=True, prevent vmops.py from running its own version of utils.execute 2011-08-09 11:22:32 +01:00
Naveed Massjouni
c1a325a439 Merge from trunk. 2011-08-08 20:25:31 -04:00
Naveed Massjouni
68e533f90d Fixing a bug in nova.utils.novadir() 2011-08-08 20:23:15 -04:00
Tushar Patil
1b9b09eaf8 Resolve conflicts and fixed broken unit testcases 2011-08-08 12:20:06 -07:00
Thierry Carrez
f76cdf25ca Add run_as_root parameter to utils.execute, uses new sudo_helper FLAG to prefix command 2011-08-05 14:33:12 +02:00
Thierry Carrez
b3ec4e762f Remove spurious direct use of subprocess 2011-08-05 14:02:55 +02:00
Matthew Hooker
625450bac5 Remove instances of the "diaper pattern"
Anywhere "except:" occurs, I tried to replace it with an explicit except on
known error types. If none were known, Except was used.

In the process I've been able to unearth a few evasive bugs and clean up some
adjacent code.
2011-08-03 19:17:08 -04:00
Sandy Walsh
c228f4befa While we currently trap JSON encoding exceptions and bail out, for error notification it's more important that *some* form of the message gets out. So, we take complex notification payloads and convert them to something we know can be expressed in JSON. 2011-08-02 11:23:11 +00:00
Tushar Patil
b356fab4ac Merged with trunk 2011-07-29 14:36:30 -07:00
Sandy Walsh
19e53d51fe made the whole instance handling thing optional 2011-07-29 12:09:17 -07:00
Sandy Walsh
30de08a73b added instance support to to_primitive and tests 2011-07-29 07:05:27 -07:00
Vishvananda Ishaya
e60419c8cd change context to maintain exact time, store roles, use ids instead of objects and use a uuid for request_id 2011-07-21 22:46:36 +00:00
Tushar Patil
6bb9635606 add optional parameter networks to the Create server OS API 2011-07-11 13:34:39 -07:00
Trey Morris
f7db9b85b6 trunk merge with migration renumbering 2011-06-30 14:20:59 -05:00