Skip to content

lustre cleanup#5281

Merged
aslam-quad merged 1 commit into
GoogleCloudPlatform:developfrom
aslam-quad:lustre
Feb 27, 2026
Merged

lustre cleanup#5281
aslam-quad merged 1 commit into
GoogleCloudPlatform:developfrom
aslam-quad:lustre

Conversation

@aslam-quad

Copy link
Copy Markdown
Contributor

lustre cleanup

Submission Checklist

NOTE: Community submissions can take up to 2 weeks to be reviewed.

Please take the following actions before submitting this pull request.

  • Fork your PR branch from the Toolkit "develop" branch (not main)
  • Test all changes with pre-commit in a local branch #
  • Confirm that "make tests" passes all tests
  • Add or modify unit tests to cover code changes
  • Ensure that unit test coverage remains above 80%
  • Update all applicable documentation
  • Follow Cluster Toolkit Contribution guidelines #

@github-actions github-actions Bot added the external PR from external contributor label Feb 25, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @aslam-quad, 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 extends the cleanup.sh script to manage Google Cloud Managed Lustre instances. It introduces mechanisms to protect networks used by critical Lustre instances from deletion and adds a dedicated process to identify and delete eligible Lustre instances based on age, network protection, and exclusion criteria, thereby enhancing the script's comprehensive resource management capabilities.

Highlights

  • Managed Lustre Network Protection: The populate_protected_resources function was enhanced to identify and protect networks associated with Managed Lustre instances that are explicitly excluded from cleanup. This prevents accidental deletion of networks critical to protected Lustre deployments.
  • Managed Lustre Instance Processing: A new function, process_lustre_instances, was introduced to list, filter, and delete Managed Lustre instances. It includes logic to skip instances newer than a defined cutoff time, those on protected networks, or those explicitly excluded by name or label.
  • Integration into Cleanup Workflow: The newly created process_lustre_instances function has been integrated into the main cleanup execution flow, ensuring that Managed Lustre instances are now part of the automated resource cleanup process.
Changelog
  • tools/cleanup.sh
    • Added logic to populate_protected_resources to protect networks associated with excluded Managed Lustre instances.
    • Introduced process_lustre_instances function for listing, filtering, and deleting Managed Lustre instances.
    • Called process_lustre_instances from the main function to integrate Lustre cleanup into the script's workflow.
Activity
  • No specific activity (comments, reviews, progress updates) has been recorded for this pull request since its creation.
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
Contributor

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 adds cleanup logic for Managed Lustre instances to the cleanup.sh script. The changes correctly add steps to protect networks of excluded Lustre instances and to delete unprotected instances. I've identified a potential issue in how network URIs are constructed within the process_lustre_instances function. The current implementation may not correctly handle Shared VPC scenarios, as it rebuilds the network URI assuming the network resides in the current project, which isn't always the case. I've provided a suggestion to fix this to ensure correctness and consistency with other parts of the script.

Comment thread tools/cleanup.sh Outdated
@aslam-quad aslam-quad force-pushed the lustre branch 3 times, most recently from 4aaec7b to e0366bc Compare February 25, 2026 09:37
@aslam-quad aslam-quad added the release-chore To not include into release notes label Feb 26, 2026
@simrankaurb simrankaurb requested a review from LAVEEN February 26, 2026 10:27
@aslam-quad aslam-quad marked this pull request as ready for review February 26, 2026 10:47
@aslam-quad aslam-quad requested review from a team and samskillman as code owners February 26, 2026 10:47

@LAVEEN LAVEEN left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@aslam-quad aslam-quad merged commit b86b546 into GoogleCloudPlatform:develop Feb 27, 2026
14 of 87 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external PR from external contributor release-chore To not include into release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants