mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	bug 10854: get basecopy physical size before destroying VDI, basecopy might be coalesced after destroying VDI
status 10854: resolved fixed
This commit is contained in:
		
							parent
							
								
									66d6125836
								
							
						
					
					
						commit
						d03a396569
					
				| @ -2153,15 +2153,15 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe | |||||||
|             VDI snapshotvdi = tmpl.snapshot(conn, new HashMap<String, String>()); |             VDI snapshotvdi = tmpl.snapshot(conn, new HashMap<String, String>()); | ||||||
|             String snapshotUuid = snapshotvdi.getUuid(conn); |             String snapshotUuid = snapshotvdi.getUuid(conn); | ||||||
|             snapshotvdi.setNameLabel(conn, "Template " + cmd.getName()); |             snapshotvdi.setNameLabel(conn, "Template " + cmd.getName()); | ||||||
|  |             String parentuuid = getVhdParent(conn, pUuid, snapshotUuid, isISCSI); | ||||||
|  |             VDI parent = getVDIbyUuid(conn, parentuuid); | ||||||
|  |             Long phySize = parent.getPhysicalUtilisation(conn); | ||||||
|             tmpl.destroy(conn); |             tmpl.destroy(conn); | ||||||
|             poolsr.scan(conn); |             poolsr.scan(conn); | ||||||
|             try{ |             try{ | ||||||
|                 Thread.sleep(5000); |                 Thread.sleep(5000); | ||||||
|             } catch (Exception e) { |             } catch (Exception e) { | ||||||
|             } |             } | ||||||
|             String parentuuid = getVhdParent(conn, pUuid, snapshotUuid, isISCSI); |  | ||||||
|             VDI parent = getVDIbyUuid(conn, parentuuid); |  | ||||||
|             Long phySize = parent.getPhysicalUtilisation(conn); |  | ||||||
|             return new PrimaryStorageDownloadAnswer(snapshotvdi.getUuid(conn), phySize); |             return new PrimaryStorageDownloadAnswer(snapshotvdi.getUuid(conn), phySize); | ||||||
|         } catch (Exception e) { |         } catch (Exception e) { | ||||||
|             String msg = "Catch Exception " + e.getClass().getName() + " on host:" + _host.uuid + " for template: " |             String msg = "Catch Exception " + e.getClass().getName() + " on host:" + _host.uuid + " for template: " | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user