Permalink
Browse files

fix vm instance issue

  • Loading branch information...
1 parent b013a00 commit 7b680f53dd3f206133a2d51e8985a991446b683e grze@eucalyptus.com committed Oct 15, 2011
@@ -170,7 +170,7 @@
public static RunInstancesResponseType runInstances( RunInstancesType request ) throws MetadataException, AuthException {
Allocation allocInfo = Allocations.begin( request );
try {
- Predicates.and( VerifyMetadata.get( ), AdmissionControl.get( ), ClusterAllocator.get( ) ).apply( allocInfo );
+ Predicates.and( VerifyMetadata.get( ), AdmissionControl.get( ) ).apply( allocInfo );
} catch ( Exception ex1 ) {
LOG.trace( ex1, ex1 );
}
@@ -192,6 +192,7 @@ public String apply( NetworkGroup arg0 ) {
reservation.getInstancesSet( ).add( VmInstances.transform( entity ) );
}
db.commit( );
+ ClusterAllocator.get( ).apply( allocInfo );
} catch ( Exception ex ) {
Logs.exhaust( ).error( ex, ex );
db.rollback( );
@@ -24,7 +24,7 @@
@SuppressWarnings( "unchecked" )
public class PersistenceContexts {
- public static int MAX_FAIL = 5;
+ private static int MAX_FAIL = 5;
private static AtomicInteger failCount = new AtomicInteger( 0 );
private static Logger LOG = Logger.getLogger( PersistenceContexts.class );
private static final ArrayListMultimap<String, Class> entities = ArrayListMultimap.create( );

0 comments on commit 7b680f5

Please sign in to comment.