Closed cormachogan closed 4 years ago
I think the issue is that Velero is adding an extra space after the tag ark.heptio.com/backup
that we use as the prefix of the snapshot. So the snapshot name becomes snapshot _pvc-d4e64420-4c95-11e9-aadf-0050568f6f18
which is illegal
Thanks - I will feed this back to them.
I will also trim the spaces in the plugin to avoid hitting such issues in the future
Fixed with #8
Looking at Heptio Velero (previously Ark) and Portworx, and having a few issues with local snapshots.
$ /opt/pwx/bin/pxctl -v pxctl version 2.0.2.3-c186a87 (OCI)
$ velero version Client: Version: v0.11.0 Git commit: ab2fc65c02ecdcb9bb1690e3afe67a3b3196aebc Server: Version: v0.11.0
When we try to take a backup, we see this error thrown consistently in the logs:
time=“2019-03-22T13:44:50Z” level=error msg=“backup failed” controller=backup error=“[error taking snapshot of volume: rpc error: code = Unknown desc = Invalid name for snapshot _pvc-b4d5c145-4c95-11e9-aadf-0050568f6f18 - volume name \“pvc-b4d5c145-4c95-11e9-aadf-0050568f6f18\” contains illegal characters, only \“[a-zA-Z0-9][a-zA-Z0-9.-]\” are allowed, error taking snapshot of volume: rpc error: code = Unknown desc = Invalid name for snapshot _pvc-d4e64420-4c95-11e9-aadf-0050568f6f18 - volume name \“pvc-d4e64420-4c95-11e9-aadf-0050568f6f18\” contains illegal characters, only \“[a-zA-Z0-9][a-zA-Z0-9.-]\” are allowed, error taking snapshot of volume: rpc error: code = Unknown desc = Invalid name for snapshot _pvc-ea6897b6-4c95-11e9-aadf-0050568f6f18 - volume name \“pvc-ea6897b6-4c95-11e9-aadf-0050568f6f18\” contains illegal characters, only \“[a-zA-Z0-9][a-zA-Z0-9.-]\” are allowed, error taking snapshot of volume: rpc error: code = Unknown desc = Invalid name for snapshot _pvc-f1e79424-4a4b-11e9-aadf-0050568f6f18 - volume name \“pvc-f1e79424-4a4b-11e9-aadf-0050568f6f18\” contains illegal characters, only \“[a-zA-Z0-9][a-zA-Z0-9.-]\” are allowed, error taking snapshot of volume: rpc error: code = Unknown desc = Invalid name for snapshot _pvc-e9109e0d-4a59-11e9-aadf-0050568f6f18 - volume name \“pvc-e9109e0d-4a59-11e9-aadf-0050568f6f18\” contains illegal characters, only \“[a-zA-Z0-9][a-zA-Z0-9.-]*\” are allowed]” key=velero/local-snapshot-backup4 logSource=“pkg/controller/backup_controller.go:202”
I see an underscore prefixing all the “volume names” -- has the portworx plugin been updated to be compatible with v0.11?