-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CA-128095 #238
CA-128095 #238
Conversation
Test this please |
Acked-by: Germano Percossi germano.percossi@citrix.com |
OK, back on this after quite some time :-) The raise in there is too drastic. Just check that at the end of the block we have at least one session and if not, raise a generic iscsi failure. I think this is the simplest and lest invasive thing we can do |
drivers/LVHDoISCSISR.py
Outdated
@@ -153,6 +153,7 @@ def load(self, sr_uuid): | |||
self.session.xenapi.PBD.set_device_config(pbd, dconf) | |||
except: | |||
util.logException("LVHDoISCSISR.load") | |||
raise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
raising here has many unwanted effects.
Let's just raise if we did not manage to have any valid session (the reason why the next indexing fails).
There is a big try/except block in load() that does not handle all possible exceptions. If an exception is not handled in place, it is logged and the function tries to continue immediately after the try/except block. Some errors are recoverable further down, but not all. When an exception is thrown, log it and save it; if immediatelly after the try/except block an 'IndexError' exception is raised, catch it and throw an 'SROSError' one instead. Signed-off-by: Kostas Ladopoulos <konstantinos.ladopoulos@citrix.com> Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
a96b9ea
to
585583b
Compare
Signed-off-by: Kostas Ladopoulos <konstantinos.ladopoulos@citrix.com> Reviewed-by: Germano Percossi <germano.percossi@citrix.com>
Superseded by PR-358 |
No description provided.