feat(admin): Add default TLS for dump-config LS-380#770
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly introduces default TLS configuration options for various services (master, shadow, chunkservers, and metaloggers) in the dump-config command, and includes appropriate test coverage. The changes align with the goal of making TLS configuration more consistent. There is a low-priority opportunity to improve code maintainability by addressing duplication in the C++ configuration definitions, which can be deferred if not critical for this change.
There was a problem hiding this comment.
Pull request overview
This PR adds default values for TLS configuration options (TLS_CERT_FILE, TLS_KEY_FILE, TLS_CA_CERT_FILE) to the dump-config command in saunafs-admin. Recent changes enabled TLS support in the server binaries, but the dump-config --defaults output was missing these new configuration options.
Changes:
- Added TLS certificate path defaults (empty strings) to all four server type configurations: master, shadow, chunkserver, and metalogger
- Updated test to verify the TLS defaults appear in dump-config output
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/admin/dump_config_command.cc | Added TLS_CERT_FILE, TLS_KEY_FILE, and TLS_CA_CERT_FILE defaults to defaultOptionsMaster, defaultOptionsShadow, defaultOptionsCS, and defaultOptionsMeta maps |
| tests/test_suites/ShortSystemTests/test_tls_master_admin_communication.sh | Added test assertions to verify TLS defaults appear 3 times (once per chunkserver) in dump-config --defaults output |
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request successfully adds default TLS configuration options to the dump-config functionality for various services (master, shadow, chunkservers, and metaloggers). The changes include updating the default option maps in src/admin/dump_config_command.cc and adding corresponding verification steps in tests/test_suites/ShortSystemTests/test_tls_master_admin_communication.sh. While the functionality is correct and tested, there is an opportunity to improve code maintainability by addressing the duplication of TLS option definitions across multiple configuration maps, which aligns with prioritizing simplicity and readability for non-performance-critical code.
Recent changes enabled TLS related configs on metadata servers, chunkservers and metaloggers, but corresponding dump-config function on saunafs-admin binary was not properly updated for handling defaults for these option values when being used. This commit adds those defaults values to be dumped to corresponding binaries for making TLS config addition more consistent. Signed-off-by: Rolando Sánchez Ramos <rolysr@leil.io>
5b5b162 to
9070dd0
Compare
Recent changes enabled TLS related configs on metadata servers, chunkservers and metaloggers, but corresponding dump-config function on saunafs-admin binary was not properly updated for handling defaults for these option values when being used. This commit adds those defaults values to be dumped to corresponding binaries for making TLS config addition more consistent.