NetApp / netappdvp

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

netApp install plugin Error #86

Closed Sattera closed 7 years ago

Sattera commented 7 years ago

Getting the below error when trying install command

bash-4.2# docker plugin install netapp/ndvp-plugin:17.04 --alias netapp --grant-all-permissions
17.04: Pulling from netapp/ndvp-plugin
0899c2895d9a: Download complete
Digest: sha256:66b638200da35227683ee459f228f5cb0e191c1064db2a51c2bb894d74683b89
Status: Downloaded newer image for netapp/ndvp-plugin:17.04
Error response from daemon: dial unix /run/docker/plugins/7a60ffe5ec7e7520983aaaeb485647e65771ca9ea052593c3f395630069d7305/netapp.sock: connect: no such file or directory
bash-4.2# docker run --rm -it --volume-driver netapp --volume ndvp_2:/my_vol alpine ash
docker: Error response from daemon: create ndvp_2: Error looking up volume plugin netapp: plugin "netapp" not found.
ntap-rippy commented 7 years ago

Hi Sattera,

Have you followed the steps from the documentation for creating a configuration file in /etc/netappdvp/config.json on your linux host with the proper values for your NetApp storage system?

https://netappdvp.readthedocs.io/en/latest/install/host_config.html#docker-managed-plugin-method-docker-1-13-17-03

Sattera commented 7 years ago

Hi NetApp,

Thanks for the response. i have attached the error message. kindly have a look.

error-2

innergy commented 7 years ago

You're seeing that error because the plugin had problems initializing, most likely due to a configuration problem. To troubleshoot the problem, you'll need to look at the logs in /var/log/netappdvp/netapp.log.

ntap-rippy commented 7 years ago

When the nDVP starts, it reads a config.json and attempts to communicate with the NetApp storage system you've specified (and, as a prerequisite, already setup before hand). In your example, which appears to mirror our documentation example, it will be looking for an ONTAP storage system on address 10.0.0.1 that it can send ZAPI messages to. It will also be looking for an NFS SVM on address 10.0.0.2 which it will use for NFS protocol traffic to the preconfigured SVM.

If you look at the log messages in /var/log/netappdvp/netapp.log, I'm guessing it cannot communicate with your NetApp storage system on 10.0.0.1.

Sattera commented 7 years ago

Thanks. I will check and update you.

remys89 commented 7 years ago

Which version of Docker are you running?

Sattera commented 7 years ago

i think i got the problem., the issue is from docker i believe. When i chececk docker plugin ls the plugin was not enabled., so i removed and installed again. getting the below issue.,

bash-4.2# docker plugin install netapp/ndvp-plugin:17.04 --alias netapp --grant-all-permissions
17.04: Pulling from netapp/ndvp-plugin
0899c2895d9a: Download complete
Digest: sha256:66b638200da35227683ee459f228f5cb0e191c1064db2a51c2bb894d74683b89
Status: Downloaded newer image for netapp/ndvp-plugin:17.04
Error response from daemon: dial unix /run/docker/plugins/e7080e4bdc642486e03c1d80675bc2dccaa4a9e3273f16e55ec0e6599bc433a4/netapp.sock: connect: no such file or directory

Though its not the right place to ask question about docker timedout, will be appreciated if you had the same problem and the way you fixed it.

Steps i tried to fix.

  1. restart the docker demon - Problem persits
  2. Uninstall and install the docker - problem persists
Sattera commented 7 years ago

The last uninstall fied the docker issue.,However when i try to create the volume it shows the same issue, this time i believe its from netapp., attaching the scree shot.

image

Error log

bash-4.2# more /var/log/netappdvp/netapp.log INFO[2017-06-22T08:23:53-04:00] Initialized logging. logFileLocation="/var/log/netappdvp/netapp.log" logLevel=info INFO[2017-06-22T08:24:54-04:00] Initialized logging. logFileLocation="/var/log/netappdvp/netapp.log" logLevel=info INFO[2017-06-22T09:39:27-04:00] Initialized logging. logFileLocation="/var/log/netappdvp/netapp.log" logLevel=info INFO[2017-06-22T09:39:59-04:00] Initialized logging. logFileLocation="/var/log/netappdvp/netapp.log" logLevel=info INFO[2017-06-22T09:56:50-04:00] Initialized logging. logFileLocation="/var/log/netappdvp/netapp.log" logLevel=info INFO[2017-06-22T10:28:20-04:00] Initialized logging. logFileLocation="/var/log/netappdvp/netapp.log" logLevel=info INFO[2017-06-22T10:28:47-04:00] Initialized logging. logFileLocation="/var/log/netappdvp/netapp.log" logLevel=info INFO[2017-06-22T10:37:52-04:00] Initialized logging. logFileLocation="/var/log/netappdvp/netapp.log" logLevel=info INFO[2017-06-22T10:40:20-04:00] Initialized logging. logFileLocation="/var/log/netappdvp/netapp.log" logLevel=info INFO[2017-06-22T10:47:18-04:00] Initialized logging. logFileLocation="/var/log/netappdvp/netapp.log" logLevel=info INFO[2017-06-22T10:59:22-04:00] Initialized logging. logFileLocation="/var/log/netappdvp/netapp.log" logLevel=info INFO[2017-06-23T01:01:30-04:00] Initialized logging. logFileLocation="/var/log/netappdvp/netapp.log" logLevel=info INFO[2017-06-23T01:11:20-04:00] Initialized logging. logFileLocation="/var/log/netappdvp/netapp.log" logLevel=info

adkerr commented 7 years ago

Are you sure that your config file has the correct options to communicate with your NetApp filer? It looks like the same values as the example configs, which are unlikely to work on a real system.

Can you also enable debug logging?

docker plugin disable netapp -f docker plugin set netapp debug=true docker plugin enable netapp

korenaren commented 7 years ago

@Sattera : can you let us know which NetApp platform you are using? ONTAP, SolidFire, E-Series?

Storwars commented 7 years ago

Hi. Got the same behavior when the plugin is enable.

" docker plugin enable netapp Error response from daemon: dial unix /run/docker/plugins/826c2ad852f62ffde0626faec10f89e73f4c71784caa137c739e46153e7ca38a/netapp.sock: connect: no such file or directory " Docker version: Server: Version: 17.06.0-ce API version: 1.30 (minimum version 1.12) Go version: go1.8.3 Git commit: 02c1d87 Built: Fri Jun 23 21:19:04 2017 OS/Arch: linux/amd64 Experimental: false

Running on ubunto 16.04.02 LTS Kernel:4.4.0-45-generic

Pointing to a CDOT sim:

cat /etc/netappdvp/config.json { "version": 1, "storageDriverName": "ontap-nas", "managementLIF": "10.0.2.70", "dataLIF": "10.0.2.81, "svm": "containers", "username": "admin", "password": "teste123", "aggregate": "aggr1_cdotsim_02" }

adkerr commented 7 years ago

Can you run journalctl -u docker and provide the output?

Storwars commented 7 years ago

I think you "touch" the right place. It seems that there are extra characters on the conf file:

"Jul 15 19:43:36 docker01 dockerd[22673]: time="2017-07-15T19:43:36+01:00" level=info msg="time=\"2017-07-15T18:43:36Z\" level=info msg=\"Initialized logging.\" buildTime=\"Tue Jul 11 13:26:18 EDT 2017\" driverBuild=\"17.07.0+d617170e5f96b1ad3fc1675b51e0b51a56675d15\" driverVersion=17.07.0 logFileLocation=\"/var/log/netappdvp/netapp.log\" logLevel=info " plugin=826c2ad852f62ffde0626faec10f89e73f4c71784caa137c739e46153e7ca38a Jul 15 19:43:36 docker01 dockerd[22673]: time="2017-07-15T19:43:36+01:00" level=info msg="time=\"2017-07-15T18:43:36Z\" level=fatal msg=\"Problem validating configuration file.\" configFile=\"/etc/netappdvp/config.json\" error=\"Cannot decode json configuration error: invalid character '\n' in string literal\" " plugin=826c2ad852f62ffde0626faec10f89e73f4c71784caa137c739e46153e7ca38a Jul 15 19:43:36 docker01 dockerd[22673]: time="2017-07-15T19:43:36+01:00" level=info msg="Running: /netapp/netappdvp --debug=false --config=/etc/netappdvp/config.json" plugin=826c2ad852f62ffde0626faec10f89e73f4c71784caa137c739e46153e7ca38a Jul 15 19:43:36 docker01 dockerd[22673]: time="2017-07-15T19:43:36+01:00" level=info msg="time=\"2017-07-15T18:43:36Z\" level=info msg=\"Initialized logging.\" buildTime=\"Tue Jul 11 13:26:18 EDT 2017\" driverBuild=\"17.07.0+d617170e5f96b1ad3fc1675b51e0b51a56675d15\" driverVersion=17.07.0 logFileLocation=\"/var/log/netappdvp/netapp.log\" logLevel=info " plugin=826c2ad852f62ffde0626faec10f89e73f4c71784caa137c739e46153e7ca38a Jul 15 19:43:36 docker01 dockerd[22673]: time="2017-07-15T19:43:36+01:00" level=info msg="time=\"2017-07-15T18:43:36Z\" level=fatal msg=\"Problem validating configuration file.\" configFile=\"/etc/netappdvp/config.json\" error=\"Cannot decode json configuration error: invalid character '\n' in string literal\" " plugin=826c2ad852f62ffde0626faec10f89e73f4c71784caa137c739e46153e7ca38a Jul 15 19:43:49 docker01 dockerd[22673]: time="2017-07-15T19:43:49.026863733+01:00" level=error msg="Sending SIGTERM to plugin failed with error: rpc error: code = 2 desc = containerd: container not found" Jul 15 19:43:49 docker01 dockerd[22673]: time="2017-07-15T19:43:49.251642979+01:00" level=error msg="Sending SIGTERM to plugin failed with error: rpc error: code = 2 desc = containerd: container not found"

Pasting from the web page might have caused it. Gonna fix that and try again.

Storwars commented 7 years ago

A missing " !! So worried about the right IPs and credentials that I missed that.

Working

docker plugin list ID NAME DESCRIPTION ENABLED 826c2ad852f6 netapp:latest nDVP - NetApp Docker Volume Plugin true

Thanks for your help.

adkerr commented 7 years ago

Great! :)

scaleoutsean commented 7 years ago

I'd like to point another (what I think) is issue in this situation: if I attempt to install this plugin and it fails, then try again when the storage is ready, I end up with this:

sudo docker plugin list
ID                  NAME                             DESCRIPTION                          ENABLED
7b7673e43b36        store/netapp/ndvp-plugin:17.07   nDVP - NetApp Docker Volume Plugin   false
fe444faea83c        netapp:latest                    nDVP - NetApp Docker Volume Plugin   true

This has caused me additional issues before (where I'd try to use ndvp-plugin:17.07 but that didn't work) and I think the reason is that in the second case I fell back to the official docs which in one example suggest to use an alias.

# docker --version 
Docker version 17.06.0-ce, build 02c1d87
# uname -a
Linux ubuntu-xenial 4.4.0-93-generic #116-Ubuntu SMP Fri Aug 11 21:17:51 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
adkerr commented 7 years ago

This is a docker-ism. They keep the failed plugin around, but in a disabled state. What you can do is instead of re-installing when the backend is ready just enable the plugin with the docker plugin enable <plugin> command.

scaleoutsean commented 7 years ago

@adkerr I get that, but the issue for me was this dockerism makes you think "I should simply retry because it failed". It's not up to us to fix this behavior, but I've submitted a new issue to document how to uninstall our plugin (and how to check what's installed, especially name-wise because one issue is the failed plugin remains, and the other is because you don't know why it failed and maybe retry the command slightly differently (by using an alias, for example), you may think it was a retry, and not the second installation under a different name, that succeeded and then get surprised that volume-related commands that use the first name don't work).