-
Notifications
You must be signed in to change notification settings - Fork 77
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
Fixed attach disk before create snapshots and other minor bug #23
base: master
Are you sure you want to change the base?
Conversation
Added a comment in disk option "Sparse" when the disk will be created in iSCSI Storage Domain. Fixed get path in call to get_image_chain
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.
Thanks for the contribution @fmgb. Please send patch to ovirt gerrit.
See https://ovirt.org/develop/dev-process/working-with-gerrit.html
@@ -186,6 +186,7 @@ def create_disk(image_info, disk_id, sd_name, disks_service): | |||
format=types.DiskFormat.RAW, | |||
provisioned_size=provisioned_size, | |||
initial_size=initial_size, | |||
# sparse=False, # In case of iSCSI Storage discomment this. |
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.
sparse=True is valid when using qcow2 format, which is the only format supported
for snapshots.
Only raw=sparse is not supported for block storage domains (FC, iSCSI)
bootable=False, | ||
active=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.
Why is this needed?
) | ||
) | ||
# We waited until OK for it when we created the disk. We wait 5s for security | ||
time.sleep(5) |
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 is sleep needed? how is it relevant for security?
Hi @fmgb, I don't see these changes in our codebase, have they been posted using gerrit, as Ondra has suggesteed? |
@fmgb can you please rebase and solve conflicts? |
When I use this script always I have to execute it twice and attach disk manually. Because the script doesn't attach disk to vm automatically. And when the script tries to create a snapshot, it failed.
Fixed get path in call to get_image_chain
Get path 'disks/' correctly before call get_image_chain.
Added a comment in disk option "Sparse" when the disk will be created in iSCSI Storage Domain.
In iSCSI Storage if the disk is RAW should be Sparse=False.