Skip to content

Commit 3ba5c2b

Browse files
andrijapanicsbnvazquezDaanHooglandweizhouapache
authored
Fix logs mismatch between Network GC wait and interval (#10776)
Co-authored-by: nvazquez <nicovazquez90@gmail.com> Co-authored-by: dahn <daan@onecht.net> Co-authored-by: Wei Zhou <weizhou@apache.org>
1 parent 6ba5e08 commit 3ba5c2b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3559,8 +3559,9 @@ public void reallyRun() {
35593559
final HashMap<Long, Long> stillFree = new HashMap<Long, Long>();
35603560

35613561
final List<Long> networkIds = _networksDao.findNetworksToGarbageCollect();
3562-
final int netGcWait = NumbersUtil.parseInt(_configDao.getValue(NetworkGcWait.key()), 60);
3563-
logger.info("NetworkGarbageCollector uses '{}' seconds for GC interval.", netGcWait);
3562+
final int netGcWait = NetworkGcWait.value();
3563+
final int netGcInterval = NetworkGcInterval.value();
3564+
logger.info("NetworkGarbageCollector uses '{}' seconds for GC wait and '{}' seconds for GC interval.", netGcWait, netGcInterval);
35643565

35653566
for (final Long networkId : networkIds) {
35663567
if (!_networkModel.isNetworkReadyForGc(networkId)) {
@@ -4882,9 +4883,9 @@ public String getConfigComponentName() {
48824883
}
48834884

48844885
public static final ConfigKey<Integer> NetworkGcWait = new ConfigKey<Integer>(Integer.class, "network.gc.wait", "Advanced", "600",
4885-
"Time (in seconds) to wait before shutting down a network that's not in used", false, Scope.Global, null);
4886+
"Time (in seconds) to wait before shutting down a network that's not in used", true, Scope.Global, null);
48864887
public static final ConfigKey<Integer> NetworkGcInterval = new ConfigKey<Integer>(Integer.class, "network.gc.interval", "Advanced", "600",
4887-
"Seconds to wait before checking for networks to shutdown", true, Scope.Global, null);
4888+
"Seconds to wait before checking for networks to shutdown", false, Scope.Global, null);
48884889

48894890
@Override
48904891
public ConfigKey<?>[] getConfigKeys() {

0 commit comments

Comments
 (0)