[
https://issues.apache.org/jira/browse/CLOUDSTACK-9323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15231176#comment-15231176
]
ASF GitHub Bot commented on CLOUDSTACK-9323:
--------------------------------------------
Github user rafaelweingartner commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1454#discussion_r58952716
--- 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);
- return false;
+ if (vm.getHostId() != null && vm.getHostId() == hostId) {
--- End diff --
Is this conditional right?
`vm.getHostId() != null && vm.getHostId() == hostId`
It is looking a little weird to me.
> 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)