containers / docker-lvm-plugin

Docker volume plugin for LVM volumes
GNU Lesser General Public License v3.0
155 stars 64 forks source link

needs xfsprogs dependency #37

Closed neurotensin closed 6 years ago

neurotensin commented 7 years ago

This is simple, but I am not sure how to fix this in a golang project.

In driver.go there is cmd = exec.Command("mkfs.xfs", device) Although it sends information of failure to the log l.logger.Err(fmt.Sprintf("Create: mkfs.xfs error: %s output %s", err, string(out))) It only puts this on the console return resp(fmt.Errorf("Error partitioning volume"))

My system is debian jessie, so might be worth checking to see if xfsprogs are installed (or just check the executable).

It may save a number of distracting bug complaints...

shishir-a412ed commented 6 years ago

@neurotensin I think we can check the executable at plugin startup, something like:

if ( /sbin/mkfs.xfs does not exist) {
   Error: mkfs.xfs is not available, please install xfsprogs to continue;
}

@rhatdan WDYT ?

rhatdan commented 6 years ago

SGTM