Skip to content

Conversation

sudhansu7
Copy link

A delay of 1 sec has been introduced in SSHHelper Class. This is a fail safe code. Removing this will improves the performance of deployVm by 4 sec, createFirewallRule by 1 sec and createPortForwardingRule by 1 sec.

We have not faced any issues after removing the delay. This was introduced when we were using older version of Trilead library.

@remibergsma
Copy link
Contributor

remibergsma commented Mar 25, 2017

@sudhansu7 Thanks for the fix. We need to update the unit test as well.

Please check:

diff --git a/utils/src/test/java/com/cloud/utils/ssh/SshHelperTest.java b/utils/src/test/java/com/cloud/utils/ssh/SshHelperTest.java
index c7282c426..b9b7213c8 100644
--- a/utils/src/test/java/com/cloud/utils/ssh/SshHelperTest.java
+++ b/utils/src/test/java/com/cloud/utils/ssh/SshHelperTest.java
@@ -126,6 +126,5 @@ public class SshHelperTest {
         Mockito.verify(conn).openSession();

         PowerMockito.verifyStatic();
-        Thread.sleep(Mockito.anyLong());
     }
 }

Test openConnectionSessionTest passes again for me after above change.

…eateFirewallRule, createPortForwardingRule

removed 1 sec sleep in SSHHelper.
@sudhansu7
Copy link
Author

@remibergsma Added suggested changes.

@SudharmaJain
Copy link
Contributor

LGTM for the code changes.

@sudhansu7
Copy link
Author

tag:mergeready

@cloudmonger
Copy link

ACS CI BVT Run

Sumarry:
Build Number 786
Hypervisor xenserver
NetworkType Advanced
Passed=107
Failed=3
Skipped=12

Link to logs Folder (search by build_no): https://www.dropbox.com/sh/r2si930m8xxzavs/AAAzNrnoF1fC3auFrvsKo_8-a?dl=0

Failed tests:

  • test_router_dns.py

  • test_router_dns_guestipquery Failed

  • test_list_ids_parameter.py

  • ContextSuite context=TestListIdsParams>:setup Failing since 24 runs

  • test_routers_network_ops.py

  • test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false Failed

Skipped tests:
test_vm_nic_adapter_vmxnet3
test_01_verify_libvirt
test_02_verify_libvirt_after_restart
test_03_verify_libvirt_attach_disk
test_04_verify_guest_lspci
test_05_change_vm_ostype_restart
test_06_verify_guest_lspci_again
test_static_role_account_acls
test_11_ss_nfs_version_on_ssvm
test_nested_virtualization_vmware
test_3d_gpu_support
test_deploy_vgpu_enabled_vm

Passed test suits:
test_deploy_vm_with_userdata.py
test_affinity_groups_projects.py
test_portable_publicip.py
test_vm_snapshots.py
test_over_provisioning.py
test_global_settings.py
test_scale_vm.py
test_service_offerings.py
test_routers_iptables_default_policy.py
test_loadbalance.py
test_routers.py
test_reset_vm_on_reboot.py
test_deploy_vms_with_varied_deploymentplanners.py
test_network.py
test_non_contigiousvlan.py
test_login.py
test_deploy_vm_iso.py
test_public_ip_range.py
test_multipleips_per_nic.py
test_metrics_api.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

@karuturi karuturi merged commit 8f2ed7b into apache:master Jun 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants