-
Notifications
You must be signed in to change notification settings - Fork 72
Load config file less at startup #419
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
Conversation
|
Sorry I forgot to mention the DCO @avery-blanchard ! You can update your commit(s) to have your sign off with |
Signed-off-by: Avery Blanchard <ablancha@redhat.com>
Signed-off-by: Avery Blanchard <ablancha@redhat.com>
84510a4 to
fe89af1
Compare
|
/packit retest-failed |
src/common.rs
Outdated
| /// Returns revocation ip from keylime.conf if env var not present | ||
| fn revocation_ip_get() -> Result<String> { | ||
| config_get_env("general", "receive_revocation_ip", "REVOCATION_IP") | ||
| fn revocation_ip_get(conf_name: &str, conf: &Ini) -> Result<String> { |
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.
These couple of functions (revocation_ip_get and revocation_port_get) are not used anywhere. We could use them in KeylimeConfig::build or perhaps just remove the functions.
fe89af1 to
611bd51
Compare
|
Thanks @avery-blanchard ! Pretty much LGTM. One nit: In your last commit (removing the two extra functions), you're also including some changes to make |
…ange String to &str. Signed-off-by: Avery Blanchard <ablancha@redhat.com>
This fixes #390 and reduces the number of times the configuration file is loaded during startup. To achieve this, the opened Ini object is passed around rather than being opened with each call to config_get or config_get_env.
@lkatalin