Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix issue with slow restoring of instances lp:#450915

  • Loading branch information...
commit 505e69596c9f946ec9ed9f9ea3db14823289a7ca 2 parents f0b782e + 19498e2
@grze grze authored
View
5 clc/modules/cluster-manager/src/main/java/edu/ucsb/eucalyptus/cloud/ws/SystemState.java
@@ -308,13 +308,12 @@ private static void restoreInstance( final String cluster, final VmInfo runVm )
launchIndex = Integer.parseInt( runVm.getLaunchIndex( ) );
} catch ( NumberFormatException e ) {}
- //:: TODO: populate these asynchronously... :://
VmImageInfo imgInfo = null;
+//FIXME: really need to populate these asynchronously for multi-cluster/split component...
try {
imgInfo = ( VmImageInfo ) Messaging.send( "vm://ImageResolve", runVm );
} catch ( EucalyptusCloudException e ) {
- imgInfo = new VmImageInfo( runVm.getImageId( ), runVm.getKernelId( ), runVm.getRamdiskId( ), null, null, null,
- null );
+ imgInfo = new VmImageInfo( runVm.getImageId( ), runVm.getKernelId( ), runVm.getRamdiskId( ), null, null, null,null );
}
VmKeyInfo keyInfo = null;
try {
View
11 clc/modules/image-manager/src/main/java/edu/ucsb/eucalyptus/cloud/ws/ImageManager.java
@@ -66,10 +66,13 @@
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
+import com.eucalyptus.bootstrap.Component;
+import com.eucalyptus.config.Configuration;
import com.eucalyptus.images.util.ImageUtil;
import com.eucalyptus.images.util.WalrusUtil;
import com.eucalyptus.util.EntityWrapper;
import com.eucalyptus.util.EucalyptusCloudException;
+import com.eucalyptus.util.NetworkUtil;
import com.eucalyptus.ws.client.ServiceDispatcher;
import edu.ucsb.eucalyptus.cloud.VmAllocationInfo;
@@ -134,8 +137,12 @@ public VmImageInfo resolve( VmInfo vmInfo ) throws EucalyptusCloudException {
db.rollback( );
}
VmImageInfo vmImgInfo = new VmImageInfo( vmInfo.getImageId( ), vmInfo.getKernelId( ), vmInfo.getRamdiskId( ), diskUrl, null, null, productCodes );
- ArrayList<String> ancestorIds = ImageUtil.getAncestors( vmInfo.getOwnerId( ), diskInfo.getImageLocation( ) );
- vmImgInfo.setAncestorIds( ancestorIds );
+ if( Component.walrus.isLocal( ) ) {
+ ArrayList<String> ancestorIds = ImageUtil.getAncestors( vmInfo.getOwnerId( ), diskInfo.getImageLocation( ) );
+ vmImgInfo.setAncestorIds( ancestorIds );
+ } else {//FIXME: handle populating these in a defered way for the remote case.
+ vmImgInfo.setAncestorIds( new ArrayList<String>() );
+ }
return vmImgInfo;
}
Please sign in to comment.
Something went wrong with that request. Please try again.