-
Notifications
You must be signed in to change notification settings - Fork 16
Conversation
This PR is pretty much copy-pasta from @chemistry-sourabh's #111 PR since dealing with the merge conflicts was nasty and it made some changes which I now feel are not necessary. This has some fixes for database issues, ceph image issues, and tgt targets.
| command = "tgt-admin -f --delete {0}".format(target_name) | ||
| output = shell.call(command, sudo=True) | ||
| logger.debug("Output = %s", output) | ||
| os.remove(os.path.join(self.TGT_ISCSI_CONFIG, |
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.
Why did you have to move this command?
ianballou
left a comment
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.
I think this looks cool
|
Thanks for the review, but I think this will require more work once #174 is merged since that restructures a lot of things. |
| # Forgot to test this | ||
| except rbd.ImageHasSnapshots: | ||
| raise file_system_exceptions.ImageHasSnapshotException(img_id) | ||
| return true |
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.
welll, that's something
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.
oops
| except (IOError, OSError) as e: | ||
| logger.info("%s target doesnt exist" % target_name) | ||
| except OSError as e: | ||
| if "[Errno 2] No such file or directory" in str(e): |
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.
you should probably compare the value of e.errno to 2, or for bonus points, compare it to os.errno.ENOENT
|
How's this code looking now with the recent changes? Is everything still relevant? |
This PR is pretty much copy-pasta from @chemistry-sourabh's #111 PR
since dealing with the merge conflicts was nasty and it made some changes
which I now feel are not necessary.
This has some fixes for database issues, ceph image issues, and tgt targets. And it's weird that we have to catch integrity errors, the code should be such that it's never even raised (I'll look fix that within this PR or maybe a different one).
I will add some integration tests too.
@apoorvemohan @mihirborkar @Izhmash