-
Notifications
You must be signed in to change notification settings - Fork 16
Broken volume creation when not passing options #66
Copy link
Copy link
Open
Description
When calling cli.CreateVolume(ctx, volName, "local", nil, nil) on the containerz client the resulting volume will have invalid local mount options set, leading to the following configuration:
sudo docker volume inspect some-volume
[
{
"CreatedAt": "2026-02-27T16:58:25Z",
"Driver": "local",
"Labels": null,
"Mountpoint": "/var/lib/docker/volumes/some-volume/_data",
"Name": "some-volume",
"Options": {
"device": "",
"o": "",
"type": "none"
},
"Scope": "local"
}
]
This results in the following error once the volume is used within a StartContainer command:
Error response from daemon: missing device in volume options
Potential solution (not tested):
Set LocalMountOptions of cpb.CreateVolumeRequest_LocalMountOptions to nil unless at least one options parameter is passed to the client.
Not setting the "device" option unless the "mountpoint" option is set may work as well.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels