Log previous and new value of configuration when reset/update API is called#10769
Log previous and new value of configuration when reset/update API is called#10769DaanHoogland merged 4 commits intoapache:mainfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10769 +/- ##
============================================
+ Coverage 16.40% 16.95% +0.54%
- Complexity 13630 14422 +792
============================================
Files 5705 5719 +14
Lines 503722 531340 +27618
Branches 61034 71603 +10569
============================================
+ Hits 82647 90075 +7428
- Misses 411889 431175 +19286
- Partials 9186 10090 +904
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:
|
|
@blueorangutan package |
|
@shwstppr 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. |
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
Outdated
Show resolved
Hide resolved
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13162 |
1. Change type for scope paramter for method updateConfiguration and validateConfigurationValue 2. Standardize scope variable to be of ConfigKey type and scopeVal as string
|
@blueorangutan package |
|
@sudo87 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 ✔️ debian ✔️ suse15. SL-JID 13168 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-13269)
|
|
@blueorangutan test |
|
@sudo87 a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-13290)
|
|
@sudo87 changes seem to be causing some issues with configuration behaviour. Please check |
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
Show resolved
Hide resolved
|
@blueorangutan package |
|
@sudo87 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 ✔️ debian ✔️ suse15. SL-JID 13400 |
|
@blueorangutan test |
|
@sudo87 a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-13326)
|
borisstoyanov
left a comment
There was a problem hiding this comment.
LGTM
at change:
2025-05-27 13:48:28,627 DEBUG [c.c.a.ApiServlet] (qtp1390913202-20:[ctx-66866e36]) (logid:8c585b80) ===START=== 10.0.3.251 -- GET name=account.cleanup.interval&value=86401&command=updateConfiguration&response=json&sessionkey=utE1RMWP4uWKuF4-zwHxMF02YAA
2025-05-27 13:48:28,627 DEBUG [c.c.a.ApiServlet] (qtp1390913202-20:[ctx-66866e36]) (logid:8c585b80) Two factor authentication is already verified for the user 2, so skipping
2025-05-27 13:48:28,634 DEBUG [c.c.a.ApiServer] (qtp1390913202-20:[ctx-66866e36, ctx-24c069b4]) (logid:8c585b80) CIDRs from which account 'Account [{"accountName":"admin","id":2,"uuid":"a32bf6a3-3afd-11f0-928a-1e00fe0001d8"}]' is allowed to perform API calls: 0.0.0.0/0,::/0
2025-05-27 13:48:28,636 INFO [o.a.c.a.DynamicRoleBasedAPIAccessChecker] (qtp1390913202-20:[ctx-66866e36, ctx-24c069b4]) (logid:8c585b80) Account for user id a32cc71b-3afd-11f0-928a-1e00fe0001d8 is Root Admin or Domain Admin, all APIs are allowed.
2025-05-27 13:48:28,636 DEBUG [o.a.c.a.StaticRoleBasedAPIAccessChecker] (qtp1390913202-20:[ctx-66866e36, ctx-24c069b4]) (logid:8c585b80) RoleService is enabled. We will use it instead of StaticRoleBasedAPIAccessChecker.
2025-05-27 13:48:28,636 DEBUG [o.a.c.r.ApiRateLimitServiceImpl] (qtp1390913202-20:[ctx-66866e36, ctx-24c069b4]) (logid:8c585b80) API rate limiting is disabled. We will not use ApiRateLimitService.
2025-05-27 13:48:28,642 DEBUG [c.c.c.ConfigurationManagerImpl] (qtp1390913202-20:[ctx-66866e36, ctx-24c069b4]) (logid:8c585b80) Not proceeding with configuration [account.cleanup.interval]'s range validation, as it does not have a specified range.
2025-05-27 13:48:28,650 DEBUG [c.c.c.ConfigurationManagerImpl] (qtp1390913202-20:[ctx-66866e36, ctx-24c069b4]) (logid:8c585b80) Config: account.cleanup.interval value is updated from: 86400 to 86401 for scope: Global
2025-05-27 13:48:28,651 WARN [o.a.c.m.w.WebhookServiceImpl] (qtp1390913202-20:[ctx-66866e36, ctx-24c069b4]) (logid:8c585b80) Skipping delivering event Event {"description":"{\"details\":\" Name: account.cleanup.interval New Value: 86401\",\"event\":\"CONFIGURATION.VALUE.EDIT\",\"status\":\"Completed\"}","eventId":null,"eventType":"CONFIGURATION.VALUE.EDIT","eventUuid":null,"resourceType":"Configuration","resourceUUID":null} to any webhook as account ID is missing
2025-05-27 13:48:28,652 WARN [o.a.c.f.e.EventDistributorImpl] (qtp1390913202-20:[ctx-66866e36, ctx-24c069b4]) (logid:8c585b80) Failed to publish event [category: ActionEvent, type: CONFIGURATION.VALUE.EDIT] on bus webhookEventBus
2025-05-27 13:48:28,661 DEBUG [c.c.a.ApiServlet] (qtp1390913202-20:[ctx-66866e36, ctx-24c069b4]) (logid:8c585b80) ===END=== 10.0.3.251 -- GET name=account.cleanup.interval&value=86401&command=updateConfiguration&response=json&sessionkey=utE1RMWP4uWKuF4-zwHxMF02YAA
at reset:
2025-05-27 13:49:07,619 DEBUG [c.c.c.ConfigurationManagerImpl] (qtp1390913202-20:[ctx-8d531200, ctx-f988c6e7]) (logid:49586a24) Config: account.cleanup.interval value is updated from: 86401 to 86400 for scope: Global
2025-05-27 13:49:07,621 WARN [o.a.c.m.w.WebhookServiceImpl] (qtp1390913202-20:[ctx-8d531200, ctx-f988c6e7]) (logid:49586a24) Skipping delivering event Event {"description":"{\"details\":\" Name: account.cleanup.interval New Value: 86400\",\"event\":\"CONFIGURATION.VALUE.EDIT\",\"status\":\"Completed\"}","eventId":null,"eventType":"CONFIGURATION.VALUE.EDIT","eventUuid":null,"resourceType":"Configuration","resourceUUID":null} to any webhook as account ID is missing
|
@blueorangutan package |
|
@shwstppr 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 ✔️ debian ✔️ suse15. SL-JID 13593 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-13464)
|
Description
This PR handles 5th scenario mentioned in #6880
During reset and update configuration, system will log existing and incoming value.
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?