Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

containers/create #58

Open
unmwww opened this issue Sep 23, 2019 · 13 comments
Open

containers/create #58

unmwww opened this issue Sep 23, 2019 · 13 comments

Comments

@unmwww
Copy link

unmwww commented Sep 23, 2019

  • Plugin version (or commit ref) :sapk/plugin-gluster:latest
  • Docker version :19.03.2
  • Plugin type : managed
  • Operating system: centos7 64bit

Description

[root@docker-node2 data]# docker volume create --driver sapk/plugin-gluster --opt voluri="docker-node2:data_share" --name mysql_data
mysql_data
[root@docker-node2 data]# docker run -v mysql_data:/mnt -ti nginx
docker: Error response from daemon: VolumeDriver.Mount: exit status 1.
[root@docker-node2 data]# mount -t glusterfs docker-node2:data_share /data/client
[root@docker-node2 data]#

--use docker run mount glusterfs exit status 1.
--Using system commands is successful:mount -t glusterfs docker-node2:data_share /data/client

Logs

ep 23 07:42:42 docker-node2 kernel: XFS (dm-3): Mounting V4 Filesystem
Sep 23 07:42:42 docker-node2 kernel: XFS (dm-3): Ending clean mount
Sep 23 07:42:42 docker-node2 kernel: XFS (dm-3): Unmounting Filesystem
Sep 23 07:42:42 docker-node2 dockerd: time="2019-09-23T07:42:42+01:00" level=error msg="2019/09/23 06:42:42 Entering go-plugins-helpers capabilitiesPath" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 07:42:42 docker-node2 dockerd: time="2019-09-23T07:42:42+01:00" level=error msg="2019/09/23 06:42:42 Entering go-plugins-helpers getPath" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 07:42:43 docker-node2 kernel: XFS (dm-3): Mounting V4 Filesystem
Sep 23 07:42:43 docker-node2 kernel: XFS (dm-3): Ending clean mount
Sep 23 07:42:43 docker-node2 dockerd: time="2019-09-23T07:42:43+01:00" level=error msg="2019/09/23 06:42:43 Entering go-plugins-helpers capabilitiesPath" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 07:42:43 docker-node2 dockerd: time="2019-09-23T07:42:43+01:00" level=error msg="2019/09/23 06:42:43 Entering go-plugins-helpers getPath" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 07:42:43 docker-node2 dockerd: time="2019-09-23T07:42:43+01:00" level=error msg="2019/09/23 06:42:43 Entering go-plugins-helpers capabilitiesPath" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 07:42:43 docker-node2 dockerd: time="2019-09-23T07:42:43+01:00" level=error msg="2019/09/23 06:42:43 Entering go-plugins-helpers mountPath" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 07:42:43 docker-node2 kernel: XFS (dm-3): Unmounting Filesystem
Sep 23 07:42:43 docker-node2 dockerd: time="2019-09-23T07:42:43.907368280+01:00" level=error msg="Handler for POST /v1.40/containers/create returned error: VolumeDriver.Mount: exit status 1"

@unmwww
Copy link
Author

unmwww commented Sep 23, 2019

Sep 23 08:05:33 docker-node2 kernel: XFS (dm-3): Mounting V4 Filesystem
Sep 23 08:05:33 docker-node2 kernel: XFS (dm-3): Ending clean mount
Sep 23 08:05:33 docker-node2 kernel: XFS (dm-3): Unmounting Filesystem
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="2019/09/23 07:05:34 Entering go-plugins-helpers capabilitiesPath" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="time="2019-09-23T07:05:34Z" level=debug msg="Entering Capabilities"" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="2019/09/23 07:05:34 Entering go-plugins-helpers getPath" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="time="2019-09-23T07:05:34Z" level=debug msg="Entering Get: name: mysql_data"" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="time="2019-09-23T07:05:34Z" level=debug msg="Volume found: &{ mysql_data %!s(int=0)}"" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="time="2019-09-23T07:05:34Z" level=debug msg="Mount found: &{/var/lib/docker-volumes/gluster/mysql_data %!s(int=0)}"" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 kernel: XFS (dm-3): Mounting V4 Filesystem
Sep 23 08:05:34 docker-node2 kernel: XFS (dm-3): Ending clean mount
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="2019/09/23 07:05:34 Entering go-plugins-helpers capabilitiesPath" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="time="2019-09-23T07:05:34Z" level=debug msg="Entering Capabilities"" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="2019/09/23 07:05:34 Entering go-plugins-helpers getPath" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="time="2019-09-23T07:05:34Z" level=debug msg="Entering Get: name: mysql_data"" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="time="2019-09-23T07:05:34Z" level=debug msg="Volume found: &{ mysql_data %!s(int=0)}"" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="time="2019-09-23T07:05:34Z" level=debug msg="Mount found: &{/var/lib/docker-volumes/gluster/mysql_data %!s(int=0)}"" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="2019/09/23 07:05:34 Entering go-plugins-helpers capabilitiesPath" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="time="2019-09-23T07:05:34Z" level=debug msg="Entering Capabilities"" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="2019/09/23 07:05:34 Entering go-plugins-helpers mountPath" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="time="2019-09-23T07:05:34Z" level=debug msg="Entering Mount: &{mysql_data f9bcc5a4e1f97699b807f245beb8b38ac541eb1d77a2e8e6ceb7366a908a4527}"" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="time="2019-09-23T07:05:34Z" level=debug msg="Entering MountExist: name: mysql_data"" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="time="2019-09-23T07:05:34Z" level=debug msg="Volume found: &{ mysql_data %!s(int=0)}"" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="time="2019-09-23T07:05:34Z" level=debug msg="Mount found: &{/var/lib/docker-volumes/gluster/mysql_data %!s(int=0)}"" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="2019/09/23 07:05:34 http: panic serving @: runtime error: index out of range" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="goroutine 51 [running]:" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="net/http.(*conn).serve.func1(0xc00013e1e0)" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="\t/usr/local/go/src/net/http/server.go:1746 +0xd0" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="panic(0x83ff20, 0xc2cb30)" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="\t/usr/local/go/src/runtime/panic.go:513 +0x1b9" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="github.com/sapk/docker-volume-gluster/gluster/driver.parseVolURI(0x0, 0x0, 0x0, 0xa)" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="\t/go/src/app/.gopath/src/github.com/sapk/docker-volume-gluster/gluster/driver/tools.go:74 +0x1c6" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="github.com/sapk/docker-volume-gluster/gluster/driver.(*GlusterDriver).Mount(0xc0000a0820, 0xc0001b85a0, 0x0, 0x0, 0x0)" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="\t/go/src/app/.gopath/src/github.com/sapk/docker-volume-gluster/gluster/driver/driver.go:239 +0x19c" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="github.com/sapk/docker-volume-gluster/vendor/github.com/docker/go-plugins-helpers/volume.(*Handler).initMux.func3(0x932f80, 0xc0001be540, 0xc0001aa600)" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="\t/go/src/app/.gopath/src/github.com/sapk/docker-volume-gluster/vendor/github.com/docker/go-plugins-helpers/volume/api.go:166 +0xe9" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="net/http.HandlerFunc.ServeHTTP(0xc000083770, 0x932f80, 0xc0001be540, 0xc0001aa600)" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="\t/usr/local/go/src/net/http/server.go:1964 +0x44" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="net/http.(*ServeMux).ServeHTTP(0xc000087c50, 0x932f80, 0xc0001be540, 0xc0001aa600)" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="\t/usr/local/go/src/net/http/server.go:2361 +0x127" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="net/http.serverHandler.ServeHTTP(0xc0000896c0, 0x932f80, 0xc0001be540, 0xc0001aa600)" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="\t/usr/local/go/src/net/http/server.go:2741 +0xab" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="net/http.(*conn).serve(0xc00013e1e0, 0x933300, 0xc0001b02c0)" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="\t/usr/local/go/src/net/http/server.go:1847 +0x646" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="created by net/http.(*Server).Serve" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34+01:00" level=error msg="\t/usr/local/go/src/net/http/server.go:2851 +0x2f5" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:34 docker-node2 dockerd: time="2019-09-23T08:05:34.361219716+01:00" level=warning msg="Unable to connect to plugin: /run/docker/plugins/4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128/gluster.sock/VolumeDriver.Mount: Post http://%2Frun%2Fdocker%2Fplugins%2F4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128%2Fgluster.sock/VolumeDriver.Mount: EOF, retrying in 1s"
Sep 23 08:05:35 docker-node2 dockerd: time="2019-09-23T08:05:35+01:00" level=error msg="2019/09/23 07:05:35 Entering go-plugins-helpers mountPath" plugin=4aeb7d50a3ea0e89b9155a7527f2dd3637ff810bf7bab0cf6f8ecb9da1c47128
Sep 23 08:05:35 docker-node2 kernel: XFS (dm-3): Unmounting Filesystem
Sep 23 08:05:36 docker-node2 dockerd: time="2019-09-23T08:05:36.320383614+01:00" level=error msg="Handler for POST /v1.40/containers/create returned error: VolumeDriver.Mount: EOF\n"

@sapk
Copy link
Owner

sapk commented Sep 23, 2019

Like suggested in #57 it seems to be a duplicate of #34

@unmwww
Copy link
Author

unmwww commented Sep 23, 2019

following command can be executed successfully:
#glusterfs --volfile-id='gfs_mysql_data' -s 'ocker-node1' /var/lib/docker-volumes/gluster/gfs_mysql_data

However the plugin unsuccess , log:
Sep 23 09:45:44 docker-node1 dockerd: time="2019-09-23T09:45:44+01:00" level=error msg="time="2019-09-23T08:45:44Z" level=debug msg="glusterfs --volfile-id='gfs_mysql_data' -s 'ocker-node1' /var/lib/docker-volumes/gluster/gfs_mysql_data"" plugin=b3dc22df4efdc75c78747ecb9a6094638b98635244842fbdcb75b03fd2bf7cf6
Sep 23 09:45:44 docker-node1 dockerd: time="2019-09-23T09:45:44+01:00" level=error msg="time="2019-09-23T08:45:44Z" level=debug msg="Error: exit status 107"" plugin=b3dc22df4efdc75c78747ecb9a6094638b98635244842fbdcb75b03fd2bf7cf6
Sep 23 09:45:44 docker-node1 dockerd: time="2019-09-23T09:45:44+01:00" level=error msg="time="2019-09-23T08:45:44Z" level=debug msg="Output: []"" plugin=b3dc22df4efdc75c78747ecb9a6094638b98635244842fbdcb75b03fd2bf7cf6
Sep 23 09:45:44 docker-node1 kernel: XFS (dm-4): Unmounting Filesystem
Sep 23 09:45:45 docker-node1 dockerd: time="2019-09-23T09:45:45.025863940+01:00" level=error msg="Handler for POST /v1.40/containers/create returned error: VolumeDriver.Mount: exit status 107"

@unmwww
Copy link
Author

unmwww commented Sep 25, 2019

I use "nsenter" command enter the volume plugin ,and log output is as follows.
How do I position the problem?

[root@docker-node1:~#/usr/bin/docker-volume-gluster daemon -v
2019/09/25 02:57:15 Entering go-plugins-helpers capabilitiesPath
DEBU[0046] Entering Capabilities
2019/09/25 02:57:15 Entering go-plugins-helpers getPath
DEBU[0046] Entering Get: name: gfs_mysql_data
DEBU[0046] Volume found: &{ gfs_mysql_data %!s(int=0)}
DEBU[0046] Mount found: &{/var/lib/docker-volumes/gluster/gfs_mysql_data %!s(int=0)}
2019/09/25 02:57:15 Entering go-plugins-helpers capabilitiesPath
DEBU[0046] Entering Capabilities
2019/09/25 02:57:15 Entering go-plugins-helpers getPath
DEBU[0046] Entering Get: name: gfs_mysql_data
DEBU[0046] Volume found: &{ gfs_mysql_data %!s(int=0)}
DEBU[0046] Mount found: &{/var/lib/docker-volumes/gluster/gfs_mysql_data %!s(int=0)}
2019/09/25 02:57:15 Entering go-plugins-helpers capabilitiesPath
DEBU[0046] Entering Capabilities
2019/09/25 02:57:15 Entering go-plugins-helpers mountPath
DEBU[0046] Entering Mount: &{gfs_mysql_data 725a6c2714cd337140118fe2b11eec1832f2a739e4ef81fe4a503dfa0133ae7a}
DEBU[0046] Entering MountExist: name: gfs_mysql_data
DEBU[0046] Volume found: &{ gfs_mysql_data %!s(int=0)}
DEBU[0046] Mount found: &{/var/lib/docker-volumes/gluster/gfs_mysql_data %!s(int=0)}
2019/09/25 02:57:15 http: panic serving @: runtime error: index out of range
goroutine 19 [running]:
net/http.(*conn).serve.func1(0xc0000ad540)
/usr/local/go/src/net/http/server.go:1746 +0xd0
panic(0x83ff20, 0xc2cb30)
/usr/local/go/src/runtime/panic.go:513 +0x1b9
github.com/sapk/docker-volume-gluster/gluster/driver.parseVolURI(0x0, 0x0, 0x0, 0xe)
/go/src/app/.gopath/src/github.com/sapk/docker-volume-gluster/gluster/driver/tools.go:74 +0x1c6
github.com/sapk/docker-volume-gluster/gluster/driver.(*GlusterDriver).Mount(0xc0000aa820, 0xc0000a70c0, 0x0, 0x0, 0x0)
/go/src/app/.gopath/src/github.com/sapk/docker-volume-gluster/gluster/driver/driver.go:239 +0x19c
github.com/sapk/docker-volume-gluster/vendor/github.com/docker/go-plugins-helpers/volume.(*Handler).initMux.func3(0x932f80, 0xc00014c2a0, 0xc00011eb00)
/go/src/app/.gopath/src/github.com/sapk/docker-volume-gluster/vendor/github.com/docker/go-plugins-helpers/volume/api.go:166 +0xe9
net/http.HandlerFunc.ServeHTTP(0xc00008db90, 0x932f80, 0xc00014c2a0, 0xc00011eb00)
/usr/local/go/src/net/http/server.go:1964 +0x44
net/http.(*ServeMux).ServeHTTP(0xc00008fe30, 0x932f80, 0xc00014c2a0, 0xc00011eb00)
/usr/local/go/src/net/http/server.go:2361 +0x127
net/http.serverHandler.ServeHTTP(0xc000091860, 0x932f80, 0xc00014c2a0, 0xc00011eb00)
/usr/local/go/src/net/http/server.go:2741 +0xab
net/http.(*conn).serve(0xc0000ad540, 0x933300, 0xc00009e600)
/usr/local/go/src/net/http/server.go:1847 +0x646
created by net/http.(*Server).Serve

@sapk
Copy link
Owner

sapk commented Sep 25, 2019

The first lines of the panic :

/usr/local/go/src/runtime/panic.go:513 +0x1b9
github.com/sapk/docker-volume-gluster/gluster/driver.parseVolURI(0x0, 0x0, 0x0, 0xe)
/go/src/app/.gopath/src/github.com/sapk/docker-volume-gluster/gluster/driver/tools.go:74 +0x1c6

@unmwww
Copy link
Author

unmwww commented Sep 25, 2019

2019/09/25 11:27:53 Entering go-plugins-helpers mountPath
2019/09/25 11:28:04 Entering go-plugins-helpers capabilitiesPath
DEBU[0023] Entering Capabilities
2019/09/25 11:28:04 Entering go-plugins-helpers getPath
DEBU[0023] Entering Get: name: gfs_mysql_data
DEBU[0023] Volume found: &{ gfs_mysql_data %!s(int=0)}
DEBU[0023] Mount found: &{/var/lib/docker-volumes/gluster/gfs_mysql_data %!s(int=0)}
2019/09/25 11:28:05 Entering go-plugins-helpers capabilitiesPath
DEBU[0023] Entering Capabilities
2019/09/25 11:28:05 Entering go-plugins-helpers getPath
DEBU[0023] Entering Get: name: gfs_mysql_data
DEBU[0023] Volume found: &{ gfs_mysql_data %!s(int=0)}
DEBU[0023] Mount found: &{/var/lib/docker-volumes/gluster/gfs_mysql_data %!s(int=0)}
2019/09/25 11:28:05 Entering go-plugins-helpers capabilitiesPath
DEBU[0023] Entering Capabilities
2019/09/25 11:28:05 Entering go-plugins-helpers mountPath
DEBU[0023] Entering Mount: &{gfs_mysql_data 44d77a1fa540f62915ecae26a128c8e7c0c0e9b3b41a9ad666fdd8912515a118}
DEBU[0023] Entering MountExist: name: gfs_mysql_data
DEBU[0023] Volume found: &{ gfs_mysql_data %!s(int=0)}
DEBU[0023] Mount found: &{/var/lib/docker-volumes/gluster/gfs_mysql_data %!s(int=0)}
DEBU[0023] volURI: olURI
2019/09/25 11:28:05 http: panic serving @: runtime error: index out of range
goroutine 5 [running]:
net/http.(*conn).serve.func1(0xc00008d4a0)
/root/go/src/net/http/server.go:1769 +0xc9
panic(0x87ef00, 0xcd5ae0)
/root/go/src/runtime/panic.go:522 +0x1b5
github.com/sapk/docker-volume-gluster/gluster/driver.parseVolURI(0x0, 0x0, 0x0, 0xe)
/tmp/docker-volume-gluster-old/docker-volume-gluster/.gopath/src/github.com/sapk/docker-volume-gluster/gluster/driver/tools.go:75 +0x28f
github.com/sapk/docker-volume-gluster/gluster/driver.(*GlusterDriver).Mount(0xc00008a780, 0xc00000ee00, 0x0, 0x0, 0x0)

@unmwww
Copy link
Author

unmwww commented Sep 25, 2019

why v.GetRemote() is null ???
DEBU[0007] ---->###,v.GetMount():gfs_mysql_data,v.GetRemote():

@unmwww
Copy link
Author

unmwww commented Sep 25, 2019

I enter the volume plugin runtime, and run glusterfs comand is success.
So then, what is the problem ?

[root@docker-host docker-volume-gluster]# ps -ef|grep glus
root 20642 20618 7 15:59 ? 00:00:00 /usr/bin/docker-volume-gluster daemon
root 20672 2795 0 15:59 pts/0 00:00:00 grep --color=auto glus
[root@docker-host docker-volume-gluster]# nsenter --target 20642 --mount --uts --ipc --net --pid
root@docker-host:/var/lib/docker-volumes/gluster/gfs_mysql_data# glusterfs --volfile-id=gfs_mysql_data -s 192.168.56.11 /var/lib/docker-volumes/gluster/gfs_mysql_data
root@docker-host:/var/lib/docker-volumes/gluster# cd gfs_mysql_data/gfs_mysql_data/
abc ttt
root@docker-host:/var/lib/docker-volumes/gluster# cd gfs_mysql_data/gfs_mysql_data/
root@docker-host:/var/lib/docker-volumes/gluster/gfs_mysql_data/gfs_mysql_data# exit
logout
[root@docker-host docker-volume-gluster]# ps -ef|grep glus
root 20642 20618 0 15:59 ? 00:00:00 /usr/bin/docker-volume-gluster daemon
root 20833 20642 0 16:02 ? 00:00:00 glusterfs --volfile-id=gfs_mysql_data -s 192.168.56.11 /var/lib/docker-volumes/gluster/gfs_mysql_data
root 20855 2795 0 16:02 pts/0 00:00:00 grep --color=auto glus
[root@docker-host docker-volume-gluster]# ps -ef|grep glus
root 20642 20618 0 15:59 ? 00:00:00 /usr/bin/docker-volume-gluster daemon
root 20833 20642 0 16:02 ? 00:00:00 glusterfs --volfile-id=gfs_mysql_data -s 192.168.56.11 /var/lib/docker-volumes/gluster/gfs_mysql_data
root 20857 2795 0 16:02 pts/0 00:00:00 grep --color=auto glus
[root@docker-host docker-volume-gluster]# ps -ef|grep glus
root 20642 20618 0 15:59 ? 00:00:00 /usr/bin/docker-volume-gluster daemon
root 20833 20642 0 16:02 ? 00:00:00 glusterfs --volfile-id=gfs_mysql_data -s 192.168.56.11 /var/lib/docker-volumes/gluster/gfs_mysql_data
root 20859 2795 0 16:02 pts/0 00:00:00 grep --color=auto glus
[root@docker-host docker-volume-gluster]# ps -ef|grep glus
root 20642 20618 0 15:59 ? 00:00:00 /usr/bin/docker-volume-gluster daemon
root 20833 20642 0 16:02 ? 00:00:00 glusterfs --volfile-id=gfs_mysql_data -s 192.168.56.11 /var/lib/docker-volumes/gluster/gfs_mysql_data
root 20861 2795 0 16:02 pts/0 00:00:00 grep --color=auto glus
[root@docker-host docker-volume-gluster]# nsenter --target 20642 --mount --uts --ipc --net --pid
mesg: ttyname failed: No such device
root@docker-host:/# /usr/bin/docker-volume-gluster daemon -v
DEBU[0000] Debug mode on
DEBU[0000] Init gluster driver at /var/lib/docker-volumes/gluster, UniqName: false
DEBU[0000] Retrieving volume list from persistence file.
DEBU[0000] &{{{0 0} 0 0 0 0} /var/lib/docker-volumes/gluster false 0xc0000ea780 map[gfs_mysql_data:0xc000021bf0] map[gfs_mysql_data:0xc00000eaa0]}
DEBU[0000] &{0xc000098780 {0xc000068780}}

2019/09/25 15:02:49 Entering go-plugins-helpers mountPath
2019/09/25 15:02:54 Entering go-plugins-helpers capabilitiesPath
DEBU[0011] Entering Capabilities
2019/09/25 15:02:54 Entering go-plugins-helpers getPath
DEBU[0011] Entering Get: name: gfs_mysql_data
DEBU[0011] ---->>>d.GetVolumes(): map[gfs_mysql_data:%!s(*driver.GlusterVolume=&{ gfs_mysql_data 0})]
DEBU[0011] ---->###,v.GetMount():gfs_mysql_data,v.GetRemote():, v.GetConnections():%!s(int=0),v.GetStatus():map[TODO:List]
DEBU[0011] method[0]GetConnections and type is func(*driver.GlusterVolume) int
DEBU[0011] method[1]GetMount and type is func(*driver.GlusterVolume) string
DEBU[0011] method[2]GetRemote and type is func(*driver.GlusterVolume) string
DEBU[0011] method[3]GetStatus and type is func(*driver.GlusterVolume) map[string]interface {}
DEBU[0011] method[4]SetConnections and type is func(*driver.GlusterVolume, int)
DEBU[0011] Volume found: &{ gfs_mysql_data %!s(int=0)}
DEBU[0011] Mount found: &{/var/lib/docker-volumes/gluster/gfs_mysql_data %!s(int=0)}
2019/09/25 15:02:54 Entering go-plugins-helpers capabilitiesPath
DEBU[0011] Entering Capabilities
2019/09/25 15:02:54 Entering go-plugins-helpers getPath
DEBU[0011] Entering Get: name: gfs_mysql_data
DEBU[0011] ---->>>d.GetVolumes(): map[gfs_mysql_data:%!s(*driver.GlusterVolume=&{ gfs_mysql_data 0})]
DEBU[0011] ---->###,v.GetMount():gfs_mysql_data,v.GetRemote():, v.GetConnections():%!s(int=0),v.GetStatus():map[TODO:List]
DEBU[0011] method[0]GetConnections and type is func(*driver.GlusterVolume) int
DEBU[0011] method[1]GetMount and type is func(*driver.GlusterVolume) string
DEBU[0011] method[2]GetRemote and type is func(*driver.GlusterVolume) string
DEBU[0011] method[3]GetStatus and type is func(*driver.GlusterVolume) map[string]interface {}
DEBU[0011] method[4]SetConnections and type is func(*driver.GlusterVolume, int)
DEBU[0011] Volume found: &{ gfs_mysql_data %!s(int=0)}
DEBU[0011] Mount found: &{/var/lib/docker-volumes/gluster/gfs_mysql_data %!s(int=0)}
2019/09/25 15:02:54 Entering go-plugins-helpers capabilitiesPath
DEBU[0011] Entering Capabilities
2019/09/25 15:02:54 Entering go-plugins-helpers mountPath
DEBU[0011] Entering Mount: &{gfs_mysql_data 884020ef2cec97117a05c12768a2ec67df5cb1ed703c325f91f4a8490a131bd5}
DEBU[0011] Entering MountExist: name: gfs_mysql_data
DEBU[0011] ---->>>d.GetVolumes(): map[gfs_mysql_data:%!s(*driver.GlusterVolume=&{ gfs_mysql_data 0})]
DEBU[0011] ---->###,v.GetMount():gfs_mysql_data,v.GetRemote():, v.GetConnections():%!s(int=0),v.GetStatus():map[TODO:List]
DEBU[0011] method[0]GetConnections and type is func(*driver.GlusterVolume) int
DEBU[0011] method[1]GetMount and type is func(*driver.GlusterVolume) string
DEBU[0011] method[2]GetRemote and type is func(*driver.GlusterVolume) string
DEBU[0011] method[3]GetStatus and type is func(*driver.GlusterVolume) map[string]interface {}
DEBU[0011] method[4]SetConnections and type is func(*driver.GlusterVolume, int)
DEBU[0011] Volume found: &{ gfs_mysql_data %!s(int=0)}
DEBU[0011] Mount found: &{/var/lib/docker-volumes/gluster/gfs_mysql_data %!s(int=0)}
DEBU[0011] volURI: olURI
2019/09/25 15:02:54 http: panic serving @: runtime error: index out of range
goroutine 5 [running]:

@unmwww
Copy link
Author

unmwww commented Sep 26, 2019

why GetRemote() return null?
DEBU[0017] GetVolumes,k:gfs_mysql_data,i:&{ gfs_mysql_data %!s(int=0)}
DEBU[0017] -------i.GetMount:gfs_mysql_data,i.GetRemote:
DEBU[0017] GetMounts,k:gfs_mysql_data,i:&{/var/lib/docker-volumes/gluster/gfs_mysql_data %!s(int=0)}

@unmwww
Copy link
Author

unmwww commented Sep 26, 2019

Two problems were found. One was that the container had stopped and the volume was still in use when it was deleted.Another problem is "docker volume rm" cannot be deleted the volume:
[root@docker-host driver]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4f1fac50370a registry:2.5 "/entrypoint.sh /etc…" 4 days ago Up 15 hours 0.0.0.0:5000->5000/tcp registry
[root@docker-host driver]# docker volume rm gfs_mysql_data2
Error response from daemon: remove gfs_mysql_data2: VolumeDriver.Remove: volume gfs_mysql_data2 is currently used by a container
[root@docker-host driver]# docker volume rm gfs_mysql_data
gfs_mysql_data
[root@docker-host driver]# docker volume inspect gfs_mysql_data
[
{
"CreatedAt": "0001-01-01T00:00:00Z",
"Driver": "sapk/plugin-gluster:latest",
"Labels": null,
"Mountpoint": "/var/lib/docker-volumes/gluster/gfs_mysql_data",
"Name": "gfs_mysql_data",
"Options": null,
"Scope": "global",
"Status": {
"TODO": "List"
}
}
]

@unmwww
Copy link
Author

unmwww commented Sep 26, 2019

There are so many problems that we can't use it formally. It seems that a lot of problems cannot be solved. I wonder if k8s has such problems

@sapk
Copy link
Owner

sapk commented Sep 26, 2019

Please see #44, on an other plugin I change how I managed management of volume but it introduce other bug when done with this one and haven't time to look at it.

@unmwww
Copy link
Author

unmwww commented Sep 27, 2019

I use the "make docker-plugin" command to install the plugin can be normal running, Maybe the official image is lossy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants