← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1212347] Re: destroy() method of nova-compute's driver contract doesn't specify exception handling

 

So I'm putting this into an Opinion / Wishlist state because this feels
like it's part of a larger refactoring conversation. The driver contract
really isn't a contract at all at this point.

** Changed in: nova
       Status: Triaged => Opinion

** Changed in: nova
   Importance: High => Wishlist

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1212347

Title:
  destroy() method of nova-compute's driver contract doesn't specify
  exception handling

Status in OpenStack Compute (Nova):
  Opinion

Bug description:
  nova-compute's contract for virtual machine drivers doesn't specify
  how those drivers should handle errors and exceptions when the
  driver's destroy() operation is called.

  The contract should say what strategies drivers might use when the
  destroy() call encounters an error, which exceptions may be passed to
  nova-compute, and how those exceptions may cause nova-compute to
  modify the instance's state.

  The virtual machine driver destroy() contract is here:
  https://github.com/openstack/nova/blob/master/nova/virt/driver.py#L244

  Driver exceptions are handled by nova-compute:
  https://github.com/openstack/nova/blob/master/nova/compute/manager.py

  Possibly from a lack of this specification, the current set of drivers
  take different approaches to handling exceptions in their destroy()
  operations: some save and re-raise, some wrap and re-raise, some
  retry, some do nothing, and some hide the error.

  Also, without some specification, developers can't write unit tests to
  verify the driver's behaviour against the contract.

  
  Reported against nova master: commit 8fb450fb3aa033d42c5dddb907392efd70f54a6b

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1212347/+subscriptions