Uploaded image for project: 'XenServer Org'
  1. XenServer Org
  2. XSO-738

Editing a VDI snapshot breaks the link to its parent

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.1
    • Fix Version/s: 7.3
    • Component/s: API, Storage
    • Labels:
      None

      Description

      Hi lads,

       

      This is a kind of blocker bug: editing a VDI snapshot will remove its "snapshot-of" value. Let me give you a simple example.

       

      First, let's create a VM snapshot:

       

      # xe vm-snapshot uuid=ad87ecf7-0ce8-498f-355f-1ebbdfd55702 new-name-label=test
      d389271f-609b-603c-1dac-5c0e95274505

       

      Let's get its VDIs:

       

       

      # xe snapshot-disk-list uuid=d389271f-609b-603c-1dac-5c0e95274505
      Disk 0 VBD:
      uuid ( RO) : c61b5e80-ebbd-b976-1392-6232a5041f9b
       vm-name-label ( RO): test
       userdevice ( RW): 0
      
      Disk 0 VDI:
      uuid ( RO) : 2956e278-614a-4581-9e51-6a85cf9838ec
       name-label ( RW): root
       sr-name-label ( RO): ZFS SSD
       virtual-size ( RO): 4294967296
      

       

       

      Okay let's check the VDI in detail:

       

       # xe vdi-param-list uuid=2956e278-614a-4581-9e51-6a85cf9838ec
      uuid ( RO) : 2956e278-614a-4581-9e51-6a85cf9838ec
       name-label ( RW): root
       name-description ( RW): root disk
       is-a-snapshot ( RO): true
       snapshot-of ( RO): 928badfe-1f06-4385-8efe-62f53132e8d7
       snapshots ( RO): 
       snapshot-time ( RO): 20170515T09:24:37Z
       allowed-operations (SRO): forget; generate_config; update; resize; destroy; clone; copy; snapshot
       current-operations (SRO): 
       sr-uuid ( RO): e6616eb6-d719-b7a3-95a8-73881b90c25e
       sr-name-label ( RO): ZFS SSD
       vbd-uuids (SRO): c61b5e80-ebbd-b976-1392-6232a5041f9b
       crashdump-uuids (SRO): 
       virtual-size ( RO): 4294967296
       physical-utilisation ( RO): 12800
       location ( RO): 2956e278-614a-4581-9e51-6a85cf9838ec
       type ( RO): User
       sharable ( RO): false
       read-only ( RO): false
       storage-lock ( RO): false
       managed ( RO): true
       parent ( RO) [DEPRECATED]: <not in database>
       missing ( RO): false
       is-tools-iso ( RO): false
       other-config (MRW): 
       xenstore-data (MRO): 
       sm-config (MRO): vhd-parent: a21c8e06-8b5b-4411-9cbe-22698bacf5a1
       on-boot ( RW): persist
       allow-caching ( RW): false
       metadata-latest ( RO): false
       metadata-of-pool ( RO): <not in database>
       tags (SRW):
      

       

      Okay, now, let's edit the description of this VDI:

      # xe vdi-param-set name-description=foobar uuid=2956e278-614a-4581-9e51-6a85cf9838ec

       

      And re-display the VDI details:

      # xe vdi-param-list uuid=2956e278-614a-4581-9e51-6a85cf9838ec
      uuid ( RO) : 2956e278-614a-4581-9e51-6a85cf9838ec
       name-label ( RW): root
       name-description ( RW): foobar
       is-a-snapshot ( RO): true
       snapshot-of ( RO): <not in database>
       snapshots ( RO): 
       snapshot-time ( RO): 20170515T09:24:37Z
       allowed-operations (SRO): forget; generate_config; update; resize; destroy; clone; copy; snapshot
       current-operations (SRO): 
       sr-uuid ( RO): e6616eb6-d719-b7a3-95a8-73881b90c25e
       sr-name-label ( RO): ZFS SSD
       vbd-uuids (SRO): c61b5e80-ebbd-b976-1392-6232a5041f9b
       crashdump-uuids (SRO): 
       virtual-size ( RO): 4294967296
       physical-utilisation ( RO): 12800
       location ( RO): 2956e278-614a-4581-9e51-6a85cf9838ec
       type ( RO): User
       sharable ( RO): false
       read-only ( RO): false
       storage-lock ( RO): false
       managed ( RO): true
       parent ( RO) [DEPRECATED]: <not in database>
       missing ( RO): false
       is-tools-iso ( RO): false
       other-config (MRW): 
       xenstore-data (MRO): 
       sm-config (MRO): vhd-parent: a21c8e06-8b5b-4411-9cbe-22698bacf5a1
       on-boot ( RW): persist
       allow-caching ( RW): false
       metadata-latest ( RO): false
       metadata-of-pool ( RO): <not in database>
       tags (SRW):

       

      As you can see, the snapshot-of field is now missing. In other word, this VDI is not linked anymore to the VM snapshot, and therefore you can't revert it.

        Attachments

          Activity

            People

            • Assignee:
              stephentu Stephen Turner
              Reporter:
              olivierlambert Olivier Lambert
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: