Browse files

EUCA-3456 euca-describe-nodes does not return consistent results

  • Loading branch information...
1 parent d186b3d commit a5ab3fc90336702c632f6b29d2b71264b0301c6f @mmunn1 mmunn1 committed Feb 28, 2013
Showing with 8 additions and 2 deletions.
  1. +8 −2 clc/modules/cluster-manager/src/main/java/com/eucalyptus/cluster/Cluster.java
View
10 clc/modules/cluster-manager/src/main/java/com/eucalyptus/cluster/Cluster.java
@@ -815,13 +815,19 @@ public void updateNodeInfo( final ArrayList<String> serviceTags ) {
public void updateNodeInfo( final List<NodeType> nodeTags ) {
NodeInfo ret = null;
+ boolean hasServiceTag = false;
for ( final String serviceTag : this.nodeMap.keySet( ) ) {
for ( final NodeType node : nodeTags ) {
- if ( !node.getServiceTag( ).equals( serviceTag ) ) {
- this.nodeMap.remove( serviceTag );
+ if ( node.getServiceTag( ).equals( serviceTag ) ) {
+ hasServiceTag = true;
}
}
+ if( !hasServiceTag ) {
+ this.nodeMap.remove( serviceTag );
+ } else {
+ hasServiceTag = false;
+ }
}
for ( final NodeType node : nodeTags ) {

0 comments on commit a5ab3fc

Please sign in to comment.