Skip to content

Commit

Permalink
Merge branch 'testing' of git.eucalyptus-systems.com:eucalyptus into …
Browse files Browse the repository at this point in the history
…testing
  • Loading branch information
dmitrii committed May 23, 2012
2 parents 772f768 + a89bcbb commit 636e4a0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
Expand Up @@ -305,7 +305,7 @@ ExtantNetwork getExtantNetwork( ) {
return this.extantNetwork;
}

private void setExtantNetwork( final ExtantNetwork extantNetwork ) {
void setExtantNetwork( final ExtantNetwork extantNetwork ) {
this.extantNetwork = extantNetwork;
}

Expand Down
Expand Up @@ -258,6 +258,23 @@ public void fire( final ClusterConfiguration input ) {
Logs.extreme( ).error( ex, ex );
}
netConfig.setUseNetworkTags( netTagging.get( ) );
final EntityTransaction db = Entities.get( NetworkGroup.class );
try {
final List<NetworkGroup> ret = Entities.query( new NetworkGroup( ) );
for ( NetworkGroup group : ret ) {
ExtantNetwork exNet = group.getExtantNetwork( );
if ( exNet != null && ( exNet.getTag( ) > netConfig.getMaxNetworkTag( ) || exNet.getTag( ) < netConfig.getMinNetworkTag( ) ) ) {
exNet.teardown( );
Entities.delete( exNet );
group.setExtantNetwork( null );
}
}
db.commit( );
} catch ( final Exception ex ) {
Logs.extreme( ).error( ex, ex );
LOG.error( ex );
db.rollback( );
}
}

public static List<Long> networkIndexInterval( ) {
Expand All @@ -276,7 +293,7 @@ public static List<Integer> networkTagInterval( ) {
return interval;
}

public static NetworkRangeConfiguration networkingConfiguration( ) {
public static synchronized NetworkRangeConfiguration networkingConfiguration( ) {
return netConfig;
}

Expand Down

0 comments on commit 636e4a0

Please sign in to comment.