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

Fixed attach disk before create snapshots and other minor bug #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fmgb
Copy link

@fmgb fmgb commented Feb 10, 2020

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.

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
@machacekondra
Copy link
Contributor

Hello @fmgb. Thank you very much for your contribution. This project don't use github a tool for contribution, but it's just a mirror for the gerrit project. Could you please send the patch via gerrit? Here is a documentation how to work with gerrit. Thank you.

cc @oliel

Copy link
Member

@nirs nirs left a 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.
Copy link
Member

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

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

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?

@oliel
Copy link
Contributor

oliel commented Apr 26, 2021

Hi @fmgb, I don't see these changes in our codebase, have they been posted using gerrit, as Ondra has suggesteed?

@sandrobonazzola
Copy link
Member

@fmgb can you please rebase and solve conflicts?

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.

6 participants