使用flocker
时出现以下错误,是否有任何身体帮助?我正在使用CentOS7
。
[root@agentNode ~]# docker run -v apples:/data --volume-driver flocker busybox sh -c "echo hello > /data/file.txt"
docker: Error response from daemon: create apples: create apples: Error looking up volume plugin flocker: plugin not found.
See '/usr/bin/docker-current run --help'.
[root@testnode7 ~]# docker run -ti -v volumename:/data --volume-driver=flocker busybox sh
docker: Error response from daemon: create volumename: create volumename: Error looking up volume plugin flocker: plugin not found.
See '/usr/bin/docker-current run --help'.
答案 0 :(得分:0)
请运行docker -v并分享结果,我怀疑在最新的docker 1.12中发生了一些变化,也分享了你的flocker服务日志
cat /var/log/flocker/flocker-docker-plugin.log
答案 1 :(得分:0)
我想我在这里遇到同样的问题。
[root@manager1 vagrant]# docker version
Client:
Version: 1.12.2
API version: 1.24
Go version: go1.6.3
Git commit: bb80604
Built:
OS/Arch: linux/amd64
Server:
Version: 1.12.2
API version: 1.24
Go version: go1.6.3
Git commit: bb80604
Built:
OS/Arch: linux/amd64
检查是否安装了clusterhq-flocker-docker-plugin
[root@manager1 vagrant]# yum install clusterhq-flocker-docker-plugin
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.ventraip.net.au
* epel: mirror.overthewire.com.au
* extras: centos.mirror.serversaustralia.com.au
* updates: centos.mirror.serversaustralia.com.au
Package clusterhq-flocker-docker-plugin-1.15.0-1.noarch already installed and latest version
Nothing to do
ok check status flocker-dataset-agent
[root@manager1 vagrant]# systemctl status flocker-dataset-agent
● flocker-dataset-agent.service - Flocker Dataset Agent
Loaded: loaded (/usr/lib/systemd/system/flocker-dataset-agent.service; disabled; vendor preset: disabled)
Active: active (running) since Fri 2016-10-14 02:57:41 BST; 1s ago
Main PID: 16908 (flocker-dataset)
Memory: 33.7M
CGroup: /system.slice/flocker-dataset-agent.service
└─16908 /opt/flocker/bin/python /usr/sbin/flocker-dataset-agent --journald
Oct 14 02:57:41 manager1 systemd[1]: flocker-dataset-agent.service holdoff time over, scheduling restart.
Oct 14 02:57:41 manager1 systemd[1]: Started Flocker Dataset Agent.
Oct 14 02:57:41 manager1 systemd[1]: Starting Flocker Dataset Agent...
ok check status flocker-container-agent
[root@manager1 vagrant]# systemctl status flocker-container-agent
● flocker-container-agent.service - Flocker Container Agent
Loaded: loaded (/usr/lib/systemd/system/flocker-container-agent.service; disabled; vendor preset: disabled)
Active: active (running) since Fri 2016-10-14 02:57:56 BST; 760ms ago
Main PID: 17032 (flocker-contain)
Memory: 23.2M
CGroup: /system.slice/flocker-container-agent.service
└─17032 /opt/flocker/bin/python /usr/sbin/flocker-container-agent --journald
Oct 14 02:57:56 manager1 systemd[1]: Started Flocker Container Agent.
Oct 14 02:57:56 manager1 systemd[1]: Starting Flocker Container Agent...
检查状态flocker-docker-plugin
[root@manager1 vagrant]# systemctl status flocker-docker-plugin
● flocker-docker-plugin.service - Flocker Docker Plugin
Loaded: loaded (/usr/lib/systemd/system/flocker-docker-plugin.service; disabled; vendor preset: disabled)
Active: inactive (dead)
启用并重启
[root@manager1 vagrant]# systemctl enable flocker-docker-plugin
Created symlink from /etc/systemd/system/multi-user.target.wants/flocker-docker-plugin.service to /usr/lib/systemd/system/flocker-docker-plugin.service.
[root@manager1 vagrant]# systemctl restart flocker-docker-plugin
[root@manager1 vagrant]# systemctl status flocker-docker-plugin
● flocker-docker-plugin.service - Flocker Docker Plugin
Loaded: loaded (/usr/lib/systemd/system/flocker-docker-plugin.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2016-10-14 02:59:40 BST; 1s ago
Main PID: 17973 (flocker-docker-)
Memory: 43.9M
CGroup: /system.slice/flocker-docker-plugin.service
└─17973 /opt/flocker/bin/python /usr/sbin/flocker-docker-plugin --journald
Oct 14 02:59:40 manager1 systemd[1]: flocker-docker-plugin.service holdoff time over, scheduling restart.
Oct 14 02:59:40 manager1 systemd[1]: Started Flocker Docker Plugin.
Oct 14 02:59:40 manager1 systemd[1]: Starting Flocker Docker Plugin...
好的,再试一次
[root@manager1 vagrant]# docker volume create --name persistent-vol-11 -d flocker
Error response from daemon: create persistent-vol-11: create persistent-vol-11: Error looking up volume plugin flocker: plugin not found
尝试使用带有docker run的插件
[root@manager1 vagrant]# docker run -v apples:/data --volume-driver flocker busybox sh -c "echo hello > /data/file.txt"
Unable to find image 'busybox:latest' locally
latest: Pulling from library/busybox
56bec22e3559: Pull complete
Digest: sha256:29f5d56d12684887bdfa50dcd29fc31eea4aaf4ad3bec43daf19026a7ce69912
Status: Downloaded newer image for busybox:latest
docker: Error response from daemon: create apples: create apples: Error looking up volume plugin flocker: plugin not found.