summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-02-15 21:02:16 +0000
committerGerrit Code Review <review@openstack.org>2012-02-15 21:02:16 +0000
commit5e267199ea64d4d45b668ace4a497c49eb942d9b (patch)
tree4aa8f72dd3f2c6e4bd3b8558a895bd091192a5b8
parent3a95d451edfa622b987cdc8f904cd00262f32cea (diff)
parent2fa3f0b1df62217e8efa20d2b963e61b9659e3d5 (diff)
Merge "LOG.exception only works while in an exception handler"
-rw-r--r--nova/api/openstack/compute/servers.py4
-rw-r--r--nova/virt/vmwareapi/io_util.py4
-rw-r--r--nova/virt/vmwareapi/vmops.py2
-rw-r--r--nova/virt/xenapi/vm_utils.py3
4 files changed, 6 insertions, 7 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py
index a9d3a93a2..649566ec9 100644
--- a/nova/api/openstack/compute/servers.py
+++ b/nova/api/openstack/compute/servers.py
@@ -895,11 +895,11 @@ class Controller(wsgi.Controller):
reboot_type = body['reboot']['type'].upper()
if not valid_reboot_types.count(reboot_type):
msg = _("Argument 'type' for reboot is not HARD or SOFT")
- LOG.exception(msg)
+ LOG.error(msg)
raise exc.HTTPBadRequest(explanation=msg)
else:
msg = _("Missing argument 'type' for reboot")
- LOG.exception(msg)
+ LOG.error(msg)
raise exc.HTTPBadRequest(explanation=msg)
context = req.environ['nova.context']
diff --git a/nova/virt/vmwareapi/io_util.py b/nova/virt/vmwareapi/io_util.py
index 30947fba8..6c7f7efd3 100644
--- a/nova/virt/vmwareapi/io_util.py
+++ b/nova/virt/vmwareapi/io_util.py
@@ -98,7 +98,7 @@ class GlanceWriteThread(object):
self.stop()
exc_msg = (_("Glance image %s is in killed state") %
self.image_id)
- LOG.exception(exc_msg)
+ LOG.error(exc_msg)
self.done.send_exception(exception.Error(exc_msg))
elif image_status in ["saving", "queued"]:
greenthread.sleep(GLANCE_POLL_INTERVAL)
@@ -109,7 +109,7 @@ class GlanceWriteThread(object):
"- %(state)s") % {
"image_id": self.image_id,
"state": image_status}
- LOG.exception(exc_msg)
+ LOG.error(exc_msg)
self.done.send_exception(exception.Error(exc_msg))
except Exception, exc:
self.stop()
diff --git a/nova/virt/vmwareapi/vmops.py b/nova/virt/vmwareapi/vmops.py
index 2810b3b71..d613d7e02 100644
--- a/nova/virt/vmwareapi/vmops.py
+++ b/nova/virt/vmwareapi/vmops.py
@@ -123,7 +123,7 @@ class VMWareVMOps(object):
if data_store_name is None:
msg = _("Couldn't get a local Datastore reference")
- LOG.exception(msg)
+ LOG.error(msg)
raise exception.Error(msg)
data_store_name = _get_datastore_ref()
diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py
index 1c3470095..991c685d9 100644
--- a/nova/virt/xenapi/vm_utils.py
+++ b/nova/virt/xenapi/vm_utils.py
@@ -25,7 +25,6 @@ import json
import os
import pickle
import re
-import sys
import tempfile
import time
import urllib
@@ -856,7 +855,7 @@ class VMHelper(HelperBase):
except (cls.XenAPI.Failure, IOError, OSError) as e:
# We look for XenAPI and OS failures.
LOG.exception(_("instance %s: Failed to fetch glance image"),
- instance_id, exc_info=sys.exc_info())
+ instance_id)
e.args = e.args + ([dict(vdi_type=ImageType.
to_string(image_type),
vdi_uuid=vdi_uuid,