Skip to content

feat: add --fsid and --config to cephadm commands#198

Open
jackhodgkiss wants to merge 2 commits into
masterfrom
fsid-config-cmd
Open

feat: add --fsid and --config to cephadm commands#198
jackhodgkiss wants to merge 2 commits into
masterfrom
fsid-config-cmd

Conversation

@jackhodgkiss

Copy link
Copy Markdown
Contributor

It has been noticed that if you add --fsid and --config it can speed up the time to execute commands as it avoids having to look up this information.

Before

Wednesday 11 March 2026  08:50:17 +0000 (0:04:49.900)       0:04:49.979 *******
===============================================================================
stackhpc.cephadm.commands : Execute custom commands ------------------------------------------------------------------- 289.90s

After

Wednesday 11 March 2026  09:13:41 +0000 (0:01:52.667)       0:01:52.742 *******
===============================================================================
stackhpc.cephadm.commands : Execute custom commands ------------------------------------------------------------------- 112.67s

@gemini-code-assist

Copy link
Copy Markdown

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 optimizes the execution of cephadm commands within Ansible playbooks by conditionally passing the --fsid and --config arguments. This change aims to improve command responsiveness and overall automation efficiency by providing explicit cluster identification and configuration paths, thereby bypassing potentially time-consuming discovery processes. The modifications are integrated into various Cephadm-related tasks to ensure consistent performance gains.

Highlights

  • Performance Improvement: Introduced conditional --fsid and --config parameters to cephadm shell commands to significantly reduce execution times by avoiding cluster identification lookups.
  • Ansible Role Updates: Applied these performance enhancements across multiple Ansible roles, including bootstrap, osds, and commands, ensuring broader impact.
  • New Configuration Variable: Added a new default variable cephadm_fsid to allow explicit specification of the Ceph cluster filesystem ID.
Changelog
  • roles/cephadm/tasks/bootstrap.yml
    • Updated cephadm shell commands for setting public network, cluster network, HAProxy image, and Keepalived image to conditionally include --fsid and --config arguments.
    • Modified the ceph orch apply command to also conditionally include these arguments.
  • roles/cephadm/tasks/osds.yml
    • Modified the cephadm shell command for adding individual OSDs to conditionally pass --fsid and --config.
  • roles/cephadm/tasks/osds_spec.yml
    • Updated the cephadm shell command for applying OSDs spec to conditionally include --fsid and --config arguments.
  • roles/commands/defaults/main.yml
    • Added cephadm_fsid as a new default variable, initialized to an empty string.
  • roles/commands/tasks/main.yml
    • Modified the cephadm shell command for executing custom commands to conditionally include --fsid and --config arguments.
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.

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

Copy link
Copy Markdown

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 aims to speed up cephadm commands by adding --fsid and --config flags. While the intention is good and the performance benefit is clear, the implementation introduces significant code duplication across multiple files. I've suggested refactoring this repeated logic into a variable for better maintainability. Additionally, there's a syntax issue in one of the YAML files where a multi-line string is used for a command, which will likely cause it to fail. I've provided a fix for that.

Comment thread roles/commands/tasks/main.yml Outdated
Comment thread roles/cephadm/tasks/bootstrap.yml Outdated
@jackhodgkiss jackhodgkiss force-pushed the fsid-config-cmd branch 4 times, most recently from 50a83cb to cde13f9 Compare March 13, 2026 16:40
@jackhodgkiss jackhodgkiss force-pushed the fsid-config-cmd branch 2 times, most recently from fa997cf to cf12f1f Compare April 16, 2026 16:21
@jackhodgkiss jackhodgkiss marked this pull request as ready for review April 16, 2026 16:32
@jackhodgkiss jackhodgkiss requested a review from a team as a code owner April 16, 2026 16:32
technowhizz
technowhizz previously approved these changes Apr 23, 2026

@technowhizz technowhizz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tried this and it sped things up. Thanks Jack!

It has been noticed that if you add `--fsid` and `--config` it can speed
up the time to execute commands as it avoids having to look up this
information.

Signed-off-by: Jack Hodgkiss <jack@stackhpc.com>
@jackhodgkiss jackhodgkiss changed the base branch from master to bump-requires-ansible May 12, 2026 13:56
@jackhodgkiss jackhodgkiss force-pushed the bump-requires-ansible branch from eea0801 to bdfc3c6 Compare May 12, 2026 14:53
Base automatically changed from bump-requires-ansible to master May 18, 2026 09:10
@jackhodgkiss jackhodgkiss added this to the v1.3 Release milestone Jun 1, 2026
@cityofships cityofships self-assigned this Jun 12, 2026
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.

3 participants