Rayees Namathponnan created CLOUDSTACK-4340:
-----------------------------------------------
Summary: [Automation] Test cases
TestVMLifeCycleStoppedVPCVR.test_07_migrate_instance_in_network failed during
migration
Key: CLOUDSTACK-4340
URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4340
Project: CloudStack
Issue Type: Bug
Security Level: Public (Anyone can view this level - this is the default.)
Components: API, Automation
Affects Versions: 4.2.0
Environment: Automation
4.2
Reporter: Rayees Namathponnan
Fix For: 4.2.0
Attachments: management-server.rar
Test cases
integration.component.test_vpc_vm_life_cycle.TestVMLifeCycleStoppedVPCVR.test_07_migrate_instance_in_network
failed with latest build, failed during migration;
observed below error in automation log
----------------------------------------------------------
Failed to migrate instance, Execute cmd: asyncquery failed, due to: {errorcode
: 530, errortext : u'Cannot migrate VM, VM is already presnt on this host,
please specify valid destination host to migrate the VM'}
-------------------- >> begin captured logging << --------------------
testclient.testcase.TestVMLifeCycleStoppedVPCVR: DEBUG: Check the status of VPC
virtual router
testclient.testcase.TestVMLifeCycleStoppedVPCVR: DEBUG: Checking if the host is
available for migration?
testclient.testcase.TestVMLifeCycleStoppedVPCVR: DEBUG: Validating if the
network rules work properly or not?
testclient.testcase.TestVMLifeCycleStoppedVPCVR: DEBUG: Checking if we can SSH
into VM_1 through 10.223.122.78?
paramiko.transport: DEBUG: starting thread (client mode): 0xad8f910L
paramiko.transport: INFO: Connected (version 2.0, client OpenSSH_4.3)
paramiko.transport: DEBUG: kex algos:['diffie-hellman-group-exchange-sha1',
'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server
key:['ssh-rsa', 'ssh-dss'] client encrypt:['aes128-cbc', '3des-cbc',
'blowfish-cbc', 'cast128-cbc', 'arcfour128', 'arcfour256', 'arcfour',
'aes192-cbc', 'aes256-cbc', '[email protected]', 'aes128-ctr',
'aes192-ctr', 'aes256-ctr'] server encrypt:['aes128-cbc', '3des-cbc',
'blowfish-cbc', 'cast128-cbc', 'arcfour128', 'arcfour256', 'arcfour',
'aes192-cbc', 'aes256-cbc', '[email protected]', 'aes128-ctr',
'aes192-ctr', 'aes256-ctr'] client mac:['hmac-md5', 'hmac-sha1',
'hmac-ripemd160', '[email protected]', 'hmac-sha1-96', 'hmac-md5-96']
server mac:['hmac-md5', 'hmac-sha1', 'hmac-ripemd160',
'[email protected]', 'hmac-sha1-96', 'hmac-md5-96'] client
compress:['none', '[email protected]'] server compress:['none',
'[email protected]'] client lang:[''] server lang:[''] kex follows?False
paramiko.transport: DEBUG: Ciphers agreed: local=aes128-ctr, remote=aes128-ctr
paramiko.transport: DEBUG: using kex diffie-hellman-group1-sha1; server key
type ssh-rsa; cipher: local aes128-ctr, remote aes128-ctr; mac: local
hmac-sha1, remote hmac-sha1; compression: local none, remote none
paramiko.transport: DEBUG: Switch to new keys ...
paramiko.transport: DEBUG: Adding ssh-rsa host key for 10.223.122.78:
0f8b3ff9dc4dce10340227dab3cac032
paramiko.transport: DEBUG: Trying discovered key
76be480fa6b8ad3b78082d6d19e4ee44 in /root/.ssh/id_rsa
paramiko.transport: DEBUG: userauth is OK
paramiko.transport: INFO: Authentication (publickey) failed.
paramiko.transport: DEBUG: userauth is OK
paramiko.transport: INFO: Authentication (password) successful!
sshClient: DEBUG: SSH connect: [email protected] with passwd password
paramiko.transport: DEBUG: EOF in transport thread
testclient.testcase.TestVMLifeCycleStoppedVPCVR: DEBUG: SSH into VM is
successfully
testclient.testcase.TestVMLifeCycleStoppedVPCVR: DEBUG: Verifying if we can
ping to outside world from VM?
paramiko.transport: DEBUG: [chan 1] Max packet in: 34816 bytes
paramiko.transport: DEBUG: [chan 1] Max packet out: 32768 bytes
paramiko.transport: INFO: Secsh channel 1 opened.
paramiko.transport: DEBUG: [chan 1] Sesch channel 1 request ok
paramiko.transport: DEBUG: [chan 1] EOF received (1)
sshClient: DEBUG: {Cmd: ping -c 1 www.google.com via Host: 10.223.122.78}
{returns: ['PING www.google.com (74.125.239.145) 56(84) bytes of data.', '64
bytes from nuq05s02-in-f17.1e100.net (74.125.239.145): icmp_seq=1 ttl=48
time=5.49 ms', '', '--- www.google.com ping statistics ---', '1 packets
transmitted, 1 received, 0% packet loss, time 0ms', 'rtt min/avg/max/mdev =
5.497/5.497/5.497/0.000 ms']}
testclient.testcase.TestVMLifeCycleStoppedVPCVR: DEBUG: Checking if we can SSH
into VM_1?
paramiko.transport: DEBUG: [chan 1] EOF sent (1)
paramiko.transport: DEBUG: starting thread (client mode): 0xad8f590L
paramiko.transport: INFO: Connected (version 2.0, client OpenSSH_4.3)
paramiko.transport: DEBUG: kex algos:['diffie-hellman-group-exchange-sha1',
'diffie-hellman-group14-sha1', 'diffie-hellman-group1-sha1'] server
key:['ssh-rsa', 'ssh-dss'] client encrypt:['aes128-cbc', '3des-cbc',
'blowfish-cbc', 'cast128-cbc', 'arcfour128', 'arcfour256', 'arcfour',
'aes192-cbc', 'aes256-cbc', '[email protected]', 'aes128-ctr',
'aes192-ctr', 'aes256-ctr'] server encrypt:['aes128-cbc', '3des-cbc',
'blowfish-cbc', 'cast128-cbc', 'arcfour128', 'arcfour256', 'arcfour',
'aes192-cbc', 'aes256-cbc', '[email protected]', 'aes128-ctr',
'aes192-ctr', 'aes256-ctr'] client mac:['hmac-md5', 'hmac-sha1',
'hmac-ripemd160', '[email protected]', 'hmac-sha1-96', 'hmac-md5-96']
server mac:['hmac-md5', 'hmac-sha1', 'hmac-ripemd160',
'[email protected]', 'hmac-sha1-96', 'hmac-md5-96'] client
compress:['none', '[email protected]'] server compress:['none',
'[email protected]'] client lang:[''] server lang:[''] kex follows?False
paramiko.transport: DEBUG: Ciphers agreed: local=aes128-ctr, remote=aes128-ctr
paramiko.transport: DEBUG: using kex diffie-hellman-group1-sha1; server key
type ssh-rsa; cipher: local aes128-ctr, remote aes128-ctr; mac: local
hmac-sha1, remote hmac-sha1; compression: local none, remote none
paramiko.transport: DEBUG: Switch to new keys ...
paramiko.transport: DEBUG: Adding ssh-rsa host key for 10.223.122.80:
0f8b3ff9dc4dce10340227dab3cac032
paramiko.transport: DEBUG: Trying discovered key
76be480fa6b8ad3b78082d6d19e4ee44 in /root/.ssh/id_rsa
paramiko.transport: DEBUG: userauth is OK
paramiko.transport: INFO: Authentication (publickey) failed.
paramiko.transport: DEBUG: userauth is OK
paramiko.transport: INFO: Authentication (password) successful!
sshClient: DEBUG: SSH connect: [email protected] with passwd password
testclient.testcase.TestVMLifeCycleStoppedVPCVR: DEBUG: SSH into VM is
successfully
testclient.testcase.TestVMLifeCycleStoppedVPCVR: DEBUG: Verifying if we can
ping to outside world from VM?
paramiko.transport: DEBUG: [chan 1] Max packet in: 34816 bytes
paramiko.transport: DEBUG: [chan 1] Max packet out: 32768 bytes
paramiko.transport: INFO: Secsh channel 1 opened.
paramiko.transport: DEBUG: [chan 1] Sesch channel 1 request ok
paramiko.transport: DEBUG: [chan 1] EOF received (1)
sshClient: DEBUG: {Cmd: ping -c 1 www.google.com via Host: 10.223.122.80}
{returns: ['PING www.google.com (74.125.239.148) 56(84) bytes of data.', '64
bytes from nuq05s02-in-f20.1e100.net (74.125.239.148): icmp_seq=1 ttl=48
time=6.24 ms', '', '--- www.google.com ping statistics ---', '1 packets
transmitted, 1 received, 0% packet loss, time 0ms', 'rtt min/avg/max/mdev =
6.249/6.249/6.249/0.000 ms']}
paramiko.transport: DEBUG: [chan 1] EOF sent (1)
paramiko.transport: DEBUG: EOF in transport thread
testclient.testcase.TestVMLifeCycleStoppedVPCVR: DEBUG: Migrating VM-ID:
20b35944-9892-48bf-bd6d-a2338a7eb6ad to Host:
44652e87-084e-4076-a068-291943ad92ba
--------------------- >> end captured logging << ---------------------
Stacktrace
File "/usr/local/lib/python2.7/unittest/case.py", line 318, in run
testMethod()
File
"/Repo_30X/ipcl/cloudstack/test/integration/component/test_vpc_vm_life_cycle.py",
line 2536, in test_07_migrate_instance_in_network
self.fail("Failed to migrate instance, %s" % e)
File "/usr/local/lib/python2.7/unittest/case.py", line 393, in fail
raise self.failureException(msg)
Failed to migrate instance, Execute cmd: asyncquery failed, due to: {errorcode
: 530, errortext : u'Cannot migrate VM, VM is already presnt on this host,
please specify valid destination host to migrate the VM'}
Observed below error in MS log
-----------------------------------------------
rO9O2ItNksB9HPXXXbDCB5nnnmnast2F-e51Ik24J0-SxLBnsulcBnHJ1GNTKt0rfdZGSmI4YtJuUa2GEJMQ&command=migrateVirtualMachine&signature=8Th9GAOMs0LfB5nUClzYfn9sNSA%3D&response=json
2013-08-14 07:05:13,104 DEBUG [cloud.api.ApiServlet] (catalina-exec-4:null)
===START=== 10.223.240.194 -- GET
signature=J6dWD736KAA3FeQiSIfJD34Y68o%3D&apiKey=o1rO9O2ItNksB9HPXXXbDCB5nnnmnast2F-e51Ik24J0-SxLBnsulcBnH
J1GNTKt0rfdZGSmI4YtJuUa2GEJMQ&command=queryAsyncJobResult&response=json&jobid=64530659-1b4b-4f5a-bf9d-f9ddf2b33000
2013-08-14 07:05:13,126 DEBUG [cloud.api.ApiServlet] (catalina-exec-4:null)
===END=== 10.223.240.194 -- GET
signature=J6dWD736KAA3FeQiSIfJD34Y68o%3D&apiKey=o1rO9O2ItNksB9HPXXXbDCB5nnnmnast2F-e51Ik24J0-SxLBnsulcBnHJ1
GNTKt0rfdZGSmI4YtJuUa2GEJMQ&command=queryAsyncJobResult&response=json&jobid=64530659-1b4b-4f5a-bf9d-f9ddf2b33000
2013-08-14 07:05:13,138 ERROR [cloud.async.AsyncJobManagerImpl]
(Job-Executor-139:job-2319 = [ 64530659-1b4b-4f5a-bf9d-f9ddf2b33000 ])
Unexpected exception while executing
org.apache.cloudstack.api.command.admin.vm.Mi
grateVMCmd
com.cloud.exception.InvalidParameterValueException: Cannot migrate VM, VM is
already presnt on this host, please specify valid destination host to migrate
the VM
at
com.cloud.vm.UserVmManagerImpl.migrateVirtualMachine(UserVmManagerImpl.java:3939)
at
com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
at
org.apache.cloudstack.api.command.admin.vm.MigrateVMCmd.execute(MigrateVMCmd.java:147)
at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:158)
at
com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:531)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
2013-08-14 07:05:13,139 DEBUG [cloud.async.AsyncJobManagerImpl]
(Job-Executor-139:job-2319 = [ 64530659-1b4b-4f5a-bf9d-f9ddf2b33000 ]) Complete
async job-2319 = [ 64530659-1b4b-4f5a-bf9d-f9ddf2b33000 ], jobStatus: 2,
resultCode: 530, result: Error Code: 530 Error text: Cannot migrate VM, VM is
already presnt on this host, please specify valid destination host to migrate
the VM
2013-08-14 07:05:13,534 DEBUG [cloud.network.NetworkManagerImpl]
(Network-Scavenger-1:null) We found network 494 to be free for the first time.
Adding it to the list: 1344217103
2013-08-14 07:05:13,537 DEBUG [cloud.network.NetworkModelImpl]
(Network-Scavenger-1:null) Network id=497 is not ready for GC as it has vms
that are Starting at the moment
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira