Skip to content
This repository was archived by the owner on Apr 27, 2022. It is now read-only.

Conversation

@naved001
Copy link
Contributor

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

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,
Copy link
Collaborator

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?

Copy link
Collaborator

@ianballou ianballou left a 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

@naved001
Copy link
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.

# Forgot to test this
except rbd.ImageHasSnapshots:
raise file_system_exceptions.ImageHasSnapshotException(img_id)
return true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

welll, that's something

Copy link
Contributor Author

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):
Copy link
Member

@jeremyfreudberg jeremyfreudberg Aug 21, 2018

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

@ianballou
Copy link
Collaborator

How's this code looking now with the recent changes? Is everything still relevant?

@naved001 naved001 closed this Sep 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants