The following tree is imported from glance:
{code}
May 8 13:41:10 localhost SMGC: [14336] *814ea7ed(40.000M/40.079M)
May 8 13:41:10 localhost SMGC: [14336] *863cc348(40.000M/2.008M)
May 8 13:41:10 localhost SMGC: [14336] eccebf0b(40.000M/2.008M)
{code}
If we immediately try to perform an operation that uses a snapshot (e.g. resize), we get the 'original' parent as 863cc348:
{code}
2014-05-08 13:41:23.769 DEBUG nova.virt.xenapi.vm_utils [req-62887aaa-cd8a-43d1-841a-bd1c144a0155 ServerDiskConfigTestJSON-620298595 ServerDiskConfigTestJSON-1956337666] VHD eccebf0b-00b9-4df5-b558-8feaf835e850 has parent 863cc348-7a28-4dd0-a976-142eb887256c from (pid=19364) _get_vhd_parent_uuid /opt/stack/nova/nova/virt/xenapi/vm_utils.py:2026
{code}
We then take a snapshot and wait for coalesce so we have as few VHDs in the chain as possible:
{code}
May 8 13:41:24 localhost SM: [24744] ['/usr/sbin/td-util', 'snapshot', 'vhd', '/var/run/sr-mount/16e0a27c-007c-d083-7459-ee038c92f8a4/eccebf0b-00b9-4df5-b558-8feaf835e850.vhd', '151c921e-dc28-4a66-b286-65cd43bf9a6f.vhd']
2014-05-08 13:41:26.688 DEBUG nova.virt.xenapi.vm_utils [req-62887aaa-cd8a-43d1-841a-bd1c144a0155 ServerDiskConfigTestJSON-620298595 ServerDiskConfigTestJSON-1956337666] VHD eccebf0b-00b9-4df5-b558-8feaf835e850 has parent 151c921e-dc28-4a66-b286-65cd43bf9a6f from (pid=19364) _get_vhd_parent_uuid /opt/stack/nova/nova/virt/xenapi/vm_utils.py:2026
2014-05-08 13:41:26.688 DEBUG nova.virt.xenapi.vm_utils [req-62887aaa-cd8a-43d1-841a-bd1c144a0155 ServerDiskConfigTestJSON-620298595 ServerDiskConfigTestJSON-1956337666] [instance: 7f8db936-9634-47db-852e-7a43bbc992eb] Parent 151c921e-dc28-4a66-b286-65cd43bf9a6f doesn't match original parent 863cc348-7a28-4dd0-a976-142eb887256c, waiting for coalesce... from (pid=19364) _wait_for_vhd_coalesce /opt/stack/nova/nova/virt/xenapi/vm_utils.py:2119
{code}
The snapshot has the effect of creating two children (ecce is the one we're referencing and b554 keeps the snapshot 151c from being deleted:
{code}
May 8 13:41:34 localhost SMGC: [14336] *814ea7ed(40.000M/40.079M)
May 8 13:41:34 localhost SMGC: [14336] *863cc348(40.000M/2.008M)
May 8 13:41:34 localhost SMGC: [14336] *151c921e(40.000M/14.032M)
May 8 13:41:34 localhost SMGC: [14336] b55436a7(40.000M/5.000K)
May 8 13:41:34 localhost SMGC: [14336] eccebf0b(40.000M/4.012M)
{code}
Coalescing then happens, destroying first 863cc348 then 151c921, merging the differences up the chain into 814ea7ed:
{code}
May 8 13:41:59 localhost SMGC: [14336] *814ea7ed(40.000M/40.079M)
May 8 13:41:59 localhost SMGC: [14336] *863cc348(40.000M/2.008M)
May 8 13:41:59 localhost SMGC: [14336] *151c921e(40.000M/14.032M)
May 8 13:41:59 localhost SMGC: [14336] b55436a7(40.000M/5.000K)
May 8 13:41:59 localhost SMGC: [14336] eccebf0b(40.000M/16.036M)
May 8 13:42:11 localhost SMGC: [14336] *814ea7ed(40.000M/40.079M)
May 8 13:42:11 localhost SMGC: [14336] *151c921e(40.000M/14.032M)
May 8 13:42:11 localhost SMGC: [14336] b55436a7(40.000M/5.000K)
May 8 13:42:11 localhost SMGC: [14336] eccebf0b(40.000M/16.036M)
May 8 13:42:36 localhost SMGC: [5186] *814ea7ed(40.000M/40.079M)
May 8 13:42:36 localhost SMGC: [5186] b55436a7(40.000M/5.000K)
May 8 13:42:36 localhost SMGC: [5186] eccebf0b(40.000M/16.036M)
{code}
During this time, we're waiting for coalesce and checking the parent. Eventually we get:
{code}
2014-05-08 13:42:41.981 DEBUG nova.virt.xenapi.vm_utils [req-62887aaa-cd8a-43d1-841a-bd1c144a0155 ServerDiskConfigTestJSON-620298595 ServerDiskConfigTestJSON-1956337666] VHD eccebf0b-00b9-4df5-b558-8feaf835e850 has parent 814ea7ed-4b99-44cc-8e89-1a8d2e5509bd from (pid=19364) _get_vhd_parent_uuid /opt/stack/nova/nova/virt/xenapi/vm_utils.py:2026
2014-05-08 13:42:41.982 DEBUG nova.virt.xenapi.vm_utils [req-62887aaa-cd8a-43d1-841a-bd1c144a0155 ServerDiskConfigTestJSON-620298595 ServerDiskConfigTestJSON-1956337666] [instance: 7f8db936-9634-47db-852e-7a43bbc992eb] Parent 814ea7ed-4b99-44cc-8e89-1a8d2e5509bd doesn't match original parent 863cc348-7a28-4dd0-a976-142eb887256c, waiting for coalesce... from (pid=19364) _wait_for_vhd_coalesce /opt/stack/nova/nova/virt/xenapi/vm_utils.py:2119
The following tree is imported from glance: 40.000M/ 40.079M) 40.000M/ 2.008M) 40.000M/ 2.008M)
{code}
May 8 13:41:10 localhost SMGC: [14336] *814ea7ed(
May 8 13:41:10 localhost SMGC: [14336] *863cc348(
May 8 13:41:10 localhost SMGC: [14336] eccebf0b(
{code}
If we immediately try to perform an operation that uses a snapshot (e.g. resize), we get the 'original' parent as 863cc348: xenapi. vm_utils [req-62887aaa- cd8a-43d1- 841a-bd1c144a01 55 ServerDiskConfi gTestJSON- 620298595 ServerDiskConfi gTestJSON- 1956337666] VHD eccebf0b- 00b9-4df5- b558-8feaf835e8 50 has parent 863cc348- 7a28-4dd0- a976-142eb88725 6c from (pid=19364) _get_vhd_ parent_ uuid /opt/stack/ nova/nova/ virt/xenapi/ vm_utils. py:2026
{code}
2014-05-08 13:41:23.769 DEBUG nova.virt.
{code}
We then take a snapshot and wait for coalesce so we have as few VHDs in the chain as possible: sbin/td- util', 'snapshot', 'vhd', '/var/run/ sr-mount/ 16e0a27c- 007c-d083- 7459-ee038c92f8 a4/eccebf0b- 00b9-4df5- b558-8feaf835e8 50.vhd' , '151c921e- dc28-4a66- b286-65cd43bf9a 6f.vhd' ] xenapi. vm_utils [req-62887aaa- cd8a-43d1- 841a-bd1c144a01 55 ServerDiskConfi gTestJSON- 620298595 ServerDiskConfi gTestJSON- 1956337666] VHD eccebf0b- 00b9-4df5- b558-8feaf835e8 50 has parent 151c921e- dc28-4a66- b286-65cd43bf9a 6f from (pid=19364) _get_vhd_ parent_ uuid /opt/stack/ nova/nova/ virt/xenapi/ vm_utils. py:2026 xenapi. vm_utils [req-62887aaa- cd8a-43d1- 841a-bd1c144a01 55 ServerDiskConfi gTestJSON- 620298595 ServerDiskConfi gTestJSON- 1956337666] [instance: 7f8db936- 9634-47db- 852e-7a43bbc992 eb] Parent 151c921e- dc28-4a66- b286-65cd43bf9a 6f doesn't match original parent 863cc348- 7a28-4dd0- a976-142eb88725 6c, waiting for coalesce... from (pid=19364) _wait_for_ vhd_coalesce /opt/stack/ nova/nova/ virt/xenapi/ vm_utils. py:2119
{code}
May 8 13:41:24 localhost SM: [24744] ['/usr/
2014-05-08 13:41:26.688 DEBUG nova.virt.
2014-05-08 13:41:26.688 DEBUG nova.virt.
{code}
The snapshot has the effect of creating two children (ecce is the one we're referencing and b554 keeps the snapshot 151c from being deleted: 40.000M/ 40.079M) 40.000M/ 2.008M) 40.000M/ 14.032M) 40.000M/ 5.000K) 40.000M/ 4.012M)
{code}
May 8 13:41:34 localhost SMGC: [14336] *814ea7ed(
May 8 13:41:34 localhost SMGC: [14336] *863cc348(
May 8 13:41:34 localhost SMGC: [14336] *151c921e(
May 8 13:41:34 localhost SMGC: [14336] b55436a7(
May 8 13:41:34 localhost SMGC: [14336] eccebf0b(
{code}
Coalescing then happens, destroying first 863cc348 then 151c921, merging the differences up the chain into 814ea7ed: 40.000M/ 40.079M) 40.000M/ 2.008M) 40.000M/ 14.032M) 40.000M/ 5.000K) 40.000M/ 16.036M)
{code}
May 8 13:41:59 localhost SMGC: [14336] *814ea7ed(
May 8 13:41:59 localhost SMGC: [14336] *863cc348(
May 8 13:41:59 localhost SMGC: [14336] *151c921e(
May 8 13:41:59 localhost SMGC: [14336] b55436a7(
May 8 13:41:59 localhost SMGC: [14336] eccebf0b(
May 8 13:42:11 localhost SMGC: [14336] *814ea7ed( 40.000M/ 40.079M) 40.000M/ 14.032M) 40.000M/ 5.000K) 40.000M/ 16.036M)
May 8 13:42:11 localhost SMGC: [14336] *151c921e(
May 8 13:42:11 localhost SMGC: [14336] b55436a7(
May 8 13:42:11 localhost SMGC: [14336] eccebf0b(
May 8 13:42:36 localhost SMGC: [5186] *814ea7ed( 40.000M/ 40.079M) 40.000M/ 5.000K) 40.000M/ 16.036M)
May 8 13:42:36 localhost SMGC: [5186] b55436a7(
May 8 13:42:36 localhost SMGC: [5186] eccebf0b(
{code}
During this time, we're waiting for coalesce and checking the parent. Eventually we get: xenapi. vm_utils [req-62887aaa- cd8a-43d1- 841a-bd1c144a01 55 ServerDiskConfi gTestJSON- 620298595 ServerDiskConfi gTestJSON- 1956337666] VHD eccebf0b- 00b9-4df5- b558-8feaf835e8 50 has parent 814ea7ed- 4b99-44cc- 8e89-1a8d2e5509 bd from (pid=19364) _get_vhd_ parent_ uuid /opt/stack/ nova/nova/ virt/xenapi/ vm_utils. py:2026 xenapi. vm_utils [req-62887aaa- cd8a-43d1- 841a-bd1c144a01 55 ServerDiskConfi gTestJSON- 620298595 ServerDiskConfi gTestJSON- 1956337666] [instance: 7f8db936- 9634-47db- 852e-7a43bbc992 eb] Parent 814ea7ed- 4b99-44cc- 8e89-1a8d2e5509 bd doesn't match original parent 863cc348- 7a28-4dd0- a976-142eb88725 6c, waiting for coalesce... from (pid=19364) _wait_for_ vhd_coalesce /opt/stack/ nova/nova/ virt/xenapi/ vm_utils. py:2119
{code}
2014-05-08 13:42:41.981 DEBUG nova.virt.
2014-05-08 13:42:41.982 DEBUG nova.virt.
...
2014-05-08 13:44:00.678 ERROR nova.virt. xenapi. vmops [req-62887aaa- cd8a-43d1- 841a-bd1c144a01 55 ServerDiskConfi gTestJSON- 620298595 ServerDiskConfi gTestJSON- 1956337666] [instance: 7f8db936- 9634-47db- 852e-7a43bbc992 eb] _migrate_ disk_resizing_ up failed. Restoring orig vm due_to: VHD coalesce attempts exceeded (20), giving up....
{code}