Allow cleaning up of networks stuck in Implementing state#12409
Allow cleaning up of networks stuck in Implementing state#12409
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #12409 +/- ##
============================================
+ Coverage 16.21% 16.65% +0.43%
- Complexity 13353 14136 +783
============================================
Files 5657 5660 +3
Lines 498647 520073 +21426
Branches 60533 69103 +8570
============================================
+ Hits 80863 86603 +5740
- Misses 408771 424021 +15250
- Partials 9013 9449 +436
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
DaanHoogland
left a comment
There was a problem hiding this comment.
one nitpit, I would disect cleanupOrphanedNetworks() further as well.
framework/jobs/src/main/java/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
Outdated
Show resolved
Hide resolved
|
@blueorangutan package |
|
@Pearl1594 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. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16600 |
|
@blueorangutan test |
|
@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-15335)
|
|
| sc.addAnd("removed", SearchCriteria.Op.NULL); | ||
| List<NetworkVO> implementingNetworks = networkDao.search(sc, null); | ||
|
|
||
| if (implementingNetworks == null || implementingNetworks.isEmpty()) { |
There was a problem hiding this comment.
| if (implementingNetworks == null || implementingNetworks.isEmpty()) { | |
| if (CollectionUtils.isEmpty(implementingNetworks)) { |
| List<AsyncJobVO> jobs = _jobDao.findInstancePendingAsyncJobs("Network", network.getAccountId()); | ||
| boolean hasActiveJob = false; | ||
| for (AsyncJobVO job : jobs) { | ||
| if (job.getInstanceId() != null && job.getInstanceId().equals(network.getId())) { |
There was a problem hiding this comment.
can pass these checks to jobDao and find the active job?


Description
This PR fixes: #12249
This PR allows cleanup of Networks that have been stuck in Implementing state for more than the
job.expire.minutessetting and has no async jobs associated.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?