You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.
When server returns error on get() operation, this error is not reported to Docker command line.
To repro, add an error to server vmdk_ops.getVMDK() - it shows in the error log on ESX but not reported on Docker:
ESX:
10/15/16 08:04:40 52044 [photon-1] [INFO ] executeRequest 'get' completed with ret=Failed to get disk details for /vmfs/volumes/vsanDatastore/dockvols/v11.vmdk
Guest:
docker volume inspect v11@vsanDatastore
[]
Error: No such volume: v11@vsanDatastore
root@photon-1 [ ~ ]#
The code returns the error to the client (from the guest) and the client plugin code also returns the error to docker. Seems like docker is displaying the error when it gets an error response.
Checked the plugin code and into go-plugin-helpers and the error is being passed on. But in engine-api/client/volume_inspect.go:VolumeInspectWithRaw() the response from Get is mapped to the below error if the status was "not found"
Server
10/18/16 08:19:16 3467214 [2] [INFO ] executeRequest 'get' completed with ret={'Error': 'Volume testvol-5000 not found (file: /vmfs/volumes/bigone/dockvols/testvol-5000.vmdk)'}
Guest
$ docker volume inspect testvol-5000
[]
Error: No such volume: testvol-5000
// VolumeInspectWithRaw returns the information about a specific volume in the docker host and it's raw representation
func (cli *Client) VolumeInspectWithRaw(ctx context.Context, volumeID string) (types.Volume, []byte, error) {
var volume types.Volume
resp, err := cli.get(ctx, "/volumes/"+volumeID, nil, nil)
if err != nil {
if resp.statusCode == http.StatusNotFound { <-------- code seems to be setting this status, otherwise, the error returned by the plugin is returned below.
return volume, nil, volumeNotFoundError{volumeID}
}
return volume, nil, err
}
.....
This is an issue with how docker is handling errors returned from Get(). I'll raise an issue on Docker and closing this one as there are no changes for the plugin.
When server returns error on
get()
operation, this error is not reported to Docker command line.To repro, add an error to server vmdk_ops.getVMDK() - it shows in the error log on ESX but not reported on Docker:
ESX:
Guest:
(found when investigating #627 )
The text was updated successfully, but these errors were encountered: