[jira] [Commented] (CLOUDSTACK-7391) [Automation] Fix the script "test_host_high_availability.py" - Error Message: "suitablehost should not be None"

2014-09-15 Thread ASF subversion and git services (JIRA)

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

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

Commit 46c1c1c94969554b3c4c3867fefb64adbff45291 in cloudstack's branch 
refs/heads/master from [~gauravaradhye]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=46c1c1c ]

CLOUDSTACK-7391: Passing virtualmachineid while retrieving suitable hosts for 
migration

Signed-off-by: SrikanteswaraRao Talluri 


> [Automation] Fix the script "test_host_high_availability.py" - Error Message: 
> "suitablehost should not be None"
> ---
>
> Key: CLOUDSTACK-7391
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7391
> Project: CloudStack
>  Issue Type: Test
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Automation, Test
>Affects Versions: 4.5.0
>Reporter: Chandan Purushothama
>Assignee: Gaurav Aradhye
> Fix For: 4.5.0
>
>
> ==
> Client Code:
> ==
> def test_03_cant_migrate_vm_to_host_with_ha_positive(self):
> """ Verify you can not migrate VMs to hosts with an ha.tag (positive) 
> """
> .
> .
> .
> vm = vms[0]
> self.debug("Deployed VM on host: %s" % vm.hostid)
> #Find out a Suitable host for VM migration
> list_hosts_response = list_hosts(
> self.apiclient,  *BUG: Query the list of hosts with vm id. Only 
> then the response will have list of suitable and non-suitable hosts. Else 
> "suitableforMigration" is not returned in the response*
> )
> self.assertEqual(
> isinstance(list_hosts_response, list),
> True,
> "The listHosts API returned the invalid list"
> )
> self.assertNotEqual(
> len(list_hosts_response),
> 0,
> "The listHosts returned nothing."
> )
> suitableHost = None
> for host in list_hosts_response:
> if host.suitableformigration == True and host.hostid != vm.hostid:
> suitableHost = host
> break
> self.assertTrue(suitableHost is not None, "suitablehost should not be 
> None")
> *Error Message: "suitablehost should not be None"*
> {code}
> Cmd : listHosts===
> requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connection 
> (1): 10.220.135.39
> requests.packages.urllib3.connectionpool: DEBUG: "GET 
> /client/api?apiKey=NpffyWZkfwK7gPcNpx28Ohv6K56ftl57A409SyokqHjJ2ZNe3AvvF3F0teTETeIIqrtlcWpQOooM3cQyPveGXw&command=listHosts&response=json&signature=gh2gh3mSzQNAcfMdspqc9v1JE3U%3D
>  HTTP/1.1" 200 3708
> test_03_cant_migrate_vm_to_host_with_ha_positive 
> (integration.component.maint.test_host_high_availability.TestHostHighAvailability):
>  DEBUG: Response : [{name : u's-2-VM', created : u'2014-08-20T04:31:37+', 
> ipaddress : u'10.220.136.107', islocalstorageactive : False, podid : 
> u'027c1e45-5867-40f8-8ad9-685b5eb63dd2', resourcestate : u'Enabled', zoneid : 
> u'f2acfe0c-c8c8-4353-8f97-a3e0f14d6357', state : u'Up', version : 
> u'4.5.0-SNAPSHOT', managementserverid : 231707544610094, podname : 
> u'XenRT-Zone-0-Pod-0', id : u'bb004159-d510-42b4-bfd5-878140a11f78', 
> lastpinged : u'1970-01-16T22:04:57+', type : u'SecondaryStorageVM', 
> events : u'AgentDisconnected; PingTimeout; Remove; ShutdownRequested; 
> AgentConnected; HostDown; ManagementServerDown; Ping; StartAgentRebalance', 
> zonename : u'XenRT-Zone-0'}, {name : u'v-1-VM', created : 
> u'2014-08-20T04:31:37+', ipaddress : u'10.220.136.105', 
> islocalstorageactive : False, podid : 
> u'027c1e45-5867-40f8-8ad9-685b5eb63dd2', resourcestate : u'Enabled', zoneid : 
> u'f2acfe0c-c8c8-4353-8f97-a3e0f14d6357', state : u'Up', version : 
> u'4.5.0-SNAPSHOT', managementserverid : 231707544610094, podname : 
> u'XenRT-Zone-0-Pod-0', id : u'f328a0d1-f4cb-4486-9550-dd46c403c3ed', 
> lastpinged : u'1970-01-16T22:04:57+', type : u'ConsoleProxy', events : 
> u'AgentDisconnected; PingTimeout; Remove; ShutdownRequested; AgentConnected; 
> HostDown; ManagementServerDown; Ping; StartAgentRebalance', zonename : 
> u'XenRT-Zone-0'}, {cpuwithoverprovisioning : u'28800.0', version : 
> u'4.5.0-SNAPSHOT', memorytotal : 31073792896, zoneid : 
> u'f2acfe0c-c8c8-4353-8f97-a3e0f14d6357', cpunumber : 12, managementserverid : 
> 231707544610094, cpuallocated : u'2.08%', memoryused : 4211653, id : 
> u'1f5f180e-3eb1-4a6a-92f8-8df71df57962', cpuused : u'0.03%', 
> hypervisorversion : u'6.2.0', clusterid : 
> u'af55ad36-15c8-424b-916b-db1550aae5ff', capabilities : u'xen-3.0-x86_64 , 
> xen-3.0-x86_32p , hvm-3.0-x86_32 , hvm-3.0

[jira] [Commented] (CLOUDSTACK-7391) [Automation] Fix the script "test_host_high_availability.py" - Error Message: "suitablehost should not be None"

2014-09-04 Thread Sangeetha Hariharan (JIRA)

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

Sangeetha Hariharan commented on CLOUDSTACK-7391:
-

This is an issue with test scripts where listHosts() API call needs to called 
with VM id , so that the "suitableformigration" parameter is set to "true" for 
hosts.

This is already tracked in https://issues.apache.org/jira/browse/CLOUDSTACK-7391


> [Automation] Fix the script "test_host_high_availability.py" - Error Message: 
> "suitablehost should not be None"
> ---
>
> Key: CLOUDSTACK-7391
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7391
> Project: CloudStack
>  Issue Type: Test
>  Security Level: Public(Anyone can view this level - this is the 
> default.) 
>  Components: Automation, Test
>Affects Versions: 4.5.0
>Reporter: Chandan Purushothama
>Assignee: Gaurav Aradhye
> Fix For: 4.5.0
>
>
> ==
> Client Code:
> ==
> def test_03_cant_migrate_vm_to_host_with_ha_positive(self):
> """ Verify you can not migrate VMs to hosts with an ha.tag (positive) 
> """
> .
> .
> .
> vm = vms[0]
> self.debug("Deployed VM on host: %s" % vm.hostid)
> #Find out a Suitable host for VM migration
> list_hosts_response = list_hosts(
> self.apiclient,  *BUG: Query the list of hosts with vm id. Only 
> then the response will have list of suitable and non-suitable hosts. Else 
> "suitableforMigration" is not returned in the response*
> )
> self.assertEqual(
> isinstance(list_hosts_response, list),
> True,
> "The listHosts API returned the invalid list"
> )
> self.assertNotEqual(
> len(list_hosts_response),
> 0,
> "The listHosts returned nothing."
> )
> suitableHost = None
> for host in list_hosts_response:
> if host.suitableformigration == True and host.hostid != vm.hostid:
> suitableHost = host
> break
> self.assertTrue(suitableHost is not None, "suitablehost should not be 
> None")
> *Error Message: "suitablehost should not be None"*
> {code}
> Cmd : listHosts===
> requests.packages.urllib3.connectionpool: INFO: Starting new HTTP connection 
> (1): 10.220.135.39
> requests.packages.urllib3.connectionpool: DEBUG: "GET 
> /client/api?apiKey=NpffyWZkfwK7gPcNpx28Ohv6K56ftl57A409SyokqHjJ2ZNe3AvvF3F0teTETeIIqrtlcWpQOooM3cQyPveGXw&command=listHosts&response=json&signature=gh2gh3mSzQNAcfMdspqc9v1JE3U%3D
>  HTTP/1.1" 200 3708
> test_03_cant_migrate_vm_to_host_with_ha_positive 
> (integration.component.maint.test_host_high_availability.TestHostHighAvailability):
>  DEBUG: Response : [{name : u's-2-VM', created : u'2014-08-20T04:31:37+', 
> ipaddress : u'10.220.136.107', islocalstorageactive : False, podid : 
> u'027c1e45-5867-40f8-8ad9-685b5eb63dd2', resourcestate : u'Enabled', zoneid : 
> u'f2acfe0c-c8c8-4353-8f97-a3e0f14d6357', state : u'Up', version : 
> u'4.5.0-SNAPSHOT', managementserverid : 231707544610094, podname : 
> u'XenRT-Zone-0-Pod-0', id : u'bb004159-d510-42b4-bfd5-878140a11f78', 
> lastpinged : u'1970-01-16T22:04:57+', type : u'SecondaryStorageVM', 
> events : u'AgentDisconnected; PingTimeout; Remove; ShutdownRequested; 
> AgentConnected; HostDown; ManagementServerDown; Ping; StartAgentRebalance', 
> zonename : u'XenRT-Zone-0'}, {name : u'v-1-VM', created : 
> u'2014-08-20T04:31:37+', ipaddress : u'10.220.136.105', 
> islocalstorageactive : False, podid : 
> u'027c1e45-5867-40f8-8ad9-685b5eb63dd2', resourcestate : u'Enabled', zoneid : 
> u'f2acfe0c-c8c8-4353-8f97-a3e0f14d6357', state : u'Up', version : 
> u'4.5.0-SNAPSHOT', managementserverid : 231707544610094, podname : 
> u'XenRT-Zone-0-Pod-0', id : u'f328a0d1-f4cb-4486-9550-dd46c403c3ed', 
> lastpinged : u'1970-01-16T22:04:57+', type : u'ConsoleProxy', events : 
> u'AgentDisconnected; PingTimeout; Remove; ShutdownRequested; AgentConnected; 
> HostDown; ManagementServerDown; Ping; StartAgentRebalance', zonename : 
> u'XenRT-Zone-0'}, {cpuwithoverprovisioning : u'28800.0', version : 
> u'4.5.0-SNAPSHOT', memorytotal : 31073792896, zoneid : 
> u'f2acfe0c-c8c8-4353-8f97-a3e0f14d6357', cpunumber : 12, managementserverid : 
> 231707544610094, cpuallocated : u'2.08%', memoryused : 4211653, id : 
> u'1f5f180e-3eb1-4a6a-92f8-8df71df57962', cpuused : u'0.03%', 
> hypervisorversion : u'6.2.0', clusterid : 
> u'af55ad36-15c8-424b-916b-db1550aae5ff', capabilities : u'xen-3.0-x86_64 , 
> xen-3.0-x86_32p , hvm-3.0-x86_32 , hvm-3.0-x86_32p , hvm-3.0-x86_64', state : 
> u'Up', memoryallocated : 268435456, networkkbswrite