xen-drbd

diff xen-drbd.py @ 61:e005bb283f54

minor fixes for usage with xen 3.4 (HVM)
author igor@book.xt.vpn
date Thu Jun 25 15:22:25 2009 +0300 (2009-06-25)
parents 8afb0999f562
children
line diff
     1.1 --- a/xen-drbd.py	Fri Oct 10 23:09:52 2008 +0000
     1.2 +++ b/xen-drbd.py	Thu Jun 25 15:22:25 2009 +0300
     1.3 @@ -79,7 +79,8 @@
     1.4      return res
     1.5  
     1.6  def get_drbd_state(resource,node):
     1.7 -    res=run_now("drbdadm state %s | sed s@/.*@@" %resource, node).rstrip("\n")
     1.8 +    #before DRBD 8.3.0: res=run_now("drbdadm state %s | sed s@/.*@@" %resource, node).rstrip("\n")
     1.9 +    res=run_now("drbdadm role %s | sed s@/.*@@" %resource, node).rstrip("\n")
    1.10      if not res:
    1.11          res = -1
    1.12      return res