[
https://issues.apache.org/jira/browse/CLOUDSTACK-9323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15217353#comment-15217353
]
ASF GitHub Bot commented on CLOUDSTACK-9323:
--------------------------------------------
Github user abhinandanprateek commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1454#discussion_r57835178
--- Diff: server/src/com/cloud/resource/ResourceManagerImpl.java ---
@@ -2112,11 +2112,13 @@ private boolean doCancelMaintenance(final long
hostId) {
/* TODO: move to listener */
_haMgr.cancelScheduledMigrations(host);
+
+ boolean vms_migrating = false;
final List<VMInstanceVO> vms = _haMgr.findTakenMigrationWork();
for (final VMInstanceVO vm : vms) {
if (vm != null && vm.getHostId() != null && vm.getHostId() ==
hostId) {
s_logger.info("Unable to cancel migration because the vm
is being migrated: " + vm);
--- End diff --
@alexandrelimassantana
The reason for not breaking from the for loop is to log info about vms that
are under migration. Probably the log level should be increased to warn. These
log messages would be valuable for trouble shooting.
On readability front yes the code will be improved further.
> Cancelling host maintenance results in ""Internal error cancelling
> maintenance.”
> --------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-9323
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9323
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Reporter: Abhinandan Prateek
> Assignee: Abhinandan Prateek
> Fix For: Future
>
>
> When we try to cancel the host from maintenance, all the hosts are
> complaining ""Internal error cancelling maintenance.” but successfully
> enabling the host back.
> In both scenarios like host is in up or disconnected state.
> This causes problem when we programmatically cancel maintenance….
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)