From 9135f836151df4bc32e3c3fea208e3cee6f7d6dc Mon Sep 17 00:00:00 2001 From: Chuck Short Date: Fri, 24 Aug 2012 10:48:09 -0500 Subject: Trap iscsiadm error If the iscsitarget was previously deleted and the user tries to delete the iscsi target again, then you get a nasty traceback in the logfiles. According to the iscsiadm man page, iscsiadm returns an error 21, ISCSI_ERR_NO_OBJS_FOUND if there is no records/targets/sessions/portals found to execute the operation on. LP: #1011166 Change-Id: I3087c1a114fe91bd7361d92688d4f926bc3f8951 Signed-off-by: Chuck Short --- nova/virt/libvirt/volume.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/virt/libvirt/volume.py b/nova/virt/libvirt/volume.py index 54e6bfbf6..941fd4924 100644 --- a/nova/virt/libvirt/volume.py +++ b/nova/virt/libvirt/volume.py @@ -203,4 +203,4 @@ class LibvirtISCSIVolumeDriver(LibvirtVolumeDriver): self._run_iscsiadm(iscsi_properties, ("--logout",), check_exit_code=[0, 255]) self._run_iscsiadm(iscsi_properties, ('--op', 'delete'), - check_exit_code=[0, 255]) + check_exit_code=[0, 21, 255]) -- cgit