You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "weizhouapache (via GitHub)" <gi...@apache.org> on 2026/05/19 06:54:30 UTC
[PR] framework/spring: throw RuntimeException when fail to start or load a module [cloudstack]
weizhouapache opened a new pull request, #13186:
URL: https://github.com/apache/cloudstack/pull/13186
### Description
This PR fixes the issue that when fail to start cloudstack-management service, there are huge amount of logs which are misleading and difficult to address the root cause.
Steps to reproduce the issue
- use a wrong db username in `/etc/cloudstack/management/db.properties`, for example
```
db.cloud.username=wronguser
```
- restart cloudstack-management service
Prior, there are hundreds of errors like `No bean named 'DefaultConfigResources' available`
```
# grep "No bean named 'DefaultConfigResources' available" /var/log/cloudstack/management/management-server.log |wc -l
372
```
With this change, these errors do not appear. only get few errors like
```
2026-05-19 06:49:17,187 DEBUG [c.c.u.d.T.Transaction] (main:[]) (logid:) Creating default datasource for database: cloud with connection pool lib: hikaricp
2026-05-19 06:49:17,191 DEBUG [c.c.u.d.T.Transaction] (main:[]) (logid:) Creating default datasource for database: cloud_usage with connection pool lib: hikaricp
2026-05-19 06:49:17,194 DEBUG [c.c.u.d.T.Transaction] (main:[]) (logid:) Creating default datasource for database: simulator with connection pool lib: hikaricp
2026-05-19 06:49:17,196 WARN [c.c.u.d.T.Transaction] (main:[]) (logid:) Unable to load db configuration, using defaults with 5 connections. Falling back on assumed datasource on localhost:3306 using username:password=cloud:cloud. Please check your configuration com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
...
```
<!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
<!-- For new features, provide link to FS, dev ML discussion etc. -->
<!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
<!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
<!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
<!-- Fixes: # -->
<!--- ******************************************************************************* -->
<!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
<!--- PLEASE PUT AN 'X' in only **ONE** box -->
<!--- ******************************************************************************* -->
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
- [ ] Build/CI
- [ ] Test (unit or integration test code)
### Feature/Enhancement Scale or Bug Severity
#### Feature/Enhancement Scale
- [ ] Major
- [ ] Minor
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [ ] Minor
- [ ] Trivial
### Screenshots (if appropriate):
### How Has This Been Tested?
<!-- Please describe in detail how you tested your changes. -->
<!-- Include details of your testing environment, and the tests you ran to -->
#### How did you try to break this feature and the system with this change?
<!-- see how your change affects other areas of the code, etc. -->
<!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
--
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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] framework/spring: throw RuntimeException when fail to start or load a module [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13186:
URL: https://github.com/apache/cloudstack/pull/13186#issuecomment-4495625882
<b>[SF] Trillian test result (tid-16108)</b>
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 81163 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13186-t16108-kvm-ol8.zip
Smoke tests completed. 144 look OK, 5 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_vm_backup_create_vm_from_backup | `Failure` | 607.97 | test_backup_recovery_nas.py
test_vm_backup_lifecycle | `Error` | 1.28 | test_backup_recovery_nas.py
ContextSuite context=TestSharedFSLifecycle>:setup | `Error` | 0.00 | test_sharedfs_lifecycle.py
test_10_attachAndDetach_iso | `Failure` | 607.15 | test_vm_life_cycle.py
test_01_create_vm_snapshots | `Failure` | 606.77 | test_vm_snapshots.py
test_02_revert_vm_snapshots | `Failure` | 600.62 | test_vm_snapshots.py
test_03_delete_vm_snapshots | `Failure` | 0.03 | test_vm_snapshots.py
test_01_create_volume | `Failure` | 611.68 | test_volumes.py
test_01_root_volume_encryption | `Failure` | 698.23 | test_volumes.py
test_02_data_volume_encryption | `Failure` | 645.77 | test_volumes.py
test_03_root_and_data_volume_encryption | `Failure` | 670.23 | test_volumes.py
test_02_attach_volume | `Failure` | 1266.77 | test_volumes.py
test_02_attach_volume | `Failure` | 1266.79 | test_volumes.py
test_03_download_attached_volume | `Failure` | 661.17 | test_volumes.py
test_04_delete_attached_volume | `Failure` | 661.96 | test_volumes.py
test_05_detach_volume | `Failure` | 753.92 | test_volumes.py
test_06_download_detached_volume | `Failure` | 845.24 | test_volumes.py
test_07_resize_fail | `Failure` | 656.63 | test_volumes.py
test_08_resize_volume | `Failure` | 666.10 | test_volumes.py
test_09_delete_detached_volume | `Failure` | 659.45 | test_volumes.py
test_10_list_volumes | `Failure` | 656.54 | test_volumes.py
test_11_attach_volume_with_unstarted_vm | `Failure` | 755.65 | test_volumes.py
test_12_resize_volume_with_only_size_parameter | `Failure` | 660.15 | test_volumes.py
test_13_migrate_volume_and_change_offering | `Failure` | 792.32 | test_volumes.py
test_14_delete_volume_delete_protection | `Failure` | 660.70 | test_volumes.py
--
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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] framework/spring: throw RuntimeException when fail to start or load a module [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13186:
URL: https://github.com/apache/cloudstack/pull/13186#issuecomment-4761985148
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18324
--
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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] framework/spring: throw RuntimeException when fail to start or load a module [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13186:
URL: https://github.com/apache/cloudstack/pull/13186#issuecomment-4485576572
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17906
--
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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] framework/spring: throw RuntimeException when fail to start or load a module [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #13186:
URL: https://github.com/apache/cloudstack/pull/13186#issuecomment-4485167943
@blueorangutan package
--
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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] framework/spring: throw RuntimeException when fail to start or load a module [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13186:
URL: https://github.com/apache/cloudstack/pull/13186#issuecomment-4485179354
@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.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] framework/spring: throw RuntimeException when fail to start or load a module [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13186:
URL: https://github.com/apache/cloudstack/pull/13186#issuecomment-4762300647
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
--
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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] framework/spring: throw RuntimeException when fail to start or load a module [cloudstack]
Posted by "winterhazel (via GitHub)" <gi...@apache.org>.
winterhazel commented on code in PR #13186:
URL: https://github.com/apache/cloudstack/pull/13186#discussion_r3267660689
##########
framework/spring/module/src/main/java/org/apache/cloudstack/spring/module/model/impl/DefaultModuleDefinitionSet.java:
##########
@@ -147,10 +148,11 @@ public void with(ModuleDefinition def, Stack<ModuleDefinition> parents) {
logger.debug("Failed to obtain module context: ", e);
}
} catch (BeansException e) {
- logger.warn(String.format("Failed to start module [%s] due to: [%s].", def.getName(), e.getMessage()));
+ logger.warn(String.format("Failed to load module [%s] due to: [%s].", def.getName(), e.getMessage()));
if (logger.isDebugEnabled()) {
- logger.debug(String.format("module start failure of module [%s] was due to: ", def.getName()), e);
+ logger.debug(String.format("module load failure of module [%s] was due to: ", def.getName()), e);
}
Review Comment:
```suggestion
logger.error("Failed to load module [{}] due to:", def.getName(), e));
```
We can change the 1st log from warn to error, as it will result in a startup failure, and remove the 2nd one
--
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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] framework/spring: throw RuntimeException when fail to start or load a module [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13186:
URL: https://github.com/apache/cloudstack/pull/13186#issuecomment-4765424797
<b>[SF] Trillian test result (tid-16383)</b>
Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8
Total time taken: 53206 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13186-t16383-kvm-ol8.zip
Smoke tests completed. 148 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:
Test | Result | Time (s) | Test File
--- | --- | --- | ---
test_01_redundant_vpc_site2site_vpn | `Failure` | 371.35 | test_vpc_vpn.py
--
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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] framework/spring: throw RuntimeException when fail to start or load a module [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13186:
URL: https://github.com/apache/cloudstack/pull/13186#issuecomment-4761767039
@DaanHoogland 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.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] framework/spring: throw RuntimeException when fail to start or load a module [cloudstack]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #13186:
URL: https://github.com/apache/cloudstack/pull/13186#issuecomment-4485239193
## [Codecov](https://app.codecov.io/gh/apache/cloudstack/pull/13186?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 3.69%. Comparing base ([`4a49ffa`](https://app.codecov.io/gh/apache/cloudstack/commit/4a49ffa9aa281b207ca5350ae697c6469be0c367?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`d831f37`](https://app.codecov.io/gh/apache/cloudstack/commit/d831f373b2c97d45db0739cb781ba47e41905cff?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
> :exclamation: There is a different number of reports uploaded between BASE (4a49ffa) and HEAD (d831f37). Click for more details.
>
> <details><summary>HEAD has 1 upload less than BASE</summary>
>
>| Flag | BASE (4a49ffa) | HEAD (d831f37) |
>|------|------|------|
>|unittests|1|0|
></details>
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## 4.22 #13186 +/- ##
=============================================
- Coverage 17.67% 3.69% -13.98%
=============================================
Files 5922 448 -5474
Lines 533123 38105 -495018
Branches 65201 7059 -58142
=============================================
- Hits 94242 1409 -92833
+ Misses 428237 36509 -391728
+ Partials 10644 187 -10457
```
| [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/13186/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/13186/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `3.69% <ø> (ø)` | |
| [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/13186/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
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.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cloudstack/pull/13186?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] framework/spring: throw RuntimeException when fail to start or load a module [cloudstack]
Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #13186:
URL: https://github.com/apache/cloudstack/pull/13186#issuecomment-4485599508
@blueorangutan test
--
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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] framework/spring: throw RuntimeException when fail to start or load a module [cloudstack]
Posted by "winterhazel (via GitHub)" <gi...@apache.org>.
winterhazel commented on code in PR #13186:
URL: https://github.com/apache/cloudstack/pull/13186#discussion_r3267660689
##########
framework/spring/module/src/main/java/org/apache/cloudstack/spring/module/model/impl/DefaultModuleDefinitionSet.java:
##########
@@ -147,10 +148,11 @@ public void with(ModuleDefinition def, Stack<ModuleDefinition> parents) {
logger.debug("Failed to obtain module context: ", e);
}
} catch (BeansException e) {
- logger.warn(String.format("Failed to start module [%s] due to: [%s].", def.getName(), e.getMessage()));
+ logger.warn(String.format("Failed to load module [%s] due to: [%s].", def.getName(), e.getMessage()));
if (logger.isDebugEnabled()) {
- logger.debug(String.format("module start failure of module [%s] was due to: ", def.getName()), e);
+ logger.debug(String.format("module load failure of module [%s] was due to: ", def.getName()), e);
}
Review Comment:
```suggestion
logger.error("Failed to load module [{}] due to: [{}]", def.getName(), e));
```
We can change the 1st log from warn to error, as it will result in a startup failure, and remove the 2nd one
--
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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] framework/spring: throw RuntimeException when fail to start or load a module [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland merged PR #13186:
URL: https://github.com/apache/cloudstack/pull/13186
--
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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] framework/spring: throw RuntimeException when fail to start or load a module [cloudstack]
Posted by "blueorangutan (via GitHub)" <gi...@apache.org>.
blueorangutan commented on PR #13186:
URL: https://github.com/apache/cloudstack/pull/13186#issuecomment-4485607337
@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests
--
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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] framework/spring: throw RuntimeException when fail to start or load a module [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13186:
URL: https://github.com/apache/cloudstack/pull/13186#issuecomment-4761766133
@blueorangutan package
--
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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] framework/spring: throw RuntimeException when fail to start or load a module [cloudstack]
Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on PR #13186:
URL: https://github.com/apache/cloudstack/pull/13186#issuecomment-4762295227
@blueorangutan test
--
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.
To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org