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

Support URL in ovirt_imageio.client.extents() #175

Open
nirs opened this issue Feb 11, 2023 · 1 comment
Open

Support URL in ovirt_imageio.client.extents() #175

nirs opened this issue Feb 11, 2023 · 1 comment
Labels
enhancement Enhancing the system by adding new feature or improving performance or reliability

Comments

@nirs
Copy link
Member

nirs commented Feb 11, 2023

ovirt_imageio.client.extents() works only with filename, reporting extents in local
files.

This would be useful for debugging backups using scripts like backup_vm.py:
https://github.com/oVirt/python-ovirt-engine-sdk4/blob/main/examples/backup_vm.py

Example flow:

  1. Backup tool adds --dry-run option or --dump-extents
  2. Backup tool starts a backup
  3. Backup tool dump extents using client.extents
  4. Backup tool performs a backup or stop the backup

Possible solution

  1. Support both URL ("https://...", "file:///filename") and filename ("filename") in the filename argument.
  2. Parse the URL - should work for both filename and URL, if not normalize the filename to file: URL
  3. Instead of _open_nbd, use _open_http for http url, or open_nbd for file: url.

This code can be used later by client.upload() to support upload from URL (qemu-nbd already supports this). More work is required for upload from URL like setting timeouts.

@nirs nirs added the enhancement Enhancing the system by adding new feature or improving performance or reliability label Feb 11, 2023
@nirs
Copy link
Member Author

nirs commented Feb 11, 2023

@dupondje, maybe you would like to work on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancing the system by adding new feature or improving performance or reliability
Projects
None yet
Development

No branches or pull requests

1 participant