diff options
| author | Chuck Short <chuck.short@canonical.com> | 2012-03-26 09:41:10 -0400 |
|---|---|---|
| committer | Chuck Short <chuck.short@canonical.com> | 2012-03-26 13:56:36 -0400 |
| commit | b207ba3ed30a4750eec60a44e4dba66c59491e7b (patch) | |
| tree | 67c7fe7868eed585a2856b3d5cf192be7782796f /nova | |
| parent | 129150c853c635b28238b2ac6bd3193c453b08a7 (diff) | |
| download | nova-b207ba3ed30a4750eec60a44e4dba66c59491e7b.tar.gz nova-b207ba3ed30a4750eec60a44e4dba66c59491e7b.tar.xz nova-b207ba3ed30a4750eec60a44e4dba66c59491e7b.zip | |
Fix traceback when sending invalid data.
Running euca-terminate-instance with invalid data results
in a traceback and a hang. This fixes bug 965225
Change-Id: I0b547d527bca5fb86ff650188ac903066361d933
Diffstat (limited to 'nova')
| -rw-r--r-- | nova/api/ec2/__init__.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/nova/api/ec2/__init__.py b/nova/api/ec2/__init__.py index 17759015f..964f54995 100644 --- a/nova/api/ec2/__init__.py +++ b/nova/api/ec2/__init__.py @@ -634,11 +634,9 @@ class Executor(wsgi.Application): context=context) return ec2_error(req, request_id, type(ex).__name__, unicode(ex)) except exception.InvalidInstanceIDMalformed as ex: - LOG.debug(_('ValidatorError raised: %s'), unicode(ex), - context=context) - #EC2 Compatibility - return self._error(req, context, "InvalidInstanceID.Malformed", - unicode(ex)) + LOG.debug(_('Invalid id: bogus (expecting "i-..."): %s'), + unicode(ex), context=context) + return ec2_error(req, request_id, type(ex).__name__, unicode(ex)) except Exception as ex: env = req.environ.copy() for k in env.keys(): |
