NetApp / netappdvp

A Docker volume plugin for NetApp storage
96 stars 33 forks source link

Specify export policy in config #46

Closed dburkland closed 7 years ago

dburkland commented 8 years ago

In most configurations I see out in the wild the default export policy only has one rule which grants all systems (0.0.0.0/0) read-only access. This is obviously an issue when creating volumes which you want to write to (docker-created NFS volumes). With that said I have made a few simple changes to allow for an export policy to be specified in the JSON config file so an administrator can specify which export policy gets assigned to volumes created by the plugin.

Thanks,

Dan

dburkland commented 8 years ago

I just realized you can specify the exportPolicy when adding "-o exportPolicy" to the end of the "docker volume create" command so this request may be redundant (feel free to ignore this request).

Dan

bnaylor commented 8 years ago

Hey Dan, thanks for the patch. While you can specify the policy with -o, adding it to the config is also something we were considering - or a better way to specify default volume properties in general for all the platforms. So we'll keep this open for now. Thanks!

mcortinas commented 7 years ago

I tried without lucky :(

./docker_driver.go:125: not enough arguments in call to d.sd.Create
adkerr commented 7 years ago

@mcortinas

What was the full command you tried to run?

mcortinas commented 7 years ago

I tried this command go build .

adkerr commented 7 years ago

Make sure you have docker running and try running make

adkerr commented 7 years ago

Just responded in slack as well, but you can specify the export policy in your config file as of v17.04

{
    "version": 1,
    "storageDriverName": "ontap-nas",
    "managementLIF": "10.0.0.1",
    "dataLIF": "10.0.0.2",
    "svm": "svm_nfs",
    "username": "vsadmin",
    "password": "secret",
    "aggregate": "aggr1",
    "defaults": {
      "size": "10G",
      "spaceReserve": "none",
      "exportPolicy": "default"
    }
}

Closing this PR as it is not needed

mcortinas commented 7 years ago

(commented in slack, too) I tried with docker 1.11.2 and the export policy assigned when the volume is created from netappdvp driver is the policy "default" , netappdvp driver just create the volume but netappdvp driver doesn't assign the export policy specified in JSON, are you trying to say me I should upgrade docker to 17.04 in order to use this JSON file succesfully?

clintonk commented 7 years ago

You need nDVP v17.04.0 to use the example as above.

https://github.com/NetApp/netappdvp/releases