Closed shishir-a412ed closed 8 years ago
Let's say I have a regular volume foobar
and I call isThinlyProvisioned()
function to determine if foobar
is a regular or thin volume.
IsThinlyProvisioned()
will do a lvdisplay /dev/volume_group_one/foobar | grep "LV Pool"
where volume_group_one
is my volume group name. Since foobar is a regular volume, grep will return no output and an exit code 1
.
http://www.gnu.org/software/grep/manual/html_node/Exit-Status.html According to GNU Grep:
Exit code 0: Match found Exit code 1: No match found Exit code 2: Error
With Exit code 1, our golang code will treat this as an error and https://github.com/projectatomic/docker-lvm-plugin/blob/master/driver.go#L320 will return an error. We need to ignore this error, since this is not really an error. It is just a pattern match not found.
More Explanation here: https://github.com/projectatomic/docker-lvm-plugin/pull/9#issuecomment-235129127
Shishir
@rhatdan @runcom Please review.
@runcom PTAL.
Shishir
Seems ok to me Shishir
Signed-off-by: Shishir Mahajan shishir.mahajan@redhat.com