0 0 Share PDF

Unable to redeploy a stack using docker compose with persistent volumes within the same collection when using a volume storage plugin with UCP

Issue

The following UCP error may be encountered when redeploying a stack using external volumes backed by a volume storage plugin:

failed to create service myservice: Error response from daemon: located 1 sets of existing volumes named "mypluginvolume" with different collection labels. Please make sure all existing volumes with the same name share the same collection or don't have one at all

Prerequisites

  • Universal Control Plane (UCP) versions 2.2.x, 3.0.x and 3.1.x
  • Container volumes managed by third-party volume plugin

Resolution

Enable local_volume_collection_mapping in the cluster_config table of the UCP config using the procedure for your UCP version:

The local_volume_collection_mapping option was first made available in UCP 2.2.6. When enabled this option moves storage of collections labels for volumes from volume lables into UCP’s local KV store thereby providing a consistent interface for UCP to query volume labels.