Azure / azurefile-dockervolumedriver

Docker Volume Driver for Azure File Service over SMB/CIFS :whale:
Apache License 2.0
169 stars 55 forks source link

plugin azurefile: plugin not found #60

Closed M3ssman closed 8 years ago

M3ssman commented 8 years ago

Hi there,

I'm running into trouble creating docker volumes for azure container service on docker swarm (using the https://github.com/Azure/azure-quickstart-templates/tree/master/101-acs-swarm - Template).

After finishing the installation on the swarm-master (Ubuntu 14.04 LTS) I run

initctl reload-configuration
initctl start azurefile-dockervolumedriver
initctl status azurefile-dockervolumedriver

with the last Statement saying

azurefile-dockervolumedriver start/running, process 1012

which sounds quite okay.

But when I try to create an actual volume, it doesn't work anyways:

docker volume create -d azurefile -o share=myshare --name=myvol
Error response from daemon: create myvol: create myvol: Error looking up volume plugin azurefile: plugin not found

Obviously someting's missing, but I didn't get the point right now.

M3ssman commented 8 years ago

Restarting the docker daemon on the (only) swarm master using

initctl restart docker

wiped the error above but now it complains

docker volume create -d azurefile -o share=myshare --name=myvol
Error response from daemon: No elected primary cluster manager
ahmetb commented 8 years ago

@M3ssman your first comment looks like an ordering issue. I guess we need to restart docker (if it is running) after we install the plugin.

For your second comment, No elected primary cluster manager looks like a swarm-related issue. I'm not familiar with that area yet, but as far as I know, you should be installing this volume plugin on every node you are going to use this volume plugin.

cc: since it's acs-related @anhowe may have better expertise here.

derdanu commented 8 years ago

If you want to test this plugin on your master as a single node just unset the DOCKER_HOST environment variable.

dafalkne@swarm-master-B9ACB66F-0:~$ unset DOCKER_HOST dafalkne@swarm-master-B9ACB66F-0:~$ docker volume create -d azurefile -o share=testshare --name=myvol myvol dafalkne@swarm-master-B9ACB66F-0:~$ docker volume ls DRIVER VOLUME NAME azurefile myvol

If you want to test it on ACS you have to install the driver on every node + master in the swarm cluster. But please keep in mind as ACS doesn't know about the changes you made, you are responsible the driver is installed on every machine.

M3ssman commented 8 years ago

@ahmetalpbalkan restarting docker afterwards sounds quite logical. @derdanu I'll give it a try - thanks in advance! On the other hand, that's an important issue when thinking in terms of autoscaling clusters, if possible with ACS + Docker Swarm.

M3ssman commented 8 years ago

@derdanu I was able to validate this on a docker as single node like you said - worked like a charm. The data was shared between 2 different containers running on the master and even in the Microsoft Azure-portal Website in the Storage I picked from my Ressource Group! Thanks!

The second approach yet isn't tested properly. Did I get it right - the driver must be installed on every machine, not inside the Containers? So in a scenario where I run 1 master and 1 agent, I must head to the master and the agent and install the dockervolumedriver also there? I'm not expected to step inside the Container and repeat the installation in every container, right?

But if it's so complicated, it might be an option to use some technique like Samba-Share and mount a special Folder in every Container running on a Node.

derdanu commented 8 years ago

Install the dockervolumedriver on all machines (master and nodes). You don't have to install it inside any container. Then, on the master export DOCKER_HOST=:2375 to head to the swarm cluster and create the volume like you do it on a single host.

M3ssman commented 8 years ago

Just a note: The way suggested above to install the driver on every node works well. Unfortunatly, Azure Linux VMs don't support this functionality from scratch, so by now it needs some configuration effort to get this up and running.

chrbn commented 7 years ago

Any news on this? Does this plugin exist in the managed plugin format so it can be installed throughout all nodes?