Skip to content
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

Added post checks to check if object are available in etcd post create #297

Merged
merged 2 commits into from
Jun 15, 2017

Conversation

shtripat
Copy link
Member

tendrl-bug-id: #296
Signed-off-by: Shubhendu shtripat@redhat.com

@shtripat
Copy link
Member Author

@r0h4n @nnDarshan plz review

retry_count = 0
while True:
try:
volumes = NS._int.client.read(
Copy link
Contributor

Choose a reason for hiding this comment

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

use object.load() , we need to ensure all attributes inside the object are also present as provided by user

Because a Volume is only really fully available when you can load() it

Also, just load the actual volume instead of iterating over every volume

Copy link
Member Author

Choose a reason for hiding this comment

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

As discussed earlier, while volume creation we have volume name only available. This post run atom is for create volume flow. To load a specific volume we need volume uuid which is not available here.

@@ -0,0 +1,52 @@
import etcd
import gevent
import subprocess
Copy link
Contributor

Choose a reason for hiding this comment

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

subprocess not used

Copy link
Member Author

Choose a reason for hiding this comment

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

Will remove it

return True

retry_count += 1
gevent.sleep(1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Increase the timeout to 10 mins, we are going to allow configurable sds/node sync intervals in near future

Copy link
Member Author

Choose a reason for hiding this comment

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

done

tendrl-bug-id: Tendrl#296
Signed-off-by: Shubhendu <shtripat@redhat.com>
@r0h4n r0h4n merged commit 7f74a00 into Tendrl:develop Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants