-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Enable backup framework when the config 'backup.framework.enabled' is set to true in Zone scope and not in Global setting #11567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.20
Are you sure you want to change the base?
Changes from all commits
fe996d6
4af74e6
1543511
878aa4c
2dffcda
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -947,7 +947,7 @@ public boolean configure(String name, Map<String, Object> params) throws Configu | |
} | ||
|
||
sureshanaparti marked this conversation as resolved.
Show resolved
Hide resolved
|
||
public boolean isDisabled(final Long zoneId) { | ||
return !(BackupFrameworkEnabled.value() && BackupFrameworkEnabled.valueIn(zoneId)); | ||
return !(BackupFrameworkEnabled.valueIn(zoneId)); | ||
} | ||
|
||
private void validateForZone(final Long zoneId) { | ||
|
@@ -980,7 +980,7 @@ public BackupProvider getBackupProvider(final String name) { | |
@Override | ||
public List<Class<?>> getCommands() { | ||
final List<Class<?>> cmdList = new ArrayList<Class<?>>(); | ||
if (!BackupFrameworkEnabled.value()) { | ||
if (!BackupFrameworkEnabled.value() && !BackupFrameworkEnabled.hasValueInScope(Boolean.TRUE.toString())) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should not restrict/allow API access based on the zone config value. It might break UI/clients. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @shwstppr it doesn't restrict API access. it allows API access if it is enabled in global or in any zone (not mandatory to enable in global scope). previously, enabling at global level is mandatory for API access. |
||
return cmdList; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For Global scope value() is good enough, right?
why do we need this code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abh1sar some earlier config keys are not part of config framework, so these are fetched directly from the db. it's the same with the current method getConfigStringValueInternal() as well.