Skip to content
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

Create RCP10 #17

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Create RCP10 #17

wants to merge 4 commits into from

Conversation

therealbill
Copy link
Contributor

An RCP to add two new sub-commands to CONFIG for better admin and issue reporting capabilities. This fulfills issue #16

`CONFIG DIFF`: Returns a list of config directives which are not the defaults.
Other than returning just the changed values it should behave and repsond like
a `CONFIG GET *` would.
`CONFIG GET DEFAULTS`: Returns all the *default* values for all config

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • CONFIG GETDEFAULT parameter could be a better alternative as it follows the idea behind CONFIG GET parameter IMHO
  • 👍 for CONFIG DIFF though

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CONFIG GETDEFAULT would allow for pattern matching, CONFIG GETDEFAULT * thus would be the same as CONFIG GET DEFAULTS

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, good points, but I don't like munging words together, especially as it confuses people when explaining or walking them through something verbally. How about CONFIG DEFAULTS instead? Then we could still do CONFIG DEFAULTS <pattern> for matching.

@itamarhaber
Copy link
Member

Solid and helpful suggestion IMO 👍

Another direction for exploring this is to have each config entry have "fields", and then extend the CONFIG GET command with switches. Ideas for such fields could be:

  • current value
  • source for current (e.g. default, conf file, command line switch of the server, or runtime changes such as CONFIG SET - the latter perhaps with extended context info)
  • update timestamp
  • default value

The additional CONFIG GET <pattern> switches could be:

  • WITHTIMESTAMP
  • WITHSOURCE
  • DEFAULTS
  • DIFF

This would, however, require changing the RCP's gist to adding new modifiers to the existing subcommand instead of adding two new ones.

@therealbill
Copy link
Contributor Author

@itamarhaber I initially thought about modifying the config get command. But this seems a much simpler route in terms if implementation as well as not overloading the config command. ;)

I do like the timestamp idea for determining when a value was changed. However, alternatively I'd rather see all config set calls logged complete w/values. Perhaps, if not terribly painful to implement, including the client information in the log entry. It would also be able to provide some improvement in access/config logging for those with auditing requirements. Hmm, maybe that deserves it's own RCP.

spelling...
more spelling... how tired was I when I wrote this? ;)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants