apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
1.83k stars 1.07k forks source link

server: fix additional zones cannot be removed #9261

Closed weizhouapache closed 1 week ago

weizhouapache commented 2 weeks ago

Description

This PR reverts a change in #9212

Got an exception when delete a zone

com.cloud.utils.exception.CloudRuntimeException: The zone cannot be deleted because there are Secondary storages in this zone

Types of changes

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

Bug Severity

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 14.95%. Comparing base (00fe25a) to head (9d9177d). Report is 2 commits behind head on 4.19.

Files Patch % Lines
...dstack/storage/datastore/db/ImageStoreDaoImpl.java 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## 4.19 #9261 +/- ## ========================================== Coverage 14.95% 14.95% Complexity 11017 11017 ========================================== Files 5378 5378 Lines 469935 469935 Branches 59493 58597 -896 ========================================== Hits 70301 70301 Misses 391847 391847 Partials 7787 7787 ``` | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/9261/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/9261/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.29% <ø> (ø)` | | | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/9261/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `15.67% <0.00%> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

DaanHoogland commented 2 weeks ago

I can see how this might fix a regression @weizhouapache , but isn't ZONE the proper Scope for this query logically? It seems like the solution should be in a data repair???

weizhouapache commented 2 weeks ago

I can see how this might fix a regression @weizhouapache , but isn't ZONE the proper Scope for this query logically? It seems like the solution should be in a data repair???

@DaanHoogland if the scope if REGION, it means the image store can be accessed by all zones the method lists

weizhouapache commented 2 weeks ago

@blueorangutan package

blueorangutan commented 2 weeks ago

@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

blueorangutan commented 2 weeks ago

Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 9990

DaanHoogland commented 2 weeks ago

@blueorangutan test

blueorangutan commented 2 weeks ago

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

blueorangutan commented 2 weeks ago

[SF] Trillian Build Failed (tid-10492)

weizhouapache commented 2 weeks ago

@blueorangutan test

blueorangutan commented 2 weeks ago

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

blueorangutan commented 2 weeks ago

[SF] Trillian test result (tid-10494) Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7 Total time taken: 57586 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9261-t10494-kvm-centos7.zip Smoke tests completed. 128 look OK, 3 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_create_pvlan_network Error 0.06 test_pvlan.py
test_02_trigger_shutdown Failure 336.69 test_safe_shutdown.py
test_01_create_redundant_VPC_2tiers_4VMs_4IPs_4PF_ACL Failure 1033.07 test_vpc_redundant.py
test_02_redundant_VPC_default_routes Failure 1205.97 test_vpc_redundant.py
test_05_rvpc_multi_tiers Failure 501.96 test_vpc_redundant.py
test_05_rvpc_multi_tiers Error 501.98 test_vpc_redundant.py