Skip to content

CLOUDSTACK-8829 : Consecutive cold migration fails - #797

Closed
maneesha-p wants to merge 1 commit into
apache:masterfrom
maneesha-p:pull-21
Closed

CLOUDSTACK-8829 : Consecutive cold migration fails#797
maneesha-p wants to merge 1 commit into
apache:masterfrom
maneesha-p:pull-21

Conversation

@maneesha-p

Copy link
Copy Markdown

Issue - Consecutive VM cold migration fails.
Root Cause Analysis - In case of VMware, if VM is being cold migrated between clusters belonging to two different VMware DCs, Cloudstack unregisters the VM from the source host and cleans up the associated VM files. The check if a VM is being cold migrated across DCs is made using the source host id. In case of consecutive cold migrations since the source host id of a VM is NULL and no VM exists, Cloudstack should skip the check
Proposed Solution - Attempt to unregister a VM in another DC, only if there is a host associated with a VM.

@asfbot

asfbot commented Sep 10, 2015

Copy link
Copy Markdown

cloudstack-pull-rats #561 SUCCESS
This pull request looks good

@asfbot

asfbot commented Sep 10, 2015

Copy link
Copy Markdown

cloudstack-pull-analysis #496 FAILURE
Looks like there's a problem with this pull request

Long srcClusterId = null;
Long srcHostId = vm.getHostId() != null ? vm.getHostId() : vm.getLastHostId();
if (srcHostId != null) {
HostVO srcHost = _hostDao.findById(srcHostId);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @maneesha-p
I got a little confused by this if statement. Are you actually doing anything inside it? If Im not mistaken both variables are local inside this if-block and won't do anything outside it's scope, is this intended?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexandrelimassantana I don't see any problem with that if (line 1778). Both variables (srcHostId and srcClusterId) are used.

The conditional at the line 1784 uses srcClusterId.

The method at line 1793 sends the UnregisterVMCommand to a given host with the srcHostId.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexandrelimassantana 'srcHost' variable is local to the if-block but 'srcClusterId' variable that is populated inside the if-block is outside the scope of it and as @GabrielBrascher mentioned its being used in line 1784.

@yadvr

yadvr commented May 2, 2016

Copy link
Copy Markdown
Member

@maneesha-p please rebase against latest master and push -f, update on status of your PR

@bvbharatk

Copy link
Copy Markdown
Contributor

ACS CI BVT Run

Sumarry:
Build Number 128
Hypervisor xenserver
NetworkType Advanced
Passed=73
Failed=0
Skipped=3

Link to logs Folder (search by build_no): https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0

Failed tests:

Skipped tests:
test_vm_nic_adapter_vmxnet3
test_static_role_account_acls
test_deploy_vgpu_enabled_vm

Passed test suits:
test_deploy_vm_with_userdata.py
test_affinity_groups_projects.py
test_portable_publicip.py
test_vpc_vpn.py
test_over_provisioning.py
test_global_settings.py
test_scale_vm.py
test_service_offerings.py
test_routers_iptables_default_policy.py
test_routers.py
test_reset_vm_on_reboot.py
test_snapshots.py
test_deploy_vms_with_varied_deploymentplanners.py
test_login.py
test_list_ids_parameter.py
test_public_ip_range.py
test_multipleips_per_nic.py
test_regions.py
test_affinity_groups.py
test_network_acl.py
test_pvlan.py
test_volumes.py
test_nic.py
test_deploy_vm_root_resize.py
test_resource_detail.py
test_secondary_storage.py
test_vm_life_cycle.py
test_disk_offerings.py

@DaanHoogland

Copy link
Copy Markdown
Contributor

superceded by #2056; closing

yadvr pushed a commit that referenced this pull request Jan 20, 2021
Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants