diff --git a/plugins/api/discovery/src/main/java/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java b/plugins/api/discovery/src/main/java/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java index c16d1b23324..5d2285629d6 100644 --- a/plugins/api/discovery/src/main/java/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java +++ b/plugins/api/discovery/src/main/java/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java @@ -20,6 +20,7 @@ import java.lang.reflect.Field; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -67,7 +68,7 @@ public class ApiDiscoveryServiceImpl extends ComponentLifecycleBase implements A if (s_apiNameDiscoveryResponseMap == null) { long startTime = System.nanoTime(); s_apiNameDiscoveryResponseMap = new HashMap(); - Set> cmdClasses = new HashSet>(); + Set> cmdClasses = new LinkedHashSet>(); for (PluggableService service : _services) { s_logger.debug(String.format("getting api commands of service: %s", service.getClass().getName())); cmdClasses.addAll(service.getCommands()); diff --git a/systemvm/debian/opt/cloud/bin/vr_cfg.sh b/systemvm/debian/opt/cloud/bin/vr_cfg.sh index 619ec5c4483..8447947bd3b 100755 --- a/systemvm/debian/opt/cloud/bin/vr_cfg.sh +++ b/systemvm/debian/opt/cloud/bin/vr_cfg.sh @@ -33,7 +33,7 @@ while getopts 'c:' OPTION; do esac; done export DEFER_CONFIG=true -while read line; do +cat $cfg | while read line; do #comment if [[ $line == \#* ]]; then continue @@ -74,7 +74,7 @@ while read line; do fi -done < $cfg +done # archive the configuration file mv $cfg /var/cache/cloud/processed/