Skip to content

feat(admin): Add default TLS for dump-config LS-380#770

Open
rolysr wants to merge 1 commit intodevfrom
add-tls-admin-dump-config
Open

feat(admin): Add default TLS for dump-config LS-380#770
rolysr wants to merge 1 commit intodevfrom
add-tls-admin-dump-config

Conversation

@rolysr
Copy link
Collaborator

@rolysr rolysr commented Feb 27, 2026

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.

@gemini-code-assist
Copy link

Summary of Changes

Hello, 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 saunafs-admin dump-config utility by incorporating default values for TLS-related configuration options. This ensures that when configuration is dumped, it consistently reflects the expected TLS settings for metadata servers, chunkservers, and metaloggers, aligning with recent TLS enablement changes in these components.

Highlights

  • TLS Configuration Defaults: Added default entries for "TLS_CERT_FILE", "TLS_KEY_FILE", and "TLS_CA_CERT_FILE" to the defaultOptionsMaster, defaultOptionsShadow, defaultOptionsCS, and defaultOptionsMeta maps in dump_config_command.cc.
  • Test Coverage: Updated test_tls_master_admin_communication.sh to include assertions verifying that the saunafs-admin dump-config output correctly includes the newly added default TLS file options.
Changelog
  • src/admin/dump_config_command.cc
    • Added "TLS_CERT_FILE", "TLS_KEY_FILE", and "TLS_CA_CERT_FILE" with empty string defaults to defaultOptionsMaster.
    • Added "TLS_CERT_FILE", "TLS_KEY_FILE", and "TLS_CA_CERT_FILE" with empty string defaults to defaultOptionsShadow.
    • Added "TLS_CERT_FILE", "TLS_KEY_FILE", and "TLS_CA_CERT_FILE" with empty string defaults to defaultOptionsCS.
    • Added "TLS_CERT_FILE", "TLS_KEY_FILE", and "TLS_CA_CERT_FILE" with empty string defaults to defaultOptionsMeta.
  • tests/test_suites/ShortSystemTests/test_tls_master_admin_communication.sh
    • Added expect_equals checks for "TLS_CERT_FILE: """ in the dump-config output.
    • Added expect_equals checks for "TLS_KEY_FILE: """ in the dump-config output.
    • Added expect_equals checks for "TLS_CA_CERT_FILE: """ in the dump-config output.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

@rolysr
Copy link
Collaborator Author

rolysr commented Feb 27, 2026

@gemini-code-assist review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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.

@rolysr rolysr marked this pull request as ready for review February 27, 2026 16:38
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>
@rolysr rolysr force-pushed the add-tls-admin-dump-config branch from 5b5b162 to 9070dd0 Compare February 27, 2026 23:34
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.

2 participants