-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix logs mismatch between Network GC wait and interval #10776
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.20
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -3556,7 +3556,8 @@ | |||||
|
||||||
final List<Long> networkIds = _networksDao.findNetworksToGarbageCollect(); | ||||||
final int netGcWait = NumbersUtil.parseInt(_configDao.getValue(NetworkGcWait.key()), 60); | ||||||
logger.info("NetworkGarbageCollector uses '{}' seconds for GC interval.", netGcWait); | ||||||
final int netGcInterval = NumbersUtil.parseInt(_configDao.getValue(NetworkGcInterval.key()), 60); | ||||||
logger.info("NetworkGarbageCollector uses '{}' seconds for GC wait and '{}' seconds for GC interval.", netGcWait, netGcInterval); | ||||||
Check warning on line 3560 in engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
|
||||||
|
||||||
for (final Long networkId : networkIds) { | ||||||
if (!_networkModel.isNetworkReadyForGc(networkId)) { | ||||||
|
@@ -4868,7 +4869,7 @@ | |||||
public static final ConfigKey<Integer> NetworkGcWait = new ConfigKey<Integer>(Integer.class, "network.gc.wait", "Advanced", "600", | ||||||
"Time (in seconds) to wait before shutting down a network that's not in used", false, Scope.Global, null); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
public static final ConfigKey<Integer> NetworkGcInterval = new ConfigKey<Integer>(Integer.class, "network.gc.interval", "Advanced", "600", | ||||||
"Seconds to wait before checking for networks to shutdown", true, Scope.Global, null); | ||||||
"Seconds to wait before checking for networks to shutdown", false, Scope.Global, null); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good 👍 btw: |
||||||
|
||||||
@Override | ||||||
public ConfigKey<?>[] getConfigKeys() { | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the purpose to only log it, why not use the ConfigKey read the value, than use the ConfigDao?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andrijapanicsb ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or even more simple: