Skip to content

Commit 023ca4c

Browse files
fixes
1 parent acca000 commit 023ca4c

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,7 @@ protected AgentAttache notifyMonitorsOfConnection(final AgentAttache attache, fi
675675
public boolean start() {
676676
ManagementServerHostVO msHost = _mshostDao.findByMsid(_nodeId);
677677
if (msHost != null && (ManagementServerHost.State.Maintenance.equals(msHost.getState()) || ManagementServerHost.State.PreparingForMaintenance.equals(msHost.getState()))) {
678+
_monitorExecutor.shutdownNow();
678679
return true;
679680
}
680681

engine/orchestration/src/main/java/com/cloud/agent/manager/ClusteredAgentManagerImpl.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,13 @@ public boolean start() {
184184
_timer.schedule(new DirectAgentScanTimerTask(), STARTUP_DELAY, ScanInterval.value());
185185
logger.debug("Scheduled direct agent scan task to run at an interval of {} seconds", ScanInterval.value());
186186

187+
ManagementServerHostVO msHost = _mshostDao.findByMsid(_nodeId);
188+
if (msHost != null && (ManagementServerHost.State.Maintenance.equals(msHost.getState()) || ManagementServerHost.State.PreparingForMaintenance.equals(msHost.getState()))) {
189+
s_transferExecutor.shutdownNow();
190+
cleanupTransferMap(_nodeId);
191+
return true;
192+
}
193+
187194
// Schedule tasks for agent rebalancing
188195
if (isAgentRebalanceEnabled()) {
189196
cleanupTransferMap(_nodeId);

ui/src/components/page/GlobalLayout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
<!-- layout header -->
8888
<a-affix style="z-index: 100">
8989
<global-header
90-
:style="this.$store.getters.shutdownTriggered ? 'margin-top: 25px;' : null"
90+
:style="this.$store.getters.maintenanceInitiated || this.$store.getters.shutdownTriggered ? 'margin-top: 25px;' : null"
9191
:mode="layoutMode"
9292
:menus="menus"
9393
:theme="navTheme"

0 commit comments

Comments
 (0)