...
authorS.Çağlar Onur <caglar@cs.princeton.edu>
Tue, 27 Jul 2010 17:15:01 +0000 (13:15 -0400)
committerS.Çağlar Onur <caglar@cs.princeton.edu>
Tue, 27 Jul 2010 17:15:01 +0000 (13:15 -0400)
commit69124f104991e36e254c0be4a5f8155609f1d3fe
tree2e02cf788a0e62ae0079491d08b19a60beb5b5d7
parent597ff6eb3282a46ed766cb1c6c3659d68bf7bcb6
...
        cmd = "pvdisplay %s | grep -q 'planetlab'" % lvm_partition
        already_added= utils.sysexec_noerr(cmd, log)

        if already_added:
            log.write( "It appears %s is part of the volume group, continuing.\n" %
                       device )
....

fails because pvdisplay returns a non-negative number on error

[root@mlab1 ~]# pvdisplay /dev/sdb1
  Failed to read physical volume "/dev/sdb1"
[root@mlab1 ~]# echo $?
  5
source/steps/CheckForNewDisks.py