-
Notifications
You must be signed in to change notification settings - Fork 136
[linstor] Enable auto-diskful for diskless nodes #1826
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
📝 WalkthroughWalkthroughAdds a conditional block to the linstor cluster template that injects two DRBD properties when enabled, and introduces corresponding default values under Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @kvaps, 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 introduces a significant enhancement to LINSTOR by activating and configuring the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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.
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 enables the auto-diskful feature in LINSTOR by adding the necessary properties to the LinstorCluster configuration. The changes are straightforward and well-described. My feedback focuses on improving the maintainability and flexibility of the Helm chart by parameterizing the new configuration options instead of hardcoding them, which is a common best practice.
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/system/linstor/templates/cluster.yaml (1)
17-20: DRBD options are valid; consider parameterizing via values.yaml for maintainability.The option names and value formats are correct per LINSTOR documentation:
DrbdOptions/auto-diskful: "30"— valid 30-minute threshold (LINSTOR accepts integer minutes)DrbdOptions/auto-diskful-allow-cleanup: "true"— valid boolean value; effect only applies when auto-diskful is setTo align with Helm best practices for the
packages/system/chart pattern, parameterize these values invalues.yamlrather than hardcoding them in the template.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
packages/system/linstor/templates/cluster.yaml
🧰 Additional context used
📓 Path-based instructions (2)
packages/system/**
📄 CodeRabbit inference engine (AGENTS.md)
Use Helm Chart umbrella pattern with vendored upstream charts in
charts/directory
Files:
packages/system/linstor/templates/cluster.yaml
**/*.yaml
📄 CodeRabbit inference engine (AGENTS.md)
Do NOT directly edit upstream Helm charts in vendored charts directory; use proper chart vendoring mechanisms
Files:
packages/system/linstor/templates/cluster.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Install Cozystack
Add DRBD options to automatically convert diskless nodes to diskful when they remain in Primary state for more than 30 minutes. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
32fb48b to
115df4a
Compare
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/system/linstor/values.yaml (1)
6-10: Consider documenting the configuration and evaluating the default enabled state.While the parameterization addresses the previous review feedback, consider the following improvements:
- Add inline comments explaining what each field does, including the units for
minutesand the implications ofallowCleanup.- Evaluate the default
enabled: true: Since this feature automatically creates disk replicas (consuming storage resources), users may prefer opt-in behavior. If the feature is intentionally enabled by default, document this decision clearly.📝 Suggested documentation improvement
linstor: autoDiskful: + # Enable automatic conversion of diskless nodes to diskful after a configured duration enabled: true + # Time in minutes a diskless node must remain in Primary state before auto-diskful triggers minutes: 30 + # Automatically remove auto-created replicas when resource is no longer Primary allowCleanup: true
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
packages/system/linstor/templates/cluster.yamlpackages/system/linstor/values.yaml
🧰 Additional context used
📓 Path-based instructions (2)
packages/system/**
📄 CodeRabbit inference engine (AGENTS.md)
Use Helm Chart umbrella pattern with vendored upstream charts in
charts/directory
Files:
packages/system/linstor/values.yamlpackages/system/linstor/templates/cluster.yaml
**/*.yaml
📄 CodeRabbit inference engine (AGENTS.md)
Do NOT directly edit upstream Helm charts in vendored charts directory; use proper chart vendoring mechanisms
Files:
packages/system/linstor/values.yamlpackages/system/linstor/templates/cluster.yaml
🪛 YAMLlint (1.37.1)
packages/system/linstor/templates/cluster.yaml
[error] 18-18: syntax error: could not find expected ':'
(syntax)
🔇 Additional comments (1)
packages/system/linstor/templates/cluster.yaml (1)
17-22: Code is correct—no changes needed.The
| quotefilter is appropriate. LINSTOR properties are key-value pairs where all values (including integers and booleans) are passed as strings, consistent with the hardcoded"15","20", and"100"values for other DrbdOptions in lines 23-30. The property namesDrbdOptions/auto-diskful(integer) andDrbdOptions/auto-diskful-allow-cleanup(boolean) are correct per LINSTOR documentation.The YAMLlint error on line 18 is a false positive. YAMLlint doesn't parse Helm template syntax, so the conditional block wrapped around YAML list items triggers a spurious error.
|
/retest |
## What this PR does Enable DRBD auto-diskful options to automatically convert diskless nodes to diskful when they remain in Primary state for an extended period. ### How it works When LINSTOR is integrated with Kubernetes, the platform may schedule workloads on nodes that don't have local storage replicas. In such cases, DRBD operates in "diskless" mode, accessing data over the network from nodes that have actual disk replicas. The `auto-diskful` feature addresses this by: 1. **Monitoring Primary state duration**: When a diskless node holds a DRBD resource in Primary state (actively using the volume) for more than the configured time (30 minutes), LINSTOR automatically creates a local disk replica on that node. 2. **Automatic cleanup**: With `auto-diskful-allow-cleanup` enabled, when the resource is no longer in Primary state on that node, LINSTOR can automatically remove the disk replica that was created, freeing up storage space. ### Configuration - `DrbdOptions/auto-diskful: 30` — Convert diskless to diskful after 30 minutes in Primary state - `DrbdOptions/auto-diskful-allow-cleanup: true` — Allow automatic removal of auto-created replicas when no longer needed ### Benefits - Improves I/O performance for long-running workloads by creating local replicas - Reduces network traffic for frequently accessed data - Automatic cleanup prevents storage waste from temporary replicas ### Release note ```release-note [linstor] Enable auto-diskful to automatically create local replicas on diskless nodes that hold volumes in Primary state for more than 30 minutes, improving I/O performance for long-running workloads. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Introduced an "auto diskful" option to automatically manage diskful resources with configurable interval and optional cleanup. * **Chores** * Added default configuration values to enable and time the auto-diskful behavior and to control automatic cleanup. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## What this PR does Enable DRBD auto-diskful options to automatically convert diskless nodes to diskful when they remain in Primary state for an extended period. ### How it works When LINSTOR is integrated with Kubernetes, the platform may schedule workloads on nodes that don't have local storage replicas. In such cases, DRBD operates in "diskless" mode, accessing data over the network from nodes that have actual disk replicas. The `auto-diskful` feature addresses this by: 1. **Monitoring Primary state duration**: When a diskless node holds a DRBD resource in Primary state (actively using the volume) for more than the configured time (30 minutes), LINSTOR automatically creates a local disk replica on that node. 2. **Automatic cleanup**: With `auto-diskful-allow-cleanup` enabled, when the resource is no longer in Primary state on that node, LINSTOR can automatically remove the disk replica that was created, freeing up storage space. ### Configuration - `DrbdOptions/auto-diskful: 30` — Convert diskless to diskful after 30 minutes in Primary state - `DrbdOptions/auto-diskful-allow-cleanup: true` — Allow automatic removal of auto-created replicas when no longer needed ### Benefits - Improves I/O performance for long-running workloads by creating local replicas - Reduces network traffic for frequently accessed data - Automatic cleanup prevents storage waste from temporary replicas ### Release note ```release-note [linstor] Enable auto-diskful to automatically create local replicas on diskless nodes that hold volumes in Primary state for more than 30 minutes, improving I/O performance for long-running workloads. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Introduced an "auto diskful" option to automatically manage diskful resources with configurable interval and optional cleanup. * **Chores** * Added default configuration values to enable and time the auto-diskful behavior and to control automatic cleanup. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
## What this PR does Enable DRBD auto-diskful options to automatically convert diskless nodes to diskful when they remain in Primary state for an extended period. ### How it works When LINSTOR is integrated with Kubernetes, the platform may schedule workloads on nodes that don't have local storage replicas. In such cases, DRBD operates in "diskless" mode, accessing data over the network from nodes that have actual disk replicas. The `auto-diskful` feature addresses this by: 1. **Monitoring Primary state duration**: When a diskless node holds a DRBD resource in Primary state (actively using the volume) for more than the configured time (30 minutes), LINSTOR automatically creates a local disk replica on that node. 2. **Automatic cleanup**: With `auto-diskful-allow-cleanup` enabled, when the resource is no longer in Primary state on that node, LINSTOR can automatically remove the disk replica that was created, freeing up storage space. ### Configuration - `DrbdOptions/auto-diskful: 30` — Convert diskless to diskful after 30 minutes in Primary state - `DrbdOptions/auto-diskful-allow-cleanup: true` — Allow automatic removal of auto-created replicas when no longer needed ### Benefits - Improves I/O performance for long-running workloads by creating local replicas - Reduces network traffic for frequently accessed data - Automatic cleanup prevents storage waste from temporary replicas ### Release note ```release-note [linstor] Enable auto-diskful to automatically create local replicas on diskless nodes that hold volumes in Primary state for more than 30 minutes, improving I/O performance for long-running workloads. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Introduced an "auto diskful" option to automatically manage diskful resources with configurable interval and optional cleanup. * **Chores** * Added default configuration values to enable and time the auto-diskful behavior and to control automatic cleanup. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
What this PR does
Enable DRBD auto-diskful options to automatically convert diskless nodes to diskful when they remain in Primary state for an extended period.
How it works
When LINSTOR is integrated with Kubernetes, the platform may schedule workloads on nodes that don't have local storage replicas. In such cases, DRBD operates in "diskless" mode, accessing data over the network from nodes that have actual disk replicas.
The
auto-diskfulfeature addresses this by:Monitoring Primary state duration: When a diskless node holds a DRBD resource in Primary state (actively using the volume) for more than the configured time (30 minutes), LINSTOR automatically creates a local disk replica on that node.
Automatic cleanup: With
auto-diskful-allow-cleanupenabled, when the resource is no longer in Primary state on that node, LINSTOR can automatically remove the disk replica that was created, freeing up storage space.Configuration
DrbdOptions/auto-diskful: 30— Convert diskless to diskful after 30 minutes in Primary stateDrbdOptions/auto-diskful-allow-cleanup: true— Allow automatic removal of auto-created replicas when no longer neededBenefits
Release note
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.