Repository navigation
server: return the scoped value from a scoped updateConfiguration - #14641
Open
bhouse-nexthop wants to merge 1 commit into
Open
bhouse-nexthop wants to merge 1 commit into
bhouse-nexthop wants to merge 1 commit into
Conversation
updateConfiguration returned the global configuration row, and since the response value is now taken from that row, a zone, cluster, storage pool, account, domain, image store or management server scoped update answered with the global value, not the value just set. When a scope is given, report the value set in that scope. Signed-off-by: Brad House <[email protected]>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #14641 +/- ##
=========================================
Coverage 20.78% 20.78%
- Complexity 21927 21936 +9
=========================================
Files 6496 6496
Lines 591657 591660 +3
Branches 72592 72593 +1
=========================================
+ Hits 122955 123004 +49
+ Misses 455356 455297 -59
- Partials 13346 13359 +13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
updateConfigurationwith a scope id returned the global value of the setting in its response, not the value that was just set. The scoped value itself was stored correctly.ConfigurationManagerImpl.updateConfiguration(UpdateCfgCmd)returns_configDao.findByName(name), the globalconfigurationrow. Since #11770,UpdateCfgCmd.setResponseValue()takes the response value from that object rather than from the request, so a scoped update answered with the global value.When a scope is given, the returned object now carries the value set in that scope. That value is the one the inner
updateConfiguration(...)returns, after normalization. The object is only used to build the response and is not persisted. Updates without a scope are unchanged.This only affects main. 4.22 still echoes the value from the request.
Fixes #14638
Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
How Has This Been Tested?
Unit tests in
ConfigurationManagerImplTest:updateConfigurationWithScopeReturnsValueSetInScope: a cluster-scoped update ofdrs.algorithmtocondensed, with a global value ofbalanced, returnscondensed. It fails without the fix (expected:<condensed> but was:<balanced>).updateConfigurationWithoutScopeReturnsConfigurationRowUnchanged: a global update returns theconfigurationrow as it was, and doesn't change its value.ConfigurationManagerImplTest,ConfigurationManagerTestand bothUpdateCfgCmdTestclasses pass.The bug was found on a lab build of main. A cluster-scoped
drs.algorithmupdate answered with the global value, whilelistConfigurationswith the sameclusteridshowed the new one. The fix hasn't been run in the lab yet.How did you try to break this feature and the system with this change?
ConfigurationVO.setValue()encrypts andgetValue()decrypts, andUpdateCfgCmdencrypts the value again for the response, as before.