You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/01/31 19:11:33 UTC

[GitHub] [cloudstack] nvazquez opened a new issue #3858: findHostsForMigration API returns an empty/incomplete host list

nvazquez opened a new issue #3858: findHostsForMigration API returns an empty/incomplete host list
URL: https://github.com/apache/cloudstack/issues/3858
 
 
   ##### ISSUE TYPE
   
    * Bug Report
   
   ##### COMPONENT NAME
   ~~~
   API, UI
   ~~~
   
   ##### CLOUDSTACK VERSION
   ~~~
   4.11.2, 4.13
   ~~~
   
   ##### CONFIGURATION
   N/A
   
   ##### OS / ENVIRONMENT
   Environment with multiple Vmware hosts
   
   ##### SUMMARY
   Invoking the 'findHostsForMigration' API returns an empty list or incomplete list of hosts.
   
   There are some cases in big environments in which the UI or API does not retrieve hosts on the findHostsForMigration API. 
   
   Looking at the implementation and enabling TRACE on the management server logs:
   
   - When keyword is not passed: 
   ````
   020-01-31 16:44:22,387 TRACE [c.c.u.d.T.Statement] (qtp1213349904-288:ctx-511ad0c7 ctx-217dbc2e) (logid:aa340f83) Preparing: SELECT COUNT(*) FROM host WHERE host.type LIKE ?  AND host.data_center_id = ?  AND host.hypervisor_type = ?  AND host.hypervisor_version >= ?   AND host.removed IS NULL 
   2020-01-31 16:44:22,387 TRACE [c.c.u.d.T.Statement] (qtp1213349904-288:ctx-511ad0c7 ctx-217dbc2e) (logid:aa340f83) Closing: com.mysql.jdbc.JDBC4PreparedStatement@1eb4c682: SELECT host.id, host.disconnected, host.name, host.status, host.type, host.private_ip_address, host.private_mac_address, host.private_netmask, host.public_netmask, host.public_ip_address, host.public_mac_address, host.storage_ip_address, host.cluster_id, host.storage_netmask, host.storage_mac_address, host.storage_ip_address_2, host.storage_netmask_2, host.storage_mac_address_2, host.hypervisor_type, host.proxy_port, host.resource, host.fs_type, host.available, host.setup, host.resource_state, host.hypervisor_version, host.update_count, host.uuid, host.data_center_id, host.pod_id, host.cpu_sockets, host.cpus, host.url, host.speed, host.ram, host.parent, host.guid, host.capabilities, host.total_size, host.last_ping, host.mgmt_server_id, host.dom0_memory, host.version, host.created, host.removed FROM host WHERE host.type LIKE '%Routing'  AND host.data_center_id = 7  AND host.hypervisor_type = 'VMware'  AND host.hypervisor_version >= _binary'6.5'  AND host.removed IS NULL  ORDER BY host.id ASC  LIMIT 0, 20
   ````
   
   - When providing a keyword:
   ````
   020-01-31 16:44:22,387 TRACE [c.c.u.d.T.Statement] (qtp1213349904-288:ctx-511ad0c7 ctx-217dbc2e) (logid:aa340f83) Preparing: SELECT COUNT(*) FROM host WHERE host.type LIKE ?  AND host.data_center_id = ?  AND host.hypervisor_type = ?  AND host.hypervisor_version >= ?  AND  (host.name LIKE ?  OR host.status LIKE ?  OR host.type LIKE ? )  AND host.removed IS NULL 
   2020-01-31 16:44:22,387 TRACE [c.c.u.d.T.Statement] (qtp1213349904-288:ctx-511ad0c7 ctx-217dbc2e) (logid:aa340f83) Closing: com.mysql.jdbc.JDBC4PreparedStatement@1eb4c682: SELECT host.id, host.disconnected, host.name, host.status, host.type, host.private_ip_address, host.private_mac_address, host.private_netmask, host.public_netmask, host.public_ip_address, host.public_mac_address, host.storage_ip_address, host.cluster_id, host.storage_netmask, host.storage_mac_address, host.storage_ip_address_2, host.storage_netmask_2, host.storage_mac_address_2, host.hypervisor_type, host.proxy_port, host.resource, host.fs_type, host.available, host.setup, host.resource_state, host.hypervisor_version, host.update_count, host.uuid, host.data_center_id, host.pod_id, host.cpu_sockets, host.cpus, host.url, host.speed, host.ram, host.parent, host.guid, host.capabilities, host.total_size, host.last_ping, host.mgmt_server_id, host.dom0_memory, host.version, host.created, host.removed FROM host WHERE host.type LIKE '%Routing'  AND host.data_center_id = 7  AND host.hypervisor_type = 'VMware'  AND host.hypervisor_version >= _binary'6.5'  AND  (host.name LIKE _binary'%qt%'  OR host.status LIKE '%qt%'  OR host.type LIKE '%qt%' )  AND host.removed IS NULL  ORDER BY host.id ASC  LIMIT 0, 20
   ````
   
   The issue is that the query is limited to 20 hosts which are ordered by ID. In case the suitable hosts appear after in the list retrieved from these queries, those won't be displayed.
   
   ##### STEPS TO REPRODUCE
   There are 2 possible scenarios:
   - Create VM
   - Click on migrate VM
   - The popup dialog displays an empty list of hosts
   
   Scenario 2: using keyword:
   - Create VM
   - Click on migrate VM
   - Verify no hosts is displayed
   - Enter keyword on the search text field
   - Verify hosts are displayed
   
   ##### EXPECTED RESULTS
   ~~~
   List of hosts indicating suitable/not suitable
   ~~~
   
   ##### ACTUAL RESULTS
   ~~~
   Empty list
   ~~~
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cloudstack] Spaceman1984 edited a comment on issue #3858: findHostsForMigration API returns an empty/incomplete host list

Posted by GitBox <gi...@apache.org>.
Spaceman1984 edited a comment on issue #3858: findHostsForMigration API returns an empty/incomplete host list
URL: https://github.com/apache/cloudstack/issues/3858#issuecomment-591989909
 
 
   Tested in 4.13 and master, not an issue

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cloudstack] rhtyd commented on issue #3858: findHostsForMigration API returns an empty/incomplete host list

Posted by GitBox <gi...@apache.org>.
rhtyd commented on issue #3858: findHostsForMigration API returns an empty/incomplete host list
URL: https://github.com/apache/cloudstack/issues/3858#issuecomment-591852163
 
 
   The pagination issue I think was fixed in #3894 cc @nvazquez @Spaceman1984 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cloudstack] Spaceman1984 edited a comment on issue #3858: findHostsForMigration API returns an empty/incomplete host list

Posted by GitBox <gi...@apache.org>.
Spaceman1984 edited a comment on issue #3858: findHostsForMigration API returns an empty/incomplete host list
URL: https://github.com/apache/cloudstack/issues/3858#issuecomment-591989909
 
 
   Tested in 4.13, not an issue

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [cloudstack] Spaceman1984 commented on issue #3858: findHostsForMigration API returns an empty/incomplete host list

Posted by GitBox <gi...@apache.org>.
Spaceman1984 commented on issue #3858: findHostsForMigration API returns an empty/incomplete host list
URL: https://github.com/apache/cloudstack/issues/3858#issuecomment-591989909
 
 
   Tested in 4.13 and master, not an issue

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services