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

"zpool": executable file not found #67

Open
nicolasStevenin opened this issue Jan 16, 2018 · 6 comments
Open

"zpool": executable file not found #67

nicolasStevenin opened this issue Jan 16, 2018 · 6 comments

Comments

@nicolasStevenin
Copy link

Hi,

When I try to test your porject it fails with

  • go test -compiler gc -ldflags '-X github.com/mistifyio/go-zfs/version.GitSHA=166add352731e515512690329794ee593f1aaff2 -extldflags '''-Wl,-z,relro ''''
    zfs_test.go:74: unexpected error: exec: "zpool": executable file not found in $PATH: "zpool zpool create test /tmp/zfs-015623521 /tmp/zfs-936753996 /tmp/zfs-071489595" =>

--- FAIL: TestDatasets (0.00s)
zfs_test.go:74: unexpected error: exec: "zpool": executable file not found in $PATH: "zpool zpool create test /tmp/zfs-911153758 /tmp/zfs-579910181 /tmp/zfs-122527040" =>

--- FAIL: TestDatasetGetProperty (0.00s)
zfs_test.go:74: unexpected error: exec: "zpool": executable file not found in $PATH: "zpool zpool create test /tmp/zfs-352642975 /tmp/zfs-305956978 /tmp/zfs-140087081" =>

--- FAIL: TestSnapshots (0.00s)
zfs_test.go:74: unexpected error: exec: "zpool": executable file not found in $PATH: "zpool zpool create test /tmp/zfs-392938612 /tmp/zfs-191840067 /tmp/zfs-120972230" =>

--- FAIL: TestFilesystems (0.00s)
zfs_test.go:74: unexpected error: exec: "zpool": executable file not found in $PATH: "zpool zpool create test /tmp/zfs-363306605 /tmp/zfs-084848360 /tmp/zfs-820738855" =>

--- FAIL: TestCreateFilesystemWithProperties (0.00s)
zfs_test.go:74: unexpected error: exec: "zpool": executable file not found in $PATH: "zpool zpool create test /tmp/zfs-288479322 /tmp/zfs-461731313 /tmp/zfs-613427356" =>

--- FAIL: TestVolumes (0.00s)
zfs_test.go:74: unexpected error: exec: "zpool": executable file not found in $PATH: "zpool zpool create test /tmp/zfs-507569483 /tmp/zfs-925299246 /tmp/zfs-713572789" =>

--- FAIL: TestSnapshot (0.00s)
zfs_test.go:74: unexpected error: exec: "zpool": executable file not found in $PATH: "zpool zpool create test /tmp/zfs-108708752 /tmp/zfs-225214383 /tmp/zfs-188771138" =>

--- FAIL: TestClone (0.00s)
zfs_test.go:74: unexpected error: exec: "zpool": executable file not found in $PATH: "zpool zpool create test /tmp/zfs-074942905 /tmp/zfs-070772164 /tmp/zfs-521692243" =>

--- FAIL: TestSendSnapshot (0.00s)
zfs_test.go:74: unexpected error: exec: "zpool": executable file not found in $PATH: "zpool zpool create test /tmp/zfs-795910550 /tmp/zfs-294920701 /tmp/zfs-851205944" =>

--- FAIL: TestChildren (0.00s)
zfs_test.go:74: unexpected error: exec: "zpool": executable file not found in $PATH: "zpool zpool create test /tmp/zfs-919999799 /tmp/zfs-514381098 /tmp/zfs-689129601" =>

--- FAIL: TestListZpool (0.00s)
zfs_test.go:74: unexpected error: exec: "zpool": executable file not found in $PATH: "zpool zpool create test /tmp/zfs-367396844 /tmp/zfs-327222363 /tmp/zfs-453601790" =>

--- FAIL: TestRollback (0.00s)
zfs_test.go:74: unexpected error: exec: "zpool": executable file not found in $PATH: "zpool zpool create test /tmp/zfs-592104261 /tmp/zfs-918564832 /tmp/zfs-517285311" =>

--- FAIL: TestDiff (0.00s)
FAIL
exit status 1
FAIL github.com/mistifyio/go-zfs 0.005s

Thank you for your help

@nshalman
Copy link
Member

In the shell where you invoke the tests, is zpool in fact available in your PATH?
Please update this issue with the output of these commands:

echo $PATH
which zpool

@nicolasStevenin
Copy link
Author

In fact, zpool doesn't appear in $PATH...
`echo $PATH
/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/build/.local/bin:/home/build/bin

which zpool
/usr/bin/which: no zpool in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/build/.local/bin:/home/build/bin)`

@nshalman
Copy link
Member

Well, that's certainly part of your problem. The tests certainly require a working ZFS kernel module and the userspace binaries to be installed and accessible.

@mmlb
Copy link
Member

mmlb commented Jan 16, 2018

@nicolasStevenin I'll update the test suite today to give better error message (though PR welcome).

@mmlb
Copy link
Member

mmlb commented Jan 16, 2018

I also have a local branch that will build/test on all the supported oses via Vagrant (if that'll be useful to you). I think it'll mean dropping support for Oracle Solaris, but I don't think that'll be a problem.

@spiperac
Copy link

spiperac commented May 1, 2018

On debian/alike zpool is in /sbin/zpool and it's not accessible by non-root users.

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

4 participants