xen-drbd

changeset 60:dd23766a87c6

Minor fixes. Hvmlaoder now can be specified by its path in the netowrk config file.
Also slightly changed drbdadm call
author igor@book.xt.vpn
date Thu Mar 19 19:42:41 2009 +0200 (2009-03-19)
parents d68ff2fdea92
children e005bb283f54
files xen-drbd-start.py xen-drbd.py
line diff
     1.1 --- a/xen-drbd-start.py	Tue Oct 14 11:33:59 2008 +0300
     1.2 +++ b/xen-drbd-start.py	Thu Mar 19 19:42:41 2009 +0200
     1.3 @@ -38,8 +38,13 @@
     1.4  	print "Can't find or interpret module %s with topology description" %(network)
     1.5  	sys.exit(1)
     1.6  
     1.7 +try:
     1.8 +    hvmloader
     1.9 +except:
    1.10 +    hvmloader='hvmloader'
    1.11 +
    1.12  if domain_types[N] == 'hvm':
    1.13 -    kernel='hvmloader'
    1.14 +    kernel=hvmloader
    1.15      builder='hvm'
    1.16  
    1.17  try:
     2.1 --- a/xen-drbd.py	Tue Oct 14 11:33:59 2008 +0300
     2.2 +++ b/xen-drbd.py	Thu Mar 19 19:42:41 2009 +0200
     2.3 @@ -79,7 +79,8 @@
     2.4      return res
     2.5  
     2.6  def get_drbd_state(resource,node):
     2.7 -    res=run_now("drbdadm state %s | sed s@/.*@@" %resource, node).rstrip("\n")
     2.8 +    #before DRBD 8.3.0: res=run_now("drbdadm state %s | sed s@/.*@@" %resource, node).rstrip("\n")
     2.9 +    res=run_now("drbdadm role %s | sed s@/.*@@" %resource, node).rstrip("\n")
    2.10      if not res:
    2.11          res = -1
    2.12      return res