Merged
Conversation
Add lxd_cleanup binary for emergency cleanup of LXD environments when normal 'destroy' and 'purge' commands cannot be used. This tool should ONLY be used when: - Environment internal data is missing (manually deleted) - Environment internal data is corrupted - E2E tests left orphaned LXD resources Features: - Cleans build, templates, and data directories - Destroys OpenTofu infrastructure - Removes LXD instances and profiles - Supports dry-run mode for safe preview - Can clean multiple environments in one command - Comprehensive logging and error handling Documentation added at docs/tools/lxd-cleanup.md
Add agent skill for emergency cleanup of orphaned LXD environments with comprehensive workflow guidance, verification steps, and troubleshooting. Updated AGENTS.md skills table.
Add reference to docs/tech-stack/lxd.md in clean-lxd-environments skill's See Also section for better context on LXD provider.
Member
Author
|
ACK 0e279c0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an emergency cleanup tool for orphaned LXD environments that remain after interrupted test workflows or deployment failures.
Changes
lxd_cleanuptool for emergency cleanup of orphaned LXD resourcesdocs/tools/lxd-cleanup.mddestroy+purgeworkflowclean-lxd-environmentsskill in.github/skills/Motivation
During E2E testing and development, LXD VMs can become orphaned when:
The normal
destroy+purgeworkflow requires valid state, making it unsuitable for these scenarios.Usage
Emergency only - prefer normal workflow:
When normal workflow fails:
Testing
References
docs/tools/lxd-cleanup.md.github/skills/clean-lxd-environments/skill.md