Bug: mountConflict delay is passed by default to the underlying docker volume plugin
wdurairaj opened this issue · 1 comments
wdurairaj commented
doryd is passing mountConflictDelay map key with value as "30" to the underlying volume plugin, even though the plugin might choose to ignore (or) implement in a config file etc.
From the logs
sudo /tmp/doryd /root/.kube/config dev.hpe.com
12:58:35 volume.go:125: storageclass option key:provisioning value:thin
12:58:35 volume.go:125: storageclass option key:name value:from-production-d610b5f4-1730-11e8-b771-ecb1d7a4b070
12:58:35 volume.go:138: storage class does not contain size key, overriding to claim size
12:58:35 provisioner.go:377: processing mountConflictDelay:30
12:58:35 provisioner.go:380: setting the docker option mountConflictDelay:30
12:58:35 provisioner.go:385: optionsMap map[provisioning:thin name:from-production-d610b5f4-1730-11e8-b771-ecb1d7a4b070 size:16 mountConflictDelay:30]
12:58:35 client.go:126: request: action=POST path=http://unix/VolumeDriver.Create payload={"Name":"from-production-d610b5f4-1730-11e8-b771-ecb1d7a4b070","Opts":{"mountConflictDelay":30,"provisioning":"thin","size":16}}
12:58:35 client.go:168: response: 200 OK, length=-1
12:58:35 dockervol.go:267: unable to create docker volume using from-production-d610b5f4-1730-11e8-b771-ecb1d7a4b070 & map[size:16 mountConflictDelay:30 provisioning:thin] - create volume failed, error is: mountConflictDelay is not a valid option. Valid options are: ['mount-volume', 'compression', 'size', 'provisioning', 'flash-cache', 'cloneOf', 'snapshotOf', 'expirationHours', 'retentionHours', 'promote', 'qos-name']
12:58:35 provisioner.go:520: failed to create docker volume, error = create volume failed, error is: mountConflictDelay is not a valid option. Valid options are: ['mount-volume', 'compression', 'size', 'provisioning', 'flash-cache', 'cloneOf', 'snapshotOf', 'expirationHours', 'retentionHours', 'promote', 'qos-name']
12:58:36 provisioner.
To overcome this we need to pass hpe.json in /usr/libexec/kubernetes/..../
{
"logFilePath": "/var/log/dory.log",
"logDebug": false,
"stripK8sFromOptions": true,
"dockerVolumePluginSocketPath": "/run/docker/plugins/nimble.sock",
"createVolumes": true,
"enable1.6": false,
"listOfStorageResourceOptions" : ["size","sizeInGiB"],
"factorForConversion": 1073741824,
"defaultOptions": [{"size": 10}]
}
e4jet commented
This is the expected behavior. The mountConflictDelay option prevents fencing a pv too early and potentially loosing data (if it isn't flushed). For this reason we want driver developers to implement this option. That is why it is a default.