Don't swallow missing SR error

Bug #1175357 reported by Rick Harris
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Rick Harris
Grizzly
Fix Released
Low
Russell Bryant

Bug Description

Received the following traceback when starting up the compute-worker: http://paste.openstack.org/show/36738/

Root-cause turned out to be a missing SR: the `update_stats` code in xenapi.hosts.py would detect the missing SR, log an error and then bail out before filling in the hypervisor_hostname key.

Since the exception was swallowed, this was more difficult to track down than it had to be.

A better solution would be, since these stats are required, making an SR required, we should *raise* an exception when the SR isn't found.

Changed in nova:
assignee: nobody → Rick Harris (rconradharris)
status: New → In Progress
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/27981

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/27981
Committed: http://github.com/openstack/nova/commit/b6aac988e46147154d49e938ecf9b67831613636
Submitter: Jenkins
Branch: master

commit b6aac988e46147154d49e938ecf9b67831613636
Author: Rick Harris <email address hidden>
Date: Wed May 1 21:47:35 2013 +0000

    xenapi: Don't swallow missing SR exception

    The existing code would catch a missing SR exception and bail out of the
    `update_status` method before finishing, causing required keys to be missing.
    The end-result was code breaking later on when it tried to access these keys.

    Since an SR is required to generate these required stats keys, we shouldn't
    swallow the StorageRepositoryNotFound exception and instead should fail-fast.

    Fixes bug 1175357

    Change-Id: I3d65ae807fb2d86277bc0061c1967a87792b6662

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/28075

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/grizzly)

Reviewed: https://review.openstack.org/28075
Committed: http://github.com/openstack/nova/commit/498ce526c1c2ce1ad1e17af9fc4a3ff67b0b09a4
Submitter: Jenkins
Branch: stable/grizzly

commit 498ce526c1c2ce1ad1e17af9fc4a3ff67b0b09a4
Author: Rick Harris <email address hidden>
Date: Wed May 1 21:47:35 2013 +0000

    xenapi: Don't swallow missing SR exception

    The existing code would catch a missing SR exception and bail out of the
    `update_status` method before finishing, causing required keys to be missing.
    The end-result was code breaking later on when it tried to access these keys.

    Since an SR is required to generate these required stats keys, we shouldn't
    swallow the StorageRepositoryNotFound exception and instead should fail-fast.

    Fixes bug 1175357

    Change-Id: I3d65ae807fb2d86277bc0061c1967a87792b6662
    (cherry picked from commit b6aac988e46147154d49e938ecf9b67831613636)

tags: added: in-stable-grizzly
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-1
status: Fix Committed → Fix Released
Alan Pevec (apevec)
tags: removed: in-stable-grizzly
Changed in nova:
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-1 → 2013.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.