Compute exception text never present when max sched attempt reached

Bug #1361097 reported by Joe Cropper
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Joe Cropper

Bug Description

When scheduling VMs and the retry logic kicks in, the failed compute exception text is saved to be displayed for triaging purposes in the conductor/scheduler logs. When the conductor tries to display the exception text when the maximum scheduling attempts have been reached, the exception always shows 'None' for the exception text.

Snippet from scheduler_utils.py...

 msg = (_('Exceeded max scheduling attempts %(max_attempts)d '
'for instance %(instance_uuid)s. '
'Last exception: %(exc)s.')
% {'max_attempts': max_attempts,
'instance_uuid': instance_uuid,
'exc': exc})

That is, 'exc' is erroneously ALWAYS None in this case.

Joe Cropper (jwcroppe)
Changed in nova:
assignee: nobody → Joe Cropper (jwcroppe)
description: updated
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/116571

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/116571
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=88d91252eca1f8734e316a6e4b9ebc3a977bee44
Submitter: Jenkins
Branch: master

commit 88d91252eca1f8734e316a6e4b9ebc3a977bee44
Author: Joe Cropper <email address hidden>
Date: Mon Aug 25 03:20:08 2014 -0500

    Preserve exception text during schedule retries

    This fix preserves the exception text (as intended) when the number
    of scheduling retries exceeds the maximum attempts. We don't pop
    the exception message anymore in _log_compute_error so that the
    final "max attempts" error message has an opportunity to dump it
    as well.

    This defect caused the exception text (from the compute process) to
    ALWAYS be None, thus making it difficult to triage compute errors.

    Change-Id: I5c7cac1d79dc583cca523270bb0a96d3353ca1f6
    Closes-Bug: #1361097

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-3 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.