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

During VM import from SD, exclude shared disk when iterating over disk snapshots #905

Merged
merged 2 commits into from
May 6, 2024

Conversation

shubhaOracle
Copy link
Contributor

@shubhaOracle shubhaOracle commented Dec 13, 2023

Changes introduced with this PR

Issue:
When importing VM from SD, if VM has snapshot/s and a shared disk attached, a blank snapshot is created upon import.

Steps to reproduce:

  • Create a shared disk and attach to VM1 and VM2
  • Create a snapshot snap-1 for both VMs respectively
  • Detach the SD that has disks for these VMs
  • Attach the SD and make sure VM1 and VM2 are listed under VM import.
  • Import VM1. You will see a blank snapshot created under 'Snpashots' tab. Pl see screenshot below
  • Import VM2, will fail with error
    - "2023-12-13 18:37:10,426-05 ERROR [org.ovirt.engine.core.bll.exportimport.ImportVmFromConfigurationCommand] (EE-ManagedThreadFactory-engine-Thread-18176) [a75c5669-6676-4d7d-ab3d-aace0d938d5e] Command 'org.ovirt.engine.core.bll.exportimport.ImportVmFromConfigurationCommand' failed: CallableStatementCallback; SQL [{call insertsnapshot(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: duplicate key value violates unique constraint "pk_snapshots""

The issue happens since shared disk is considered as snapshot the during import and entry is added to the snapshots table


image


Are you the owner of the code you are sending in, or do you have permission of the owner?

[y/n] n

Signed-off-by: Shubha Kulkarni shubha.kulkarni@oracle.com

…k snapshots. Signed-off-by: Shubha Kulkarni shubha.kulkarni@oracle.com

Signed-off-by: ShubhaOracle <Shubha.kulkarni@oracle.com>
@shubhaOracle
Copy link
Contributor Author

Requesting Reviews

@shubhaOracle
Copy link
Contributor Author

Requesting Reviews/Approval

1 similar comment
@shubhaOracle
Copy link
Contributor Author

Requesting Reviews/Approval

@sandrobonazzola
Copy link
Member

Merging based on previous approval

@sandrobonazzola sandrobonazzola merged commit 0a1ba82 into oVirt:master May 6, 2024
3 checks passed
@sandrobonazzola sandrobonazzola added this to the ovirt-4.5.7 milestone Oct 4, 2024
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.

3 participants