cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CLOUDSTACK-10305) Rare race condition in KVM migration
Date Mon, 26 Feb 2018 14:33:00 GMT

    [ https://issues.apache.org/jira/browse/CLOUDSTACK-10305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16376957#comment-16376957
] 

ASF subversion and git services commented on CLOUDSTACK-10305:
--------------------------------------------------------------

Commit 703054964a9bae27a563412c35166bae515d10e3 in cloudstack's branch refs/heads/master from
[~nicolas.vazquez]
[ https://gitbox.apache.org/repos/asf?p=cloudstack.git;h=7030549 ]

CLOUDSTACK-10305: Rare race condition in KVM migration (#2466)

There is a race condition in the monitoring of the migration process on KVM. If the monitor
wakes up in the tight window after the migration succeeds, but before the migration thread
terminates, the monitor will get a LibvirtException “Domain not found: no domain with matching
uuid” when checking on the migration status. This in turn causes CloudStack to sync the
VM state to stop, in which it issues a defensive StopCommand to ensure it is correctly synced.

Fix: Prevent LibvirtException: "Domain not found" caused by the call to dm.getInfo()

> Rare race condition in KVM migration
> ------------------------------------
>
>                 Key: CLOUDSTACK-10305
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10305
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>            Reporter: Nicolas Vazquez
>            Priority: Major
>             Fix For: 4.11.1.0
>
>
> There is a race condition in the monitoring of the migration process on KVM. If the monitor
wakes up in the tight window after the migration succeeds, but before the migration thread
terminates, the monitor will get a LibvirtException “Domain not found: no domain with matching
uuid” when checking on the migration status. This in turn causes CloudStack to sync the
VM state to stop, in which it issues a defensive StopCommand to ensure it is correctly synced.
> This is issue is reported under these conditions:
>  * VM migration has physically finished
>  * Migration thread executor is still not marked as terminated
> From the migration monitoring process, as VM has been migrated, that domain cannot be
found (we should get the destination domain from the migration thread later) and the LibvirtException
is thrown: {{LibvirtException “Domain not found: no domain with matching uuid”}}.
> So basically the idea is just logging the issue but not suspending the VM as the migration
has already been performed, but the migration thread is not marked as finished. Once the migrarion
thread is marked as finished, the migration monitoring process (while loop) ends and the migration
command wrapper would continue its execution.
> Regarding your last question, we won't need to suspend the VM in this case as the migration
has already been performed. VM suspension will take place whenever the migration is in progress
and those conditions are met



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message