Summary
crane transfer-pvc reads and validates the --rclone-config-file after it
has already created the destination PVC on the destination cluster. So any
config-file failure — the file is missing/unreadable, or (with --encrypt) it
already contains an [encrypted] section — is reported only after a remote side
effect has been committed.
What version of crane are you running, and what are your clutsters+platform
v0.11.0-alpha.1 + OCP
What did you expect to happen?
PVC on the destination cluster should be removed
What actually happened?
PVC on the destination cluster doesn't get removed
Steps to reproduce
$ crane transfer-pvc \
--source-context kind-source-cluster \
--destination-context kind-dest-cluster \
--pvc-name enctest:orphan-check \
--pvc-namespace default:default \
--encrypt \
--cloud-storage remote:bucket \
--rclone-config-file /tmp/nope.conf
[1/6] Reading source PVC ...
[1/6] Reading source PVC ... ok
[2/6] Creating destination PVC ...
[2/6] Creating destination PVC ... ok <-- side effect committed
Error: failed to read rclone config file /tmp/nope.conf: open /tmp/nope.conf: no such file or directory
--- exit=1
$ kubectl --context kind-dest-cluster -n default get pvc orphan-check
NAME STATUS ...
orphan-check Pending ... <-- orphaned
Please include any relevant logs or errors
Summary
crane transfer-pvcreads and validates the--rclone-config-fileafter ithas already created the destination PVC on the destination cluster. So any
config-file failure — the file is missing/unreadable, or (with
--encrypt) italready contains an
[encrypted]section — is reported only after a remote sideeffect has been committed.
What version of crane are you running, and what are your clutsters+platform
v0.11.0-alpha.1 + OCP
What did you expect to happen?
PVC on the destination cluster should be removed
What actually happened?
PVC on the destination cluster doesn't get removed
Steps to reproduce
Please include any relevant logs or errors