Permalink
Browse files

Merge branch 'dev/grze/EUCA-4175' into testing

Conflicts:
	clc/modules/cluster-manager/src/main/java/com/eucalyptus/vm/VmInstances.java
  • Loading branch information...
2 parents 2282207 + 70a1d44 commit 80ca943210ece2fc4045fa44f3bb0718e86de13d @grze grze committed Feb 24, 2013
@@ -97,8 +97,6 @@
public class VmStateCallback extends StateUpdateMessageCallback<Cluster, VmDescribeType, VmDescribeResponseType> {
private static Logger LOG = Logger.getLogger( VmStateCallback.class );
- private static final int VM_INITIAL_REPORT_TIMEOUT = 300000;
- private static final int VM_STATE_SETTLE_TIME = 20000;
private final Supplier<Set<String>> initialInstances;
public VmStateCallback( ) {
@@ -184,7 +182,7 @@ private static void handleUnreported( final String vmId ) {
final EntityTransaction db1 = Entities.get( VmInstance.class );
try {
VmInstance vm = VmInstances.cachedLookup( vmId );
- if ( VmState.PENDING.apply( vm ) && vm.lastUpdateMillis( ) < VM_INITIAL_REPORT_TIMEOUT ) {
+ if ( VmState.PENDING.apply( vm ) && vm.lastUpdateMillis( ) < ( VmInstances.VM_INITIAL_REPORT_TIMEOUT * 1000 ) ) {
//do nothing during first VM_INITIAL_REPORT_TIMEOUT millis of instance life
return;
} else if ( vm.isBlockStorage( ) && VmInstances.Timeout.UNREPORTED.apply( vm ) ) {
@@ -301,7 +299,7 @@ private static void handleReportedTeardown( VmInstance vm, final VmInfo runVm )
VmInstances.terminated( vm );
} else if ( VmState.STOPPING.apply( vm ) ) {
VmInstances.stopped( vm );
- } else if ( VmStateSet.RUN.apply( vm ) && vm.getSplitTime( ) > VM_STATE_SETTLE_TIME ) {
+ } else if ( VmStateSet.RUN.apply( vm ) && vm.getSplitTime( ) > ( VmInstances.VM_STATE_SETTLE_TIME * 1000 ) ) {
if ( vm.isBlockStorage( ) ) {
VmInstances.stopped( vm );
} else {
@@ -315,7 +313,7 @@ private static void handleReportedTeardown( VmInstance vm, final VmInfo runVm )
@Override
public boolean apply( VmInstance input ) {
- return input.getCreationSplitTime( ) > VM_STATE_SETTLE_TIME;
+ return input.getCreationSplitTime( ) > ( VmInstances.VM_STATE_SETTLE_TIME * 1000 );
}
};
}
@@ -272,6 +272,12 @@ protected boolean inState( final VmState state ) {
@ConfigurableField( description = "Amount of time (in minutes) before a EBS volume backing the instance is created",
initial = "30" )
public static Integer EBS_VOLUME_CREATION_TIMEOUT = 30;
+ @ConfigurableField( description = "Amount of time (in seconds) to let instance state settle after a transition to either stopping or shutting-down.",
+ initial = "40" )
+ public static Integer VM_STATE_SETTLE_TIME = 40;
+ @ConfigurableField( description = "Amount of time (in seconds) since completion of the creating run instance operation that the new instance is treated as unreported if not... reported.",
+ initial = "300" )
+ public static Integer VM_INITIAL_REPORT_TIMEOUT = 300;
public static class SubdomainListener implements PropertyChangeListener {
@Override

0 comments on commit 80ca943

Please sign in to comment.