Skip to content

Possible fix for issue #36 for mount issue of POD with managed plugin#37

Closed
wdurairaj wants to merge 8 commits intohpe-storage:masterfrom
wdurairaj:master
Closed

Possible fix for issue #36 for mount issue of POD with managed plugin#37
wdurairaj wants to merge 8 commits intohpe-storage:masterfrom
wdurairaj:master

Conversation

@wdurairaj
Copy link

[docker@cld13b4 dory]$ make test
» test
»» Package unit tests
for pkg in github.com/hpe-storage/dory/common/chain github.com/hpe-storage/dory/common/connectivity github.com/hpe-storage/dory/common/docker/dockerlt github.com/hpe-storage/dory/common/docker/dockervol github.com/hpe-storage/dory/common/jconfig github.com/hpe-storage/dory/common/k8s/flexvol github.com/hpe-storage/dory/common/k8s/provisioner github.com/hpe-storage/dory/common/linux github.com/hpe-storage/dory/common/util; do echo "»»» Testing $pkg:" && export GOPATH=/home/docker/my_dory_fork PATH=$PATH:/home/docker/my_dory_fork/bin GOOS=linux GOARCH=amd64 && go test -cover $pkg; done
»»» Testing github.com/hpe-storage/dory/common/chain:
ok      github.com/hpe-storage/dory/common/chain        0.008s  coverage: 100.0% of statements
»»» Testing github.com/hpe-storage/dory/common/connectivity:
ok      github.com/hpe-storage/dory/common/connectivity 14.024s coverage: 78.0% of statements
»»» Testing github.com/hpe-storage/dory/common/docker/dockerlt:
?       github.com/hpe-storage/dory/common/docker/dockerlt      [no test files]
»»» Testing github.com/hpe-storage/dory/common/docker/dockervol:
?       github.com/hpe-storage/dory/common/docker/dockervol     [no test files]
»»» Testing github.com/hpe-storage/dory/common/jconfig:
ok      github.com/hpe-storage/dory/common/jconfig      0.005s  coverage: 100.0% of statements
»»» Testing github.com/hpe-storage/dory/common/k8s/flexvol:
ok      github.com/hpe-storage/dory/common/k8s/flexvol  0.009s  coverage: 9.9% of statements
»»» Testing github.com/hpe-storage/dory/common/k8s/provisioner:
ok      github.com/hpe-storage/dory/common/k8s/provisioner      0.201s  coverage: 11.0% of statements
»»» Testing github.com/hpe-storage/dory/common/linux:
--- FAIL: TestGetDeviceFromMountPoint (0.00s)
        bmount_test.go:37: For dev expected /dev/sda1 got /dev/sda2
--- FAIL: TestGetMountPointFromDevice (0.00s)
        bmount_test.go:53: For mountpoint expected /boot got /boot/efi
FAIL
coverage: 33.3% of statements
FAIL    github.com/hpe-storage/dory/common/linux        0.013s
»»» Testing github.com/hpe-storage/dory/common/util:
ok      github.com/hpe-storage/dory/common/util 0.035s  coverage: 21.1% of statements
»» Command unit tests
for cmd in github.com/hpe-storage/dory/cmd/dory github.com/hpe-storage/dory/cmd/doryd; do echo "»»» Testing $cmd:" && export GOPATH=/home/docker/my_dory_fork PATH=$PATH:/home/docker/my_dory_fork/bin GOOS=linux GOARCH=amd64 && go test -cover $cmd; done
»»» Testing github.com/hpe-storage/dory/cmd/dory:
ok      github.com/hpe-storage/dory/cmd/dory    0.009s  coverage: 72.9% of statements
»»» Testing github.com/hpe-storage/dory/cmd/doryd:
?       github.com/hpe-storage/dory/cmd/doryd   [no test files]

@wdurairaj
Copy link
Author

Logs statements for mount with this change

Debug: 2018/05/23 11:08:13 cmd.go:49: out :mount: special device /opt/hpe/data/hpedocker-dm-uuid-mpath-360002ac0000000000101300100019d52 does not exist
Debug: 2018/05/23 11:08:13 cmd.go:49: out :
Error: 2018/05/23 11:08:13 bmount.go:52: BindMount failed with 32.  It was called with /opt/hpe/data/hpedocker-dm-uuid-mpath-360002ac0000000000101300100019d52 /var/lib/kubelet/pods/d69bda52-5e99-11e8-8d20-ecb1d7a4af30/volumes/hpe.com~hpe/sc-comp31-ac6b9a2a-5e98-11e8-8d20-ecb1d7a4af30 false.  Output=mount: special device /opt/hpe/data/hpedocker-dm-uuid-mpath-360002ac0000000000101300100019d52 does not exist
.
Debug: 2018/05/23 11:08:13 client.go:126: request: action=GET path=http://unix/plugins payload=
Debug: 2018/05/23 11:08:13 client.go:168: response: 200 OK, length=-1
Debug: 2018/05/23 11:08:13 dockerlt.go:62: returning []dockerlt.Plugin{dockerlt.Plugin{ID:"4b206a8e2338214099430b28400acf2c4d70bd8bfa6d06c5f08c0e73ba9a8140", Name:"hpe:latest", Enabled:true, Config:dockerlt.PluginConfig{Interface:dockerlt.PluginInterface{Socket:"hpe.sock"}}}, dockerlt.Plugin{ID:"9e0b886742a37518d04f979ec4464bbb6ec4495fe21503bd612afceae61a812d", Name:"docker/telemetry:1.0.0.linux-x86_64-stable", Enabled:true, Config:dockerlt.PluginConfig{Interface:dockerlt.PluginInterface{Socket:"metrics.sock"}}}}
Debug: 2018/05/23 11:08:13 cmd.go:33: ExecCommandOutput called with mount[--bind /var/lib/docker/plugins/4b206a8e2338214099430b28400acf2c4d70bd8bfa6d06c5f08c0e73ba9a8140/rootfs/opt/hpe/data/hpedocker-dm-uuid-mpath-360002ac0000000000101300100019d52 /var/lib/kubelet/pods/d69bda52-5e99-11e8-8d20-ecb1d7a4af30/volumes/hpe.com~hpe/sc-comp31-ac6b9a2a-5e98-11e8-8d20-ecb1d7a4af30]
Debug: 2018/05/23 11:08:13 cmd.go:49: out :
Debug: 2018/05/23 11:08:13 cmd.go:33: ExecCommandOutput called with selinuxenabled[]
Debug: 2018/05/23 11:08:13 cmd.go:49: out :
Debug: 2018/05/23 11:08:13 selinux.go:32: selinuxenabled returned 0 and err=<nil>
Debug: 2018/05/23 11:08:13 selinux.go:43: Chcon about to change context of /opt/hpe/data/hpedocker-dm-uuid-mpath-360002ac0000000000101300100019d52 to svirt_sandbox_file_t
Debug: 2018/05/23 11:08:13 cmd.go:33: ExecCommandOutput called with chcon[-t svirt_sandbox_file_t /opt/hpe/data/hpedocker-dm-uuid-mpath-360002ac0000000000101300100019d52]
Debug: 2018/05/23 11:08:13 cmd.go:49: out :chcon: cannot access ‘/opt/hpe/data/hpedocker-dm-uuid-mpath-360002ac0000000000101300100019d52’: No such file or directory

@wdurairaj
Copy link
Author

chcon command still fails due to improper path which i will correct.

@wdurairaj
Copy link
Author

closing this pull request , and opened a new one -- #42

@wdurairaj wdurairaj closed this Jul 13, 2018
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

Successfully merging this pull request may close these issues.

1 participant