This repository was archived by the owner on Apr 27, 2022. It is now read-only.
Catch a bunch of errors everywhere:#170
Closed
naved001 wants to merge 1 commit intoCCI-MOC:masterfrom
naved001:inconsistent
Closed
Catch a bunch of errors everywhere:#170naved001 wants to merge 1 commit intoCCI-MOC:masterfrom naved001:inconsistent
naved001 wants to merge 1 commit intoCCI-MOC:masterfrom
naved001:inconsistent
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.
ianballou
reviewed
Jul 23, 2018
| 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, |
Collaborator
There was a problem hiding this comment.
Why did you have to move this command?
ianballou
approved these changes
Aug 20, 2018
Collaborator
ianballou
left a comment
There was a problem hiding this comment.
I think this looks cool
Contributor
Author
|
Thanks for the review, but I think this will require more work once #174 is merged since that restructures a lot of things. |
jeremyfreudberg
suggested changes
Aug 21, 2018
| # Forgot to test this | ||
| except rbd.ImageHasSnapshots: | ||
| raise file_system_exceptions.ImageHasSnapshotException(img_id) | ||
| return true |
Member
There was a problem hiding this comment.
welll, that's something
| 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): |
Member
There was a problem hiding this comment.
you should probably compare the value of e.errno to 2, or for bonus points, compare it to os.errno.ENOENT
Collaborator
|
How's this code looking now with the recent changes? Is everything still relevant? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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