Merge pull request #1608 from myENA/upstream/context-cleanup Cleanup RBD contexts after exceptions to prevent potential agent crashWe noticed that when an exception occurs within the cleanup loop inside the deletePhysicalDisk routine that the previously allocated contexts are not cleaned up. This seemed to cause an eventual crash of the host agent after multiple exceptions within the loop.
In addition to ensuring the contexts are always freed we also improved the logging when exceptions do occur to include the actual return code from the underlying library in deletePhysicalDisk and deleteSnapshot. * pr/1608: improve logging readability Cleanup rbd contexts and improve exception logging Signed-off-by: Will Stevens <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bb9d94bc Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bb9d94bc Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bb9d94bc Branch: refs/heads/4.9-bountycastle-daan Commit: bb9d94bc64336f1fc34804716aeb150cc1b04dea Parents: ea48e95 c8fce3f Author: Will Stevens <[email protected]> Authored: Mon Jul 18 14:10:36 2016 -0400 Committer: Will Stevens <[email protected]> Committed: Mon Jul 18 14:10:37 2016 -0400 ---------------------------------------------------------------------- .../kvm/storage/KVMStorageProcessor.java | 16 +++++++- .../kvm/storage/LibvirtStorageAdaptor.java | 43 ++++++++++++-------- 2 files changed, 42 insertions(+), 17 deletions(-) ----------------------------------------------------------------------
