Skip to content

Bug: Failed kubeslice-cli install leaves orphaned resources #101

@Arpit529Srivastava

Description

@Arpit529Srivastava

📜 Description

When kubeslice-cli install fails (due to Ctrl+C/Cmd+ C, network issues, disk full, etc.), it leaves behind KIND clusters, Docker containers, and bound ports.
This makes the system slow/unusable and prevents retries without manual cleanup.

👟 Reproduction steps

  1. Run the installation command:
    kubeslice-cli install --profile full-demo
  2. Let it run until it starts creating KIND clusters (around 20-30% completion)
  3. Simulate a failure by either:
    • Killing the process with Ctrl+C
    • Disconnecting network temporarily
    • Running out of disk space
    • Any other interruption
  4. Check what resources remain:
    docker ps -a                    # Shows orphaned containers
    kind get clusters              # Shows orphaned KIND clusters
    docker stats                   # Shows resource consumption
    df -h                          # Shows disk usage
  5. Try to run the command again - it will fail due to resource conflicts
  6. Observe system becomes slow/unusable due to resource exhaustion

👍 Expected behavior

Failed installations should:

  • Automatically clean up any resources that were created
  • Return the system to its previous state
  • Allow users to retry without manual intervention
  • Provide clear error messages about what failed
  • Handle interruptions gracefully

👎 Actual Behavior

  • Orphaned KIND clusters & containers keep consuming resources
  • Ports blocked → retries fail
  • Manual cleanup required

🐚 Relevant log output

Version

0.3.2 (Default)

🖥️ What operating system are you seeing the problem on?

MacOS

✅ Proposed Solution

  • rack created resources during install
  • implement panic recovery + rollback/cleanup
  • add cleanup command for manual recovery

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find any similar issue

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions