Enable account settings to be visible under domain settings#4215
Enable account settings to be visible under domain settings#4215DaanHoogland merged 2 commits intoapache:mainfrom
Conversation
|
This quite a functional change @ravening . I like your idea that the setting system should be hierarchical and agree, but it just isn't designed this way. the same issue exists in zone-pod-cluster-host. |
I am enabling only account settings for domain and not the other way around. Also there are two global settings to control this.
The code is not making domain settings visible under account If the (1)st global setting is true then you can configure value under a domain and all accounts will see that value. If its disabled then account will get value from global setting. I didnt test it for ldap linked domains |
|
tnx @ravening, I'm still not sure if the bear i see on the road is a phantom or real. Your explanation is very clear though. |
do you think this will break something? |
So far the only thing i can think of is that people will get the idea that domain level settings would do anything on accounts. This may be misleading. |
…omain settings
… under domain settings" This reverts commit 0ecdaeb.
c702e6f to
b4a3f92
Compare
b4a3f92 to
32e3d08
Compare
065782e to
1ed6637
Compare
|
Packaging result: ✔️ centos7 ✖️ centos8 ✔️ debian. SL-JID 215 |
|
Trillian Build Failed (tid-238) |
|
Packaging result: ✔️ centos7 ✔️ centos8 ✔️ debian. SL-JID 241 |
|
Trillian test result (tid-250)
|
|
Trillian test result (tid-257)
|
DaanHoogland
left a comment
There was a problem hiding this comment.
two style-ish comments, otherwise looks good.
Also I made some functional comments before, but don't consider those serious.
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
Outdated
Show resolved
Hide resolved
| public String getConfigValue(long id, ConfigKey<?> key) { | ||
| DomainDetailVO vo = findDetail(id, key.key()); | ||
| DomainDetailVO vo = null; | ||
| String enableDomainSettingsForChildDomain = _configDao.getValue("enable.domain.settings.for.child.domain"); |
There was a problem hiding this comment.
this string should probably come from some static final as now it is encoded twice (at least)
|
ping @ravening can you address any outstanding remarks, thanks |
|
Ping @ravening |
|
@ravening could you please fix the conflicts ? |
|
ping @ravening can you fix the conflicting files. |
|
Ping @ravening |
1ed6637 to
0ea0465
Compare
|
@rhtyd @weizhouapache done. sorry for the delay |
|
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1249 |
|
Ping @ravening can you fix conflicts? |
|
Hi @ravening can you resolve conflicts. |
All the account settings can't be configured under domain level settings right now. By default, if account setting is not configured then its value will be taken from global setting. Add a global setting "enable.account.settings.for.domain" so that if its enabled then all the account level settings will be visible under domain levelsettings also. If account level setting is configured then that value will be considered else it will take domain scope value. If domain scope value is not configured then it will pick it up from global setting. If domain level setting is not configured then by default the value will be taken from global setting Add another global setting "enable.domain.settings.for.child.domain" so that when its true, if a value for domain setting is not configured then its parent domain value is considered until it reaches ROOT domain. If no value is configured till ROOT domain then global setting value will be taken. Also display all the settings configured under the domain level in list domains api response
3f33af4 to
bca8556
Compare
|
@blueorangutan package |
|
@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖️ el7 ✖️ el8 ✖️ debian ✖️ suse15. SL-JID 1345 |
|
@blueorangutan package |
|
@sureshanaparti a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1372 |
|
@blueorangutan test |
|
@sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian Build Failed (tid-2190) |
|
@blueorangutan test |
|
@sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2192)
|
borisstoyanov
left a comment
There was a problem hiding this comment.

hi @ravening, I cannot see domain settings as domain admin, you've tagged this PR in a separate issue mentioning it'll fix it or did I get this wrong?
@borisstoyanov it is addressed in PR #4339 |
|
@borisstoyanov have you set this setting to true? |
|
@ravening yes I did, looks like it's addressed in a separate PR, thanks. Will test this one later today. |
@borisstoyanov its supposed to be enabled in this pr itself. not sure why its not showing up. can you try hard refresh? |
borisstoyanov
left a comment
There was a problem hiding this comment.
LGTM, manually tested
Description
All the account settings can't be configured under domain
level settings right now.
By default, if account setting is not configured then
its value will be taken from global setting.
Add a global setting "enable.account.settings.for.domain"
so that if its enabled then all the account level settings
will be visible under domain levelsettings also.
If account level setting is configured then that value will
be considered else it will take domain scope value. If
domain scope value is not configured then it will pick
it up from global setting.
If domain level setting is not configured then by default
the value will be taken from global setting
Add another global setting "enable.domain.settings.for.child.domain"
so that when its true, if a value for domain setting is not
configured then its parent domain value is considered until
it reaches ROOT domain. If no value is configured till ROOT
domain then global setting value will be taken.
Also display all the settings configured under the domain level
in list domains api response
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
This has been tested both from UI and cloudmonkey api
Cretae a domain relationship like
ROOT -> test1 -> test11
setting "enable.account.settings.for.domain" to false
The below output should not display config value
After setting enable.account.settings.for.domain to true and set global value to f2d9-3803-4af-b84-96a369
The value should be of global setting value
Assign different value for router.service.offering to domain test1 which is parent of test11
set the value of router.service.offering of domain "test1" to fca42701-6d28-4bc4-8c14-896d0878d07e
setting "enable.account.settings.for.domain" to true
The value should still point to global setting
Now change the value of enable.domain.settings.for.child.domain to true
It should be display the value of test1 domain instead of global setting
All the settings enabled under domain will be displayed in list domains response
Running integration test cases