Skip to content

[BUG] Crane returns exit code 0 even when transfer fails #989

Description

@nachandr

Summary
The crane transfer-pvc command returns exit code 0 (success) even when critical phases fail.
This breaks error detection in CI/CD pipelines and automation scripts that rely on exit codes.

What version of crane are you running, and what are your clutsters+platform
latest from main branch; k8s custers

What did you expect to happen?
Error should be translated to non-zero exit code

What actually happened?
When the rclone download pod fails to start, crane:

  1. Prints error message to stderr: Error: download pod failed: timed out waiting for pod indirect-rclone-secret-mysql/rclone-download-mysql-data to start: context deadline exceeded
  2. Executes cleanup (phase [6/6])
  3. Returns exit code 0 (incorrectly indicates success)

This breaks error detection in CI/CD pipelines and automation scripts that rely on exit codes.

Please include any relevant logs or errors

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions