-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Migrate vm across clusters #4534
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
Migrate vm across clusters #4534
Conversation
DaanHoogland
left a comment
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.
thanks for taking this forward @weizhouapache . I have my usual style complaints but looks good otherwise. I asume you are already running this in your env, I wonder if the functional reqs on this in thers envs are met but that is for them to asure. (no tests done)
| DeployDestination dest = null; | ||
| if (destinationHost == null) { | ||
| vm.setLastHostId(null); // Do not check last host | ||
| final VirtualMachineProfile profile = new VirtualMachineProfileImpl(vm); | ||
| final Host host = _hostDao.findById(srcHostId); | ||
| final DataCenterDeployment plan = new DataCenterDeployment(host.getDataCenterId(), null, null, null, null, null); | ||
| ExcludeList excludes = new ExcludeList(); | ||
| excludes.addHost(srcHostId); | ||
| try { | ||
| dest = _planningMgr.planDeployment(profile, plan, excludes, null); | ||
| } catch (final AffinityConflictException e2) { | ||
| s_logger.warn("Unable to create deployment, affinity rules associted to the VM conflict", e2); | ||
| throw new CloudRuntimeException("Unable to create deployment, affinity rules associted to the VM conflict"); | ||
| } catch (final InsufficientServerCapacityException e3) { | ||
| throw new CloudRuntimeException("Unable to find a server to migrate the vm to"); | ||
| } | ||
| } else { | ||
| dest = checkVmMigrationDestination(vm, srcHostId, destinationHost); | ||
| } | ||
|
|
||
| // If no suitable destination found then throw exception | ||
| if (dest == null) { | ||
| throw new RuntimeException("Unable to find suitable destination to migrate VM " + vm.getInstanceName()); | ||
| } | ||
|
|
||
| UserVmVO uservm = _vmDao.findById(vmId); | ||
| if (uservm != null) { | ||
| collectVmDiskStatistics(uservm); | ||
| collectVmNetworkStatistics(uservm); | ||
| } | ||
| _itMgr.migrate(vm.getUuid(), srcHostId, dest); | ||
| VMInstanceVO vmInstance = _vmInstanceDao.findById(vmId); | ||
| if (vmInstance.getType().equals(VirtualMachine.Type.User)) { | ||
| return _vmDao.findById(vmId); | ||
| } else { | ||
| return vmInstance; | ||
| } |
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.
I know i sound like a broken record , but I see four methods here. Can you extract these pieces of code please?
| // If no suitable destination found then throw exception | ||
| if (dest == null) { | ||
| throw new RuntimeException("Unable to find suitable destination to migrate VM " + vm.getInstanceName()); | ||
| throw new CloudRuntimeException("Unable to find suitable destination to migrate VM " + vm.getInstanceName()); |
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.
👍
| if (hosts == null || hosts.isEmpty()) { | ||
| s_logger.warn("Unable to find a host for vm migration in cluster: " + host.getClusterId()); | ||
| if (MIGRATE_VM_ACROSS_CLUSTERS.value()) { | ||
| s_logger.info("Looking for hosts across different clusters in zone: " + host.getDataCenterId()); | ||
| hosts = listAllUpAndEnabledHosts(Host.Type.Routing, null, null, host.getDataCenterId()); | ||
| if (hosts == null || hosts.isEmpty()) { | ||
| s_logger.warn("Unable to find a host for vm migration in zone: " + host.getDataCenterId()); | ||
| return false; | ||
| } | ||
| // Dont migrate vm if it has volumes on cluster-wide pool | ||
| for (final VMInstanceVO vm : vms) { | ||
| if (_vmMgr.checkIfVmHasClusterWideVolumes(vm.getId())) { | ||
| s_logger.warn("Unable to migrate vm " + vm.getInstanceName() + " as it has volumes on cluster-wide pool"); | ||
| return false; | ||
| } | ||
| } | ||
| } else { | ||
| s_logger.warn("Not migrating VM across cluster since " + MIGRATE_VM_ACROSS_CLUSTERS.key() + " is false"); | ||
| return false; | ||
| } | ||
| } |
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.
sugestion:
if (! clusterWideMigrationSupported(...)) return false;
and extract this code to
boolean clusterWideMigrationSupported(...)
engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java
Outdated
Show resolved
Hide resolved
|
@blueorangutan package @weizhouapache is this ready for review/test? |
|
@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔centos8 ✔debian. JID-2513 |
…ed by dedicated resources.
|
@ustcweizhou I guess this will need changes in new UI now |
|
Based on branch name marked for 4.15.1.0 |
@shwstppr it is addressed in this pr. if vm has volumes on cluster-wide storage, migrate will fail. |
…ed by dedicated resources.
d4773f5 to
2bfeed0
Compare
|
@DaanHoogland made some changes as your comments. |
|
@weizhouapache sorry but this needs fixing conflicts again. |
ce44bc7 to
a54284c
Compare
|
Re-ping @shwstppr for review |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos7 ✔centos8 ✖debian. JID-2749 |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
1 similar comment
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos7 ✔centos8 ✔debian. JID-2764 |
…pools is supported by vmware vmotion
…n same pod to avoid potential network errors.
|
@shwstppr thanks for review and testing ! as per your comments, I have changed this pr by 5 commits. fix #4534: an error in 'git merge' |
|
@blueorangutan package |
|
@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1136 |
|
@blueorangutan test |
|
@weizhouapache a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian Build Failed (tid-1969) |
|
@blueorangutan test |
shwstppr
left a comment
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.
LGTM. Tested with KVM and VMware environments. Both having 2x clusters with one host each.
KVM env had a zone-wide pool while VMware env only had cluster-wide pools. Logs from VMware env testing below:
Clusters:
(localcloud) SBCM5> > list clusters filter=id,name,podname
{
"cluster": [
{
"id": "3d79b022-0fd9-4f51-805d-ef71bef562c5",
"name": "p1-c1",
"podname": "Pod1"
},
{
"id": "a5b2a7b8-f897-4d5f-889f-a9f1321e7c2b",
"name": "10.0.35.234/Trillian/p1-c2",
"podname": "Pod1"
}
],
"count": 2
}
Hosts:
(localcloud) SBCM5> > list hosts type=Routing filter=id,name,clusterid,clustername
{
"count": 2,
"host": [
{
"clusterid": "a5b2a7b8-f897-4d5f-889f-a9f1321e7c2b",
"clustername": "10.0.35.234/Trillian/p1-c2",
"id": "655b4526-aa78-45e0-978f-41ac2ff45bf1",
"name": "10.0.34.155"
},
{
"clusterid": "3d79b022-0fd9-4f51-805d-ef71bef562c5",
"clustername": "p1-c1",
"id": "4b7798ef-745c-4595-9715-be976dfbe963",
"name": "10.0.34.154"
}
]
}
Storage Pools:
(localcloud) SBCM5> > list storagepools filter=id,name,scope,clusterid,clustername,
{
"count": 2,
"storagepool": [
{
"clusterid": "a5b2a7b8-f897-4d5f-889f-a9f1321e7c2b",
"clustername": "10.0.35.234/Trillian/p1-c2",
"id": "a57a6026-b377-3fc4-859e-837529f7ff9c",
"name": "ps2",
"scope": "CLUSTER"
},
{
"clusterid": "3d79b022-0fd9-4f51-805d-ef71bef562c5",
"clustername": "p1-c1",
"id": "4f371379-63f1-317e-9709-563c8f57983e",
"name": "ps1",
"scope": "CLUSTER"
}
]
}
VMs:
(localcloud) SBCM5> > list virtualmachines filter=id,name,hostid,hostname,state
{
"count": 1,
"virtualmachine": [
{
"hostid": "4b7798ef-745c-4595-9715-be976dfbe963",
"hostname": "10.0.34.154",
"id": "7ce5dab4-ddad-4f25-85f1-8e3992ccb0a0",
"name": "t1",
"state": "Running"
}
]
}
(localcloud) SBCM5> > list systemvms filter=id,name,hostid,hostname,state
{
"count": 2,
"systemvm": [
{
"hostid": "4b7798ef-745c-4595-9715-be976dfbe963",
"hostname": "10.0.34.154",
"id": "cd83b075-4705-4d4f-82b6-f6779645f408",
"name": "v-3-VM",
"state": "Running"
},
{
"hostid": "4b7798ef-745c-4595-9715-be976dfbe963",
"hostname": "10.0.34.154",
"id": "474492d9-1ed8-497f-8e0d-f5389471cabe",
"name": "s-4-VM",
"state": "Running"
}
]
}
Update config to true, enable host maintenance and check VMs: <--Successful inter-cluster live-migration of VMs
(localcloud) SBCM5> > update configuration name=migrate.vm.across.clusters value=true
{
"configuration": {
"category": "Advanced",
"description": "Indicates whether the VM can be migrated to different cluster if no host is found in same cluster",
"isdynamic": true,
"name": "migrate.vm.across.clusters",
"value": "true"
}
}
(localcloud) SBCM5> > prepare hostformaintenance id=4b7798ef-745c-4595-9715-be976dfbe963
{
"host": {
"capabilities": "hvm",
"clusterid": "3d79b022-0fd9-4f51-805d-ef71bef562c5",
"clustername": "p1-c1",
"clustertype": "ExternalManaged",
"cpuallocated": "0%",
"cpuallocatedpercentage": "0%",
"cpuallocatedvalue": 0,
"cpuallocatedwithoverprovisioning": "0%",
"cpuloadaverage": 0,
"cpunumber": 6,
"cpusockets": 3,
"cpuspeed": 2100,
"cpuused": "8.19%",
"cpuwithoverprovisioning": "12600",
"created": "2021-09-02T10:45:01+0000",
"events": "ManagementServerDown; StartAgentRebalance; ShutdownRequested; AgentDisconnected; AgentConnected; Ping; HostDown; PingTimeout; Remove",
"hahost": false,
"hostha": {
"haenable": false,
"hastate": "Disabled"
},
"hypervisor": "VMware",
"hypervisorversion": "6.7.3",
"id": "4b7798ef-745c-4595-9715-be976dfbe963",
"ipaddress": "10.0.34.154",
"islocalstorageactive": false,
"jobid": "95229fb2-bc0c-4496-8318-acd8606a82e9",
"jobstatus": 0,
"lastpinged": "1970-01-19T10:24:59+0000",
"managementserverid": "736cf45b-5a00-4f6b-9287-08f654c73792",
"memoryallocated": 0,
"memoryallocatedbytes": 0,
"memoryallocatedpercentage": "0%",
"memorytotal": 8585134080,
"memoryused": 4244029440,
"memorywithoverprovisioning": "8585134080",
"name": "10.0.34.154",
"networkkbsread": 0,
"networkkbswrite": 0,
"outofbandmanagement": {
"enabled": false,
"powerstate": "Disabled"
},
"podid": "c9e2eccc-9c94-4a9e-a971-fa15a0bf59c2",
"podname": "Pod1",
"resourcestate": "PrepareForMaintenance",
"state": "Up",
"type": "Routing",
"version": "4.16.0.0-SNAPSHOT",
"zoneid": "1991b455-cebf-4507-88c4-8c8a467971c3",
"zonename": "pr4774-t1933-vmware-67u3"
}
}
(localcloud) SBCM5> > list virtualmachines filter=id,name,hostid,hostname,state
{
"count": 1,
"virtualmachine": [
{
"hostid": "655b4526-aa78-45e0-978f-41ac2ff45bf1",
"hostname": "10.0.34.155",
"id": "7ce5dab4-ddad-4f25-85f1-8e3992ccb0a0",
"name": "t1",
"state": "Running"
}
]
}
(localcloud) SBCM5> > list systemvms filter=id,name,hostid,hostname,state
{
"count": 2,
"systemvm": [
{
"hostid": "655b4526-aa78-45e0-978f-41ac2ff45bf1",
"hostname": "10.0.34.155",
"id": "cd83b075-4705-4d4f-82b6-f6779645f408",
"name": "v-3-VM",
"state": "Running"
},
{
"hostid": "655b4526-aa78-45e0-978f-41ac2ff45bf1",
"hostname": "10.0.34.155",
"id": "474492d9-1ed8-497f-8e0d-f5389471cabe",
"name": "s-4-VM",
"state": "Running"
}
]
}
Cancel host maintenance on first host:
(localcloud) SBCM5> > cancel hostmaintenance id=4b7798ef-745c-4595-9715-be976dfbe963
{
"host": {
"capabilities": "hvm",
"clusterid": "3d79b022-0fd9-4f51-805d-ef71bef562c5",
"clustername": "p1-c1",
"clustertype": "ExternalManaged",
"cpuallocated": "0%",
"cpuallocatedpercentage": "0%",
"cpuallocatedvalue": 0,
"cpuallocatedwithoverprovisioning": "0%",
"cpuloadaverage": 0,
"cpunumber": 6,
"cpusockets": 3,
"cpuspeed": 2100,
"cpuused": "8.19%",
"cpuwithoverprovisioning": "12600",
"created": "2021-09-02T10:45:01+0000",
"events": "ManagementServerDown; StartAgentRebalance; ShutdownRequested; AgentDisconnected; AgentConnected; Ping; HostDown; PingTimeout; Remove",
"hahost": false,
"hostha": {
"haenable": false,
"hastate": "Disabled"
},
"hypervisor": "VMware",
"hypervisorversion": "6.7.3",
"id": "4b7798ef-745c-4595-9715-be976dfbe963",
"ipaddress": "10.0.34.154",
"islocalstorageactive": false,
"jobid": "2770a000-ae8b-4daa-b342-3160e9406da5",
"jobstatus": 0,
"lastpinged": "1970-01-19T10:24:59+0000",
"managementserverid": "736cf45b-5a00-4f6b-9287-08f654c73792",
"memoryallocated": 0,
"memoryallocatedbytes": 0,
"memoryallocatedpercentage": "0%",
"memorytotal": 8585134080,
"memoryused": 4244029440,
"memorywithoverprovisioning": "8585134080",
"name": "10.0.34.154",
"networkkbsread": 0,
"networkkbswrite": 0,
"outofbandmanagement": {
"enabled": false,
"powerstate": "Disabled"
},
"podid": "c9e2eccc-9c94-4a9e-a971-fa15a0bf59c2",
"podname": "Pod1",
"resourcestate": "Enabled",
"state": "Up",
"type": "Routing",
"version": "4.16.0.0-SNAPSHOT",
"zoneid": "1991b455-cebf-4507-88c4-8c8a467971c3",
"zonename": "pr4774-t1933-vmware-67u3"
}
}
Update config to false, enable host maintenance on 2nd host: <-- Fails as config is false and not host available within cluster
(localcloud) SBCM5> > update configuration name=migrate.vm.across.clusters value=false
{
"configuration": {
"category": "Advanced",
"description": "Indicates whether the VM can be migrated to different cluster if no host is found in same cluster",
"isdynamic": true,
"name": "migrate.vm.across.clusters",
"value": "false"
}
}
🙈 Error: async API failed for job a2ef5b55-35e3-48d8-a00c-59820f544eea
(localcloud) SBCM5> > prepare hostformaintenance id=655b4526-aa78-45e0-978f-41ac2ff45bf1
{
"accountid": "202665fc-0bda-11ec-a29c-1e0094000118",
"cmd": "org.apache.cloudstack.api.command.admin.host.PrepareForMaintenanceCmd",
"completed": "2021-09-06T10:50:22+0000",
"created": "2021-09-06T10:50:22+0000",
"jobid": "93746f97-c532-42a1-a196-9f4458c02697",
"jobinstanceid": "655b4526-aa78-45e0-978f-41ac2ff45bf1",
"jobinstancetype": "Host",
"jobprocstatus": 0,
"jobresult": {
"errorcode": 530,
"errortext": "Failed to prepare host for maintenance due to: Unable to prepare for maintenance host 5"
},
"jobresultcode": 530,
"jobresulttype": "object",
"jobstatus": 2,
"userid": "2027b571-0bda-11ec-a29c-1e0094000118"
}
Logs:
2021-09-06 10:50:22,675 DEBUG [c.c.a.ApiServlet] (qtp1233705144-21:ctx-0ed33ef6) (logid:23dd2023) ===START=== 10.0.32.133 -- GET apiKey=LIN6rqXuaJwMPfGYFh13qDwYz5VNNz1J2J6qIOWcd3oLQOq0WtD4CwRundBL6rzXToa3lQOC_vKjI3nkHtiD8Q&command=queryAsyncJobResult&jobid=93746f97-c532-42a1-a196-9f4458c02697&response=json&signature=XFJ0JF6QvW8ZK%2FfFtvr15m7fQiE%3D
2021-09-06 10:50:22,677 DEBUG [c.c.a.ApiServer] (qtp1233705144-21:ctx-0ed33ef6 ctx-5d99131c) (logid:23dd2023) CIDRs from which account 'Acct[202665fc-0bda-11ec-a29c-1e0094000118-admin] -- Account {"id": 2, "name": "admin", "uuid": "202665fc-0bda-11ec-a29c-1e0094000118"}' is allowed to perform API calls: 0.0.0.0/0,::/0
2021-09-06 10:50:22,683 INFO [c.c.r.ResourceManagerImpl] (API-Job-Executor-6:ctx-6ea2ffbd job-67 ctx-c79733b1) (logid:93746f97) Maintenance: attempting maintenance of host 655b4526-aa78-45e0-978f-41ac2ff45bf1
2021-09-06 10:50:22,684 DEBUG [c.c.a.t.Request] (API-Job-Executor-6:ctx-6ea2ffbd job-67 ctx-c79733b1) (logid:93746f97) Seq 5-5937433158734577709: Sending { Cmd , MgmtId: 32987831861528, via: 5(10.0.34.155), Ver: v1, Flags: 100111, [{"com.cloud.agent.api.MaintainCommand":{"wait":"0","bypassHostMaintenance":"false"}}] }
2021-09-06 10:50:22,685 DEBUG [c.c.a.t.Request] (API-Job-Executor-6:ctx-6ea2ffbd job-67 ctx-c79733b1) (logid:93746f97) Seq 5-5937433158734577709: Executing: { Cmd , MgmtId: 32987831861528, via: 5(10.0.34.155), Ver: v1, Flags: 100111, [{"com.cloud.agent.api.MaintainCommand":{"wait":"0","bypassHostMaintenance":"false"}}] }
2021-09-06 10:50:22,685 DEBUG [c.c.a.m.DirectAgentAttache] (DirectAgent-37:ctx-97d304bf) (logid:88268016) Seq 5-5937433158734577709: Executing request
2021-09-06 10:50:22,685 INFO [c.c.h.v.r.VmwareResource] (DirectAgent-37:ctx-97d304bf 10.0.34.155, job-67, cmd: MaintainCommand) (logid:93746f97) Executing resource MaintainCommand: {"wait":0,"bypassHostMaintenance":false}
2021-09-06 10:50:22,685 DEBUG [c.c.a.m.DirectAgentAttache] (DirectAgent-37:ctx-97d304bf) (logid:93746f97) Seq 5-5937433158734577709: Response Received:
2021-09-06 10:50:22,686 DEBUG [c.c.a.t.Request] (DirectAgent-37:ctx-97d304bf) (logid:93746f97) Seq 5-5937433158734577709: Processing: { Ans: , MgmtId: 32987831861528, via: 5(10.0.34.155), Ver: v1, Flags: 110, [{"com.cloud.agent.api.MaintainAnswer":{"willMigrate":"true","result":"true","details":"Put host in maintaince","wait":"0","bypassHostMaintenance":"false"}}] }
2021-09-06 10:50:22,686 DEBUG [c.c.a.m.AgentAttache] (DirectAgent-37:ctx-97d304bf) (logid:93746f97) Seq 5-5937433158734577709: No more commands found
2021-09-06 10:50:22,686 DEBUG [c.c.a.t.Request] (API-Job-Executor-6:ctx-6ea2ffbd job-67 ctx-c79733b1) (logid:93746f97) Seq 5-5937433158734577709: Received: { Ans: , MgmtId: 32987831861528, via: 5(10.0.34.155), Ver: v1, Flags: 110, { MaintainAnswer } }
2021-09-06 10:50:22,686 DEBUG [c.c.a.m.AgentManagerImpl] (API-Job-Executor-6:ctx-6ea2ffbd job-67 ctx-c79733b1) (logid:93746f97) Details from executing class com.cloud.agent.api.MaintainCommand: Put host in maintaince
2021-09-06 10:50:22,690 DEBUG [c.c.r.ResourceState] (API-Job-Executor-6:ctx-6ea2ffbd job-67 ctx-c79733b1) (logid:93746f97) Resource state update: [id = 5; name = 10.0.34.155; old state = Enabled; event = AdminAskMaintenance; new state = PrepareForMaintenance]
2021-09-06 10:50:22,692 DEBUG [c.c.a.ApiServlet] (qtp1233705144-21:ctx-0ed33ef6 ctx-5d99131c ctx-d6e3d0a9) (logid:23dd2023) ===END=== 10.0.32.133 -- GET apiKey=LIN6rqXuaJwMPfGYFh13qDwYz5VNNz1J2J6qIOWcd3oLQOq0WtD4CwRundBL6rzXToa3lQOC_vKjI3nkHtiD8Q&command=queryAsyncJobResult&jobid=93746f97-c532-42a1-a196-9f4458c02697&response=json&signature=XFJ0JF6QvW8ZK%2FfFtvr15m7fQiE%3D
2021-09-06 10:50:22,700 WARN [c.c.r.ResourceManagerImpl] (API-Job-Executor-6:ctx-6ea2ffbd job-67 ctx-c79733b1) (logid:93746f97) Unable to find a host for vm migration in cluster: 6
2021-09-06 10:50:22,701 WARN [c.c.r.ResourceManagerImpl] (API-Job-Executor-6:ctx-6ea2ffbd job-67 ctx-c79733b1) (logid:93746f97) VMs cannot be migrated across cluster since migrate.vm.across.clusters is false for zone ID: 1
2021-09-06 10:50:22,702 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-6:ctx-6ea2ffbd job-67) (logid:93746f97) Complete async job-67, jobStatus: FAILED, resultCode: 530, result: org.apache.cloudstack.api.response.ExceptionResponse/null/{"uuidList":[],"errorcode":"530","errortext":"Failed to prepare host for maintenance due to: Unable to prepare for maintenance host 5"}
| for (final VMInstanceVO vm : vms) { | ||
| if (! HypervisorType.VMware.equals(host.getHypervisorType()) && _vmMgr.checkIfVmHasClusterWideVolumes(vm.getId())) { | ||
| s_logger.warn(String.format("VM %s cannot be migrated across cluster as it has volumes on cluster-wide pool", vm)); | ||
| return false; | ||
| } | ||
| } |
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.
Minor nit: this block can be moved to start of if to fail early
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.
@shwstppr
moved the hypervisor type check.
I have considered the order of checks. in my opinion, the checks of vm volumes have more db queries than listAllUpAndEnabledHosts so I put the check prior to volume pool check.
|
@shwstppr great, thanks for testing ! |
|
@blueorangutan package |
|
@weizhouapache a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1148 |
|
@blueorangutan test |
|
@nvazquez a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1981)
|
nvazquez
left a comment
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.
LGTM
Description
This PR adds a global setting migrate.vm.across.clusters to indicate whether vm can be live migrated to other clusters.
If vm is running on the last host in a cluster and vm cannot be migrated to other clusters, put host to maintenance will fail.
This is based on pr #4378
This fixes #3707 #3720
Some rules
(1) for vmware, across-cluster migration of vms with cluster-scoped pools is supported
(2) for other hypervisors except vmware, vm can be live migrated to other clusters (with same hypervisor type), if all volumes are in zone-wide storage pool.
(3) migration of systemvms (CPVM, SSVM) is only possible across clusters in same pod to avoid potential network issues.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Screenshots (if appropriate):
How Has This Been Tested?