During snapshot of a volume-backed instance, we attempt to quiesce the
instance before doing the snapshot. If quiesce is not supported or the
qemu guest agent is not enabled, we will skip the quiesce and move on
to the snapshot.
Because quiesce is a call to nova-compute over RPC, when the libvirt
driver raises QemuGuestAgentNotEnabled, oslo.messaging will append the
full traceback to the exception message [1] for the remote caller. So,
a LOG.info(..., exp) log of the exception object will result in a log
of the full traceback. Logging of the full traceback causes confusion
for those debugging CI failures.
We would rather not log the full traceback in this case where we are
catching the exception and emitting an INFO message, so we should use
exp.format_message() instead of oslo.messaging's __str__ override.
Reviewed: https:/ /review. opendev. org/660328 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=0cad3089d3e 84e8e3436e171d0 0c8cce8717fd6d
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 0cad3089d3e84e8 e3436e171d00c8c ce8717fd6d
Author: melanie witt <email address hidden>
Date: Wed May 15 20:51:41 2019 +0000
Stop logging traceback when skipping quiesce
During snapshot of a volume-backed instance, we attempt to quiesce the
instance before doing the snapshot. If quiesce is not supported or the
qemu guest agent is not enabled, we will skip the quiesce and move on
to the snapshot.
Because quiesce is a call to nova-compute over RPC, when the libvirt otEnabled, oslo.messaging will append the
driver raises QemuGuestAgentN
full traceback to the exception message [1] for the remote caller. So,
a LOG.info(..., exp) log of the exception object will result in a log
of the full traceback. Logging of the full traceback causes confusion
for those debugging CI failures.
We would rather not log the full traceback in this case where we are format_ message( ) instead of oslo.messaging's __str__ override.
catching the exception and emitting an INFO message, so we should use
exp.
[1] https:/ /github. com/openstack/ oslo.messaging/ blob/40c25c2/ oslo_messaging/ _drivers/ common. py#L212
Related-Bug: #1824315
Change-Id: Ibfedcb8814437c 53081f5a2993ab8 4b25d73e557 f4734f2c30ad2df 5d96e615e6) 5052fcd9b22831f 1db0486a4a) 58c837aaedb7c4f b3580bda47)
(cherry picked from commit 66070416ab670da
(cherry picked from commit 2f7b1031a9b80d1
(cherry picked from commit b9caf7d9c7423a6