portworx / velero-plugin

Portworx plugin for Velero
Apache License 2.0
7 stars 7 forks source link

Do we know if Portworx 2.0.2.3 works with Velero (Ark) v11? #7

Closed cormachogan closed 4 years ago

cormachogan commented 5 years ago

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?

disrani-px commented 5 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

cormachogan commented 5 years ago

Thanks - I will feed this back to them.

disrani-px commented 5 years ago

I will also trim the spaces in the plugin to avoid hitting such issues in the future

disrani-px commented 4 years ago

Fixed with #8