#3157 Add sssctl config-show command
Closed: cloned-to-github 3 years ago by pbrezina. Opened 7 years ago by mzidek.

Add command sssctl config-show to display all configuration options extracted from sssd.conf and snippet files. The command should only show resulting configuration (after merging), not overriden option values.

The below example shows, how the output should look like:

$ sssctl config-show
[sssd]
debug_level (/etc/sssd/sssd.conf) = 10
domains (/etc/sssd/sssd.conf) = example.com
timeout (/etc/sssd/conf.d/01-snip.conf) = 1000
.
.
.
etc.

This will require some changes in libini (currently the resulting configuration object does not contain information about what file each options was extracted from).


Fields changed

description: Add command sssctl config-show to display all configuration options extracted from sssd.conf and snippet files.

The below example shows, how the output should look like:

$ sssctl config-show
[sssd]
debug_level (/etc/sssd/sssd.conf) = 10
domains (/etc/sssd/sssd.conf) = example.com
timeout (/etc/sssd/conf.d/01-snip.conf) = 1000
.
.
.
etc.

This will require some changes in libini (currently the resulting configuration object does not contain information about what file each options was extracted from). => Add command sssctl config-show to display all configuration options extracted from sssd.conf and snippet files. The command should only show resulting configuration (after merging), not overriden option values.

The below example shows, how the output should look like:

$ sssctl config-show
[sssd]
debug_level (/etc/sssd/sssd.conf) = 10
domains (/etc/sssd/sssd.conf) = example.com
timeout (/etc/sssd/conf.d/01-snip.conf) = 1000
.
.
.
etc.

This will require some changes in libini (currently the resulting configuration object does not contain information about what file each options was extracted from).
type: defect => feature

I do not like the idea of keeping more metadata in the configuration object about where each value came from. That approach would make the objects more coupled against the original intent of decoupling them. The whole point of the config object and fileobject separation in libini is to allow config object be completely opaque from the source of the configuration. I would prefer to keep it that way.

To address the issue however libini can be enhanced to do reporting when it is parsing and merging so that if it is invoked with the specific flag it would produce the output requested.
This would mean that ssstrl config-show will invoke ini that will parse and merge files again and generate output on the fly rather than go to the SSSD config database and dump it. Is this acceptable?

Alternatively we can enhance value object to keep track of the originating file but this would be much more work and as I said above would create more coupling.

My intention was to keep the metadata in the value object.

There are several issues with generating the output while parsing is in progress.

  1. The config-show command is supposed to give only the resulting configuration (not options that were overriden, that would just confuse the users). So we would need to generate the output inside some structure and depending on the flags that handle conflicts (both during parsing and merging) we would either replace old entries in the structure or add new ones. This IMO adds too much unnecessary new code, because the value objects are already updated based in the flags as needed.

  2. The added metadata is supposed to be used not only in config-show, but also in the validators (config-check) to enhance reporting of found errors. The validators use the already parsed and merged configuration. The reason why it needs the whole configuration is that we plan to add more complex checks in the future that are supposed to detect things like bad combinations of options and this can not be done before the parsing and merging is done.

Does it make sense?

It makes sense but I am not happy :-).

I will prepare a short design page for this feature and maybe a better alternative will emerge from the design review process.

Fields changed

milestone: NEEDS_TRIAGE => SSSD 1.15 Beta

Fields changed

owner: somebody => mzidek

Fields changed

rhbz: => todo

Fields changed

blocking: => 1386

Metadata Update from @mzidek:
- Issue assigned to mzidek
- Issue marked as blocked by: #1386
- Issue marked as blocked by: #3158
- Issue set to the milestone: SSSD 1.15.3

7 years ago

Metadata Update from @jhrozek:
- Custom field design_review reset (from 0)
- Custom field mark reset (from 0)
- Custom field patch reset (from 0)
- Custom field review reset (from 0)
- Custom field sensitive reset (from 0)
- Custom field testsupdated reset (from 0)
- Issue unmarked as depending on: #1386
- Issue unmarked as depending on: #3158
- Issue marked as blocking: #1386

6 years ago

Metadata Update from @jhrozek:
- Custom field blocking reset (from 1386)
- Custom field design_review reset (from false)
- Custom field mark reset (from false)
- Custom field patch reset (from false)
- Custom field review reset (from false)
- Custom field sensitive reset (from false)
- Custom field testsupdated reset (from false)
- Issue unmarked as blocking: #1386

6 years ago

Metadata Update from @jhrozek:
- Custom field design_review reset (from false)
- Custom field mark reset (from false)
- Custom field patch reset (from false)
- Custom field review reset (from false)
- Custom field sensitive reset (from false)
- Custom field testsupdated reset (from false)
- Issue set to the milestone: SSSD 1.15.4 (was: SSSD 1.15.3)

6 years ago

Metadata Update from @jhrozek:
- Custom field design_review reset (from false)
- Custom field mark reset (from false)
- Custom field patch reset (from false)
- Custom field review reset (from false)
- Custom field sensitive reset (from false)
- Custom field testsupdated reset (from false)
- Issue tagged with: cleanup-future

6 years ago

Metadata Update from @jhrozek:
- Custom field design_review reset (from false)
- Custom field mark reset (from false)
- Custom field patch reset (from false)
- Custom field review reset (from false)
- Custom field sensitive reset (from false)
- Custom field testsupdated reset (from false)
- Issue untagged with: cleanup-future
- Issue set to the milestone: SSSD Future releases (no date set yet) (was: SSSD 1.15.4)

6 years ago

SSSD is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in SSSD's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/SSSD/sssd/issues/4190

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @pbrezina:
- Issue close_status updated to: cloned-to-github
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata