Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLOUDSTACK-8865: Adding SR doesn't create Storage_pool_host_ref entry… #876

Merged
merged 1 commit into from Sep 21, 2017

Conversation

SudharmaJain
Copy link
Contributor

… for disabled host

This causes VM deployment failure on the host that was disabled while adding the storage repository.
In the attachCluster function of the PrimaryDataStoreLifeCycle, we were only selecting hosts that are up and are in enabled state. Here if we select all up hosts, it will populate the DB properly and will fix this issue.

Also added a unit test for attachCluster function.

@asfbot
Copy link

asfbot commented Sep 23, 2015

cloudstack-pull-rats #702 FAILURE
Looks like there's a problem with this pull request

@asfbot
Copy link

asfbot commented Sep 23, 2015

cloudstack-pull-analysis #652 FAILURE
Looks like there's a problem with this pull request

@asfbot
Copy link

asfbot commented Sep 23, 2015

cloudstack-pull-rats #704 FAILURE
Looks like there's a problem with this pull request

@asfbot
Copy link

asfbot commented Sep 23, 2015

cloudstack-pull-analysis #654 SUCCESS
This pull request looks good

@asfbot
Copy link

asfbot commented Sep 28, 2015

cloudstack-pull-rats #754 FAILURE
Looks like there's a problem with this pull request

@asfbot
Copy link

asfbot commented Sep 28, 2015

cloudstack-pull-analysis #705 ABORTED

@asfbot
Copy link

asfbot commented Sep 30, 2015

cloudstack-pull-rats #773 FAILURE
Looks like there's a problem with this pull request

@asfbot
Copy link

asfbot commented Sep 30, 2015

cloudstack-pull-analysis #725 ABORTED

@@ -2378,6 +2378,23 @@ public boolean maintenanceFailed(final long hostId) {
}

@Override
public List<HostVO> listAllUpHosts(Type type, Long clusterId, Long podId, long dcId) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @SudharmaJain

could you also write an unit test for this new method you created since it brings new functionalities to the code?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping @SudharmaJain , did you see this question?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DaanHoogland This method involves a DB query execution. I don't think this can be achieved in a unit test.

@SudharmaJain
Copy link
Contributor Author

Rebased with master.

@SudharmaJain
Copy link
Contributor Author

@alexandrelimassantana This method is about a query execution on database. Could you suggest how can i add a unit test for it?

@rohityadavcloud
Copy link
Member

@SudharmaJain sorry but can you again please rebase against latest master and push -f, update on status of your PR

I would suggest you can add a marvin test that can be verified against Travis (simulator/mysql) that is more realistic than writing a unit test that mocks tcp stack and/or mysql server

@bvbharatk
Copy link
Contributor

ACS CI BVT Run

Sumarry:
Build Number 104
Hypervisor xenserver
NetworkType Advanced
Passed=70
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_disk_offerings.py

@mrunalinikankariya
Copy link
Contributor

LGTM on the code changes

@PranaliM
Copy link
Contributor

PranaliM commented Mar 31, 2017

Test LGTM based on manual testing:

Steps used for testing the fix:

  1. Added 2 hosts to a cluster
  2. Disabled 1 host
  3. Added a primary Storage
  4. Verified that the mapping for primary Storage was added in the storage_pool_host_ref table for both
    enabled and disabled host.

Before the fix, the entry of primary storage was only added for the host in 'Enabled' state.

@SudharmaJain
Copy link
Contributor Author

@rhtyd As suggested I have added a marvin test case.

@@ -359,7 +359,7 @@ public boolean attachCluster(DataStore store, ClusterScope scope) {

PrimaryDataStoreInfo primarystore = (PrimaryDataStoreInfo) store;
// Check if there is host up in this cluster
List<HostVO> allHosts = _resourceMgr.listAllUpAndEnabledHosts(Host.Type.Routing, primarystore.getClusterId(), primarystore.getPodId(), primarystore.getDataCenterId());
List<HostVO> allHosts = _resourceMgr.listAllUpHosts(Host.Type.Routing, primarystore.getClusterId(), primarystore.getPodId(), primarystore.getDataCenterId());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about hosts which are in maintenance? Do we expect to add an SR to those hosts as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@syed We cannot send commands to the host in maintenance mode. So it is not possible to add an SR to those host.

@SudharmaJain
Copy link
Contributor Author

@karuturi I had rebased the branch.

@SudharmaJain
Copy link
Contributor Author

tag:mergeready

@rohityadavcloud
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✖debian. JID-1060

@rohityadavcloud
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-1473)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 42025 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr876-t1473-kvm-centos7.zip
Intermitten failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Intermitten failure detected: /marvin/tests/smoke/test_iso.py
Intermitten failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermitten failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Intermitten failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Test completed. 57 look OK, 5 have error(s)

Test Result Time (s) Test File
test_01_vpc_remote_access_vpn Failure 50.88 test_vpc_vpn.py
test_05_rvpc_multi_tiers Failure 187.04 test_vpc_redundant.py
test_02_redundant_VPC_default_routes Failure 859.18 test_vpc_redundant.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL Failure 378.88 test_vpc_redundant.py
test_04_rvpc_privategw_static_routes Failure 346.07 test_privategw_acl.py
test_05_iso_permissions Failure 0.06 test_iso.py
test_02_edit_iso Failure 0.06 test_iso.py
test_hostha_enable_ha_when_host_disabled Failure 5.68 test_hostha_kvm.py
test_disable_oobm_ha_state_ineligible Failure 5.83 test_hostha_kvm.py
test_ha_kvm_host_degraded Error 27.55 test_hostha_kvm.py
test_change_service_offering_for_vm_with_snapshots Skipped 0.00 test_vm_snapshots.py
test_09_copy_delete_template Skipped 0.02 test_templates.py
test_06_copy_template Skipped 0.00 test_templates.py
test_static_role_account_acls Skipped 0.02 test_staticroles.py
test_11_ss_nfs_version_on_ssvm Skipped 0.02 test_ssvm.py
test_01_scale_vm Skipped 0.00 test_scale_vm.py
test_01_primary_storage_iscsi Skipped 0.09 test_primary_storage.py
test_vm_nic_adapter_vmxnet3 Skipped 0.00 test_nic_adapter_type.py
test_nested_virtualization_vmware Skipped 0.00 test_nested_virtualization.py
test_06_copy_iso Skipped 0.00 test_iso.py
test_list_ha_for_host_valid Skipped 0.02 test_hostha_simulator.py
test_list_ha_for_host_invalid Skipped 0.02 test_hostha_simulator.py
test_list_ha_for_host Skipped 0.02 test_hostha_simulator.py
test_hostha_enable_feature_without_setting_provider Skipped 0.02 test_hostha_simulator.py
test_hostha_enable_feature_valid Skipped 0.02 test_hostha_simulator.py
test_hostha_disable_feature_valid Skipped 0.02 test_hostha_simulator.py
test_hostha_configure_invalid_provider Skipped 0.02 test_hostha_simulator.py
test_hostha_configure_default_driver Skipped 0.03 test_hostha_simulator.py
test_ha_verify_fsm_recovering Skipped 0.02 test_hostha_simulator.py
test_ha_verify_fsm_fenced Skipped 0.02 test_hostha_simulator.py
test_ha_verify_fsm_degraded Skipped 0.02 test_hostha_simulator.py
test_ha_verify_fsm_available Skipped 0.02 test_hostha_simulator.py
test_ha_multiple_mgmt_server_ownership Skipped 0.03 test_hostha_simulator.py
test_ha_list_providers Skipped 0.02 test_hostha_simulator.py
test_ha_enable_feature_invalid Skipped 0.02 test_hostha_simulator.py
test_ha_disable_feature_invalid Skipped 0.03 test_hostha_simulator.py
test_ha_configure_enabledisable_across_clusterzones Skipped 0.03 test_hostha_simulator.py
test_configure_ha_provider_valid Skipped 0.03 test_hostha_simulator.py
test_configure_ha_provider_invalid Skipped 0.03 test_hostha_simulator.py
test_deploy_vgpu_enabled_vm Skipped 0.04 test_deploy_vgpu_enabled_vm.py
test_3d_gpu_support Skipped 0.04 test_deploy_vgpu_enabled_vm.py

@rohityadavcloud
Copy link
Member

Failures are not related to this PR, test LGTM.
Additional final review requested - @syed @karuturi @mike-tutkowski and others

@mike-tutkowski
Copy link
Member

The idea behind the PR makes sense to me and the code LGTM.

@SudharmaJain
Copy link
Contributor Author

tag:MergeReady

@rohityadavcloud
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1092

@rohityadavcloud
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-1521)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 65410 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr876-t1521-kvm-centos7.zip
Intermitten failure detected: /marvin/tests/smoke/test_internal_lb.py
Intermitten failure detected: /marvin/tests/smoke/test_iso.py
Intermitten failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermitten failure detected: /marvin/tests/smoke/test_routers_network_ops.py
Intermitten failure detected: /marvin/tests/smoke/test_snapshots.py
Intermitten failure detected: /marvin/tests/smoke/test_ssvm.py
Intermitten failure detected: /marvin/tests/smoke/test_templates.py
Intermitten failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Intermitten failure detected: /marvin/tests/smoke/test_volumes.py
Intermitten failure detected: /marvin/tests/smoke/test_vpc_redundant.py
Intermitten failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Test completed. 51 look OK, 11 have error(s)

Test Result Time (s) Test File
test_07_resize_fail Failure 15.31 test_volumes.py
test_10_attachAndDetach_iso Failure 1512.65 test_vm_life_cycle.py
test_09_destroy_ssvm Failure 0.03 test_ssvm.py
test_08_reboot_cpvm Failure 0.03 test_ssvm.py
test_07_reboot_ssvm Failure 0.03 test_ssvm.py
test_06_stop_cpvm Failure 0.03 test_ssvm.py
test_05_stop_ssvm Failure 0.03 test_ssvm.py
test_04_cpvm_internals Failure 0.03 test_ssvm.py
test_03_ssvm_internals Failure 0.03 test_ssvm.py
test_02_list_cpvm_vm Failure 0.03 test_ssvm.py
test_01_list_sec_storage_vm Failure 0.03 test_ssvm.py
test_04_rvpc_privategw_static_routes Failure 365.75 test_privategw_acl.py
test_01_create_iso Failure 1513.38 test_iso.py
ContextSuite context=TestVpcSite2SiteVpn>:setup Error 0.00 test_vpc_vpn.py
ContextSuite context=TestVpcRemoteAccessVpn>:setup Error 0.00 test_vpc_vpn.py
ContextSuite context=TestRVPCSite2SiteVpn>:setup Error 0.00 test_vpc_vpn.py
ContextSuite context=TestVPCRedundancy>:setup Error 0.00 test_vpc_redundant.py
test_06_download_detached_volume Error 20.29 test_volumes.py
test_04_extract_template Error 5.13 test_templates.py
test_03_delete_template Error 5.09 test_templates.py
test_01_create_template Error 45.46 test_templates.py
test_10_destroy_cpvm Error 5.13 test_ssvm.py
ContextSuite context=TestSnapshotRootDisk>:setup Error 0.00 test_snapshots.py
ContextSuite context=TestRedundantIsolateNetworks>:setup Error 1714.37 test_routers_network_ops.py
ContextSuite context=TestISO>:setup Error 3031.92 test_iso.py
ContextSuite context=TestInternalLb>:setup Error 0.00 test_internal_lb.py
test_change_service_offering_for_vm_with_snapshots Skipped 0.00 test_vm_snapshots.py
test_09_copy_delete_template Skipped 0.01 test_templates.py
test_06_copy_template Skipped 0.00 test_templates.py
test_static_role_account_acls Skipped 0.02 test_staticroles.py
test_11_ss_nfs_version_on_ssvm Skipped 0.02 test_ssvm.py
test_01_scale_vm Skipped 0.00 test_scale_vm.py
test_01_primary_storage_iscsi Skipped 0.10 test_primary_storage.py
test_vm_nic_adapter_vmxnet3 Skipped 0.00 test_nic_adapter_type.py
test_nested_virtualization_vmware Skipped 0.00 test_nested_virtualization.py
test_list_ha_for_host_valid Skipped 0.02 test_hostha_simulator.py
test_list_ha_for_host_invalid Skipped 0.02 test_hostha_simulator.py
test_list_ha_for_host Skipped 0.02 test_hostha_simulator.py
test_hostha_enable_feature_without_setting_provider Skipped 0.02 test_hostha_simulator.py
test_hostha_enable_feature_valid Skipped 0.02 test_hostha_simulator.py
test_hostha_disable_feature_valid Skipped 0.02 test_hostha_simulator.py
test_hostha_configure_invalid_provider Skipped 0.02 test_hostha_simulator.py
test_hostha_configure_default_driver Skipped 0.02 test_hostha_simulator.py
test_ha_verify_fsm_recovering Skipped 0.02 test_hostha_simulator.py
test_ha_verify_fsm_fenced Skipped 0.02 test_hostha_simulator.py
test_ha_verify_fsm_degraded Skipped 0.02 test_hostha_simulator.py
test_ha_verify_fsm_available Skipped 0.02 test_hostha_simulator.py
test_ha_multiple_mgmt_server_ownership Skipped 0.02 test_hostha_simulator.py
test_ha_list_providers Skipped 0.04 test_hostha_simulator.py
test_ha_enable_feature_invalid Skipped 0.02 test_hostha_simulator.py
test_ha_disable_feature_invalid Skipped 0.02 test_hostha_simulator.py
test_ha_configure_enabledisable_across_clusterzones Skipped 0.02 test_hostha_simulator.py
test_configure_ha_provider_valid Skipped 0.02 test_hostha_simulator.py
test_configure_ha_provider_invalid Skipped 0.02 test_hostha_simulator.py
test_deploy_vgpu_enabled_vm Skipped 0.03 test_deploy_vgpu_enabled_vm.py
test_3d_gpu_support Skipped 0.03 test_deploy_vgpu_enabled_vm.py

@rohityadavcloud
Copy link
Member

@SudharmaJain please check the failing tests

@SudharmaJain
Copy link
Contributor Author

@rhtyd All the tests failed here, except the skipped ones. Even the listSystemVms command returned response None. Looks like this was a setup issue.

@rohityadavcloud
Copy link
Member

@SudharmaJain I can rekick the tests, will rebuild packages as well
@blueorangutan package

@blueorangutan
Copy link

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1107

@rohityadavcloud
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-1533)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 33526 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr876-t1533-kvm-centos7.zip
Intermitten failure detected: /marvin/tests/smoke/test_privategw_acl.py
Intermitten failure detected: /marvin/tests/smoke/test_ssvm.py
Intermitten failure detected: /marvin/tests/smoke/test_vpc_vpn.py
Test completed. 60 look OK, 2 have error(s)

Test Result Time (s) Test File
test_01_vpc_remote_access_vpn Failure 55.87 test_vpc_vpn.py
test_04_rvpc_privategw_static_routes Failure 375.77 test_privategw_acl.py
test_change_service_offering_for_vm_with_snapshots Skipped 0.00 test_vm_snapshots.py
test_09_copy_delete_template Skipped 0.01 test_templates.py
test_06_copy_template Skipped 0.00 test_templates.py
test_static_role_account_acls Skipped 0.03 test_staticroles.py
test_11_ss_nfs_version_on_ssvm Skipped 0.02 test_ssvm.py
test_01_scale_vm Skipped 0.00 test_scale_vm.py
test_01_primary_storage_iscsi Skipped 0.10 test_primary_storage.py
test_vm_nic_adapter_vmxnet3 Skipped 0.00 test_nic_adapter_type.py
test_nested_virtualization_vmware Skipped 0.00 test_nested_virtualization.py
test_06_copy_iso Skipped 0.00 test_iso.py
test_list_ha_for_host_valid Skipped 0.02 test_hostha_simulator.py
test_list_ha_for_host_invalid Skipped 0.03 test_hostha_simulator.py
test_list_ha_for_host Skipped 0.03 test_hostha_simulator.py
test_hostha_enable_feature_without_setting_provider Skipped 0.02 test_hostha_simulator.py
test_hostha_enable_feature_valid Skipped 0.02 test_hostha_simulator.py
test_hostha_disable_feature_valid Skipped 0.02 test_hostha_simulator.py
test_hostha_configure_invalid_provider Skipped 0.02 test_hostha_simulator.py
test_hostha_configure_default_driver Skipped 0.02 test_hostha_simulator.py
test_ha_verify_fsm_recovering Skipped 0.02 test_hostha_simulator.py
test_ha_verify_fsm_fenced Skipped 0.02 test_hostha_simulator.py
test_ha_verify_fsm_degraded Skipped 0.02 test_hostha_simulator.py
test_ha_verify_fsm_available Skipped 0.02 test_hostha_simulator.py
test_ha_multiple_mgmt_server_ownership Skipped 0.02 test_hostha_simulator.py
test_ha_list_providers Skipped 0.02 test_hostha_simulator.py
test_ha_enable_feature_invalid Skipped 0.02 test_hostha_simulator.py
test_ha_disable_feature_invalid Skipped 0.02 test_hostha_simulator.py
test_ha_configure_enabledisable_across_clusterzones Skipped 0.02 test_hostha_simulator.py
test_configure_ha_provider_valid Skipped 0.02 test_hostha_simulator.py
test_configure_ha_provider_invalid Skipped 0.02 test_hostha_simulator.py
test_deploy_vgpu_enabled_vm Skipped 0.03 test_deploy_vgpu_enabled_vm.py
test_3d_gpu_support Skipped 0.03 test_deploy_vgpu_enabled_vm.py

@rohityadavcloud
Copy link
Member

Okay test LGTM, give this has enough code review/LGTM from others I'll merge this. Thanks.

@rohityadavcloud rohityadavcloud merged commit c670691 into apache:master Sep 21, 2017
rohityadavcloud pushed a commit that referenced this pull request Jan 20, 2021
* Handle redirect to sub menu when click parent menu

* renamed the function

* allow click on menu for desktop

* reset cache path when click menu item without submenu

* Fixes click parent menu with full expanded

* removed the expand submenu block segment

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet