[jira] [Commented] (CLOUDSTACK-8829) Consecutive cold migration fails

2017-05-07 Thread ASF subversion and git services (JIRA)

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

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

Commit 08c138de60a7fbcfb2ff77f97bd87c65ca593175 in cloudstack's branch 
refs/heads/master from [~rajanik]
[ https://gitbox.apache.org/repos/asf?p=cloudstack.git;h=08c138d ]

Merge pull request #2056 from priyankparihar/CLOUDSTACK-8829

CLOUDSTACK-8829 : Consecutive cold migration fails.

> Consecutive cold migration fails
> 
>
> Key: CLOUDSTACK-8829
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8829
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Maneesha
>Assignee: Maneesha
>
> The following scenario is broken:
> 1.Deploy VM and stop it
> 2.Migrate stopped VM to a different primary storage pool
> 3.Again migrate the same VM to another/same storage pool. Fails with NPE.
> java.lang.NullPointerException
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:1745)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:4716)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:4723)
> at 
> com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:103)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-8829) Consecutive cold migration fails

2017-05-07 Thread ASF subversion and git services (JIRA)

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

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

Commit 08c138de60a7fbcfb2ff77f97bd87c65ca593175 in cloudstack's branch 
refs/heads/master from [~rajanik]
[ https://gitbox.apache.org/repos/asf?p=cloudstack.git;h=08c138d ]

Merge pull request #2056 from priyankparihar/CLOUDSTACK-8829

CLOUDSTACK-8829 : Consecutive cold migration fails.

> Consecutive cold migration fails
> 
>
> Key: CLOUDSTACK-8829
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8829
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Maneesha
>Assignee: Maneesha
>
> The following scenario is broken:
> 1.Deploy VM and stop it
> 2.Migrate stopped VM to a different primary storage pool
> 3.Again migrate the same VM to another/same storage pool. Fails with NPE.
> java.lang.NullPointerException
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:1745)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:4716)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:4723)
> at 
> com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:103)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-8829) Consecutive cold migration fails

2017-05-07 Thread ASF subversion and git services (JIRA)

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

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

Commit 88b0459c41c51e832547667ea537fb9ce9d9f4c1 in cloudstack's branch 
refs/heads/master from [~likithas]
[ https://gitbox.apache.org/repos/asf?p=cloudstack.git;h=88b0459 ]

CLOUDSTACK-8829 : Consecutive cold migration fails


> Consecutive cold migration fails
> 
>
> Key: CLOUDSTACK-8829
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8829
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Maneesha
>Assignee: Maneesha
>
> The following scenario is broken:
> 1.Deploy VM and stop it
> 2.Migrate stopped VM to a different primary storage pool
> 3.Again migrate the same VM to another/same storage pool. Fails with NPE.
> java.lang.NullPointerException
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:1745)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:4716)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:4723)
> at 
> com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:103)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (CLOUDSTACK-8829) Consecutive cold migration fails

2016-06-04 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CLOUDSTACK-8829:


Github user maneesha-p commented on the issue:

https://github.com/apache/cloudstack/pull/797
  
### 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


> Consecutive cold migration fails
> 
>
> Key: CLOUDSTACK-8829
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8829
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Maneesha
>Assignee: Maneesha
>
> The following scenario is broken:
> 1.Deploy VM and stop it
> 2.Migrate stopped VM to a different primary storage pool
> 3.Again migrate the same VM to another/same storage pool. Fails with NPE.
> java.lang.NullPointerException
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:1745)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:4716)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:4723)
> at 
> com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:103)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-8829) Consecutive cold migration fails

2016-05-02 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CLOUDSTACK-8829:


Github user rhtyd commented on the pull request:

https://github.com/apache/cloudstack/pull/797#issuecomment-216188749
  
@maneesha-p please rebase against latest master and push -f, update on 
status of your PR



> Consecutive cold migration fails
> 
>
> Key: CLOUDSTACK-8829
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8829
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Maneesha
>Assignee: Maneesha
>
> The following scenario is broken:
> 1.Deploy VM and stop it
> 2.Migrate stopped VM to a different primary storage pool
> 3.Again migrate the same VM to another/same storage pool. Fails with NPE.
> java.lang.NullPointerException
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:1745)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:4716)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:4723)
> at 
> com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:103)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-8829) Consecutive cold migration fails

2016-03-21 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CLOUDSTACK-8829:


Github user maneesha-p commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/797#discussion_r56786342
  
--- Diff: 
engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java ---
@@ -1776,19 +1773,26 @@ private void orchestrateStorageMigration(final 
String vmUuid, final StoragePool
 // If VM was cold migrated between clusters belonging to 
two different VMware DCs,
 // unregister the VM from the source host and cleanup the 
associated VM files.
 if (vm.getHypervisorType().equals(HypervisorType.VMware)) {
+Long srcClusterId = null;
+Long srcHostId = vm.getHostId() != null ? 
vm.getHostId() : vm.getLastHostId();
+if (srcHostId != null) {
+HostVO srcHost = _hostDao.findById(srcHostId);
+srcClusterId = srcHost.getClusterId();
+}
+
 final Long destClusterId = destPool.getClusterId();
 if (srcClusterId != null && destClusterId != null && ! 
srcClusterId.equals(destClusterId)) {
 final String srcDcName = 
_clusterDetailsDao.getVmwareDcName(srcClusterId);
 final String destDcName = 
_clusterDetailsDao.getVmwareDcName(destClusterId);
 if (srcDcName != null && destDcName != null && 
!srcDcName.equals(destDcName)) {
 s_logger.debug("Since VM's storage was 
successfully migrated across VMware Datacenters, unregistering VM: " + 
vm.getInstanceName() +
-" from source host: " + 
srcHost.getId());
+" from source host: " + srcHostId);
 final UnregisterVMCommand uvc = new 
UnregisterVMCommand(vm.getInstanceName());
 uvc.setCleanupVmFiles(true);
 try {
-_agentMgr.send(srcHost.getId(), uvc);
+_agentMgr.send(srcHostId, uvc);
 } catch (final Exception e) {
-throw new CloudRuntimeException("Failed to 
unregister VM: " + vm.getInstanceName() + " from source host: " + 
srcHost.getId() +
+throw new CloudRuntimeException("Failed to 
unregister VM: " + vm.getInstanceName() + " from source host: " + srcHostId +
--- End diff --

Thanks for pointing out.Updated.


> Consecutive cold migration fails
> 
>
> Key: CLOUDSTACK-8829
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8829
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Maneesha
>Assignee: Maneesha
>
> The following scenario is broken:
> 1.Deploy VM and stop it
> 2.Migrate stopped VM to a different primary storage pool
> 3.Again migrate the same VM to another/same storage pool. Fails with NPE.
> java.lang.NullPointerException
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:1745)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:4716)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:4723)
> at 
> com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:103)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-8829) Consecutive cold migration fails

2016-02-24 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CLOUDSTACK-8829:


Github user maneesha-p commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/797#discussion_r53916405
  
--- Diff: 
engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java ---
@@ -1776,19 +1773,26 @@ private void orchestrateStorageMigration(final 
String vmUuid, final StoragePool
 // If VM was cold migrated between clusters belonging to 
two different VMware DCs,
 // unregister the VM from the source host and cleanup the 
associated VM files.
 if (vm.getHypervisorType().equals(HypervisorType.VMware)) {
+Long srcClusterId = null;
+Long srcHostId = vm.getHostId() != null ? 
vm.getHostId() : vm.getLastHostId();
+if (srcHostId != null) {
+HostVO srcHost = _hostDao.findById(srcHostId);
--- End diff --

@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.


> Consecutive cold migration fails
> 
>
> Key: CLOUDSTACK-8829
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8829
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Maneesha
>Assignee: Maneesha
>
> The following scenario is broken:
> 1.Deploy VM and stop it
> 2.Migrate stopped VM to a different primary storage pool
> 3.Again migrate the same VM to another/same storage pool. Fails with NPE.
> java.lang.NullPointerException
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:1745)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:4716)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:4723)
> at 
> com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:103)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-8829) Consecutive cold migration fails

2016-02-21 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CLOUDSTACK-8829:


Github user pedro-martins commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/797#discussion_r53579417
  
--- Diff: 
engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java ---
@@ -1776,19 +1773,26 @@ private void orchestrateStorageMigration(final 
String vmUuid, final StoragePool
 // If VM was cold migrated between clusters belonging to 
two different VMware DCs,
 // unregister the VM from the source host and cleanup the 
associated VM files.
 if (vm.getHypervisorType().equals(HypervisorType.VMware)) {
+Long srcClusterId = null;
+Long srcHostId = vm.getHostId() != null ? 
vm.getHostId() : vm.getLastHostId();
+if (srcHostId != null) {
+HostVO srcHost = _hostDao.findById(srcHostId);
+srcClusterId = srcHost.getClusterId();
+}
+
 final Long destClusterId = destPool.getClusterId();
 if (srcClusterId != null && destClusterId != null && ! 
srcClusterId.equals(destClusterId)) {
 final String srcDcName = 
_clusterDetailsDao.getVmwareDcName(srcClusterId);
 final String destDcName = 
_clusterDetailsDao.getVmwareDcName(destClusterId);
 if (srcDcName != null && destDcName != null && 
!srcDcName.equals(destDcName)) {
 s_logger.debug("Since VM's storage was 
successfully migrated across VMware Datacenters, unregistering VM: " + 
vm.getInstanceName() +
-" from source host: " + 
srcHost.getId());
+" from source host: " + srcHostId);
 final UnregisterVMCommand uvc = new 
UnregisterVMCommand(vm.getInstanceName());
 uvc.setCleanupVmFiles(true);
 try {
-_agentMgr.send(srcHost.getId(), uvc);
+_agentMgr.send(srcHostId, uvc);
 } catch (final Exception e) {
-throw new CloudRuntimeException("Failed to 
unregister VM: " + vm.getInstanceName() + " from source host: " + 
srcHost.getId() +
+throw new CloudRuntimeException("Failed to 
unregister VM: " + vm.getInstanceName() + " from source host: " + srcHostId +
--- End diff --

hi @maneesha-p 

How about you replace the catch Exception at line 1794 to ( 
AgentUnavailableException | OperationTimedoutException )? 


> Consecutive cold migration fails
> 
>
> Key: CLOUDSTACK-8829
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8829
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Maneesha
>Assignee: Maneesha
>
> The following scenario is broken:
> 1.Deploy VM and stop it
> 2.Migrate stopped VM to a different primary storage pool
> 3.Again migrate the same VM to another/same storage pool. Fails with NPE.
> java.lang.NullPointerException
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:1745)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:4716)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:4723)
> at 
> com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:103)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-8829) Consecutive cold migration fails

2016-02-20 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CLOUDSTACK-8829:


Github user GabrielBrascher commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/797#discussion_r53559299
  
--- Diff: 
engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java ---
@@ -1776,19 +1773,26 @@ private void orchestrateStorageMigration(final 
String vmUuid, final StoragePool
 // If VM was cold migrated between clusters belonging to 
two different VMware DCs,
 // unregister the VM from the source host and cleanup the 
associated VM files.
 if (vm.getHypervisorType().equals(HypervisorType.VMware)) {
+Long srcClusterId = null;
+Long srcHostId = vm.getHostId() != null ? 
vm.getHostId() : vm.getLastHostId();
+if (srcHostId != null) {
+HostVO srcHost = _hostDao.findById(srcHostId);
--- End diff --

@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**.


> Consecutive cold migration fails
> 
>
> Key: CLOUDSTACK-8829
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8829
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Maneesha
>Assignee: Maneesha
>
> The following scenario is broken:
> 1.Deploy VM and stop it
> 2.Migrate stopped VM to a different primary storage pool
> 3.Again migrate the same VM to another/same storage pool. Fails with NPE.
> java.lang.NullPointerException
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:1745)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:4716)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:4723)
> at 
> com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:103)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-8829) Consecutive cold migration fails

2016-02-14 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on CLOUDSTACK-8829:


Github user alexandrelimassantana commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/797#discussion_r52846855
  
--- Diff: 
engine/orchestration/src/com/cloud/vm/VirtualMachineManagerImpl.java ---
@@ -1776,19 +1773,26 @@ private void orchestrateStorageMigration(final 
String vmUuid, final StoragePool
 // If VM was cold migrated between clusters belonging to 
two different VMware DCs,
 // unregister the VM from the source host and cleanup the 
associated VM files.
 if (vm.getHypervisorType().equals(HypervisorType.VMware)) {
+Long srcClusterId = null;
+Long srcHostId = vm.getHostId() != null ? 
vm.getHostId() : vm.getLastHostId();
+if (srcHostId != null) {
+HostVO srcHost = _hostDao.findById(srcHostId);
--- End diff --

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?


> Consecutive cold migration fails
> 
>
> Key: CLOUDSTACK-8829
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8829
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Maneesha
>Assignee: Maneesha
>
> The following scenario is broken:
> 1.Deploy VM and stop it
> 2.Migrate stopped VM to a different primary storage pool
> 3.Again migrate the same VM to another/same storage pool. Fails with NPE.
> java.lang.NullPointerException
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:1745)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:4716)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:4723)
> at 
> com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:103)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CLOUDSTACK-8829) Consecutive cold migration fails

2015-09-10 Thread Maneesha (JIRA)

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

Maneesha commented on CLOUDSTACK-8829:
--

Author - Likitha Shetty 
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, CCP 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, CCP 
should skip the check
Proposed Solution
Attempt to unregister a VM in another DC, only if there is a host associated 
with a VM.

> Consecutive cold migration fails
> 
>
> Key: CLOUDSTACK-8829
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8829
> Project: CloudStack
>  Issue Type: Bug
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>Reporter: Maneesha
>
> The following scenario is broken:
> 1.Deploy VM and stop it
> 2.Migrate stopped VM to a different primary storage pool
> 3.Again migrate the same VM to another/same storage pool. Fails with NPE.
> java.lang.NullPointerException
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:1745)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.orchestrateStorageMigration(VirtualMachineManagerImpl.java:4716)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:107)
> at 
> com.cloud.vm.VirtualMachineManagerImpl.handleVmWorkJob(VirtualMachineManagerImpl.java:4723)
> at 
> com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:103)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)