Commit c46b9782 authored by Luca Bigliardi's avatar Luca Bigliardi
Browse files

Add drbd_helper rpc call


Signed-off-by: default avatarLuca Bigliardi <shammash@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 15cf9cbb
......@@ -361,6 +361,13 @@ class NodeHttpServer(http.server.HttpServer):
disks = [objects.Disk.FromDict(cf) for cf in disks]
return backend.DrbdWaitSync(nodes_ip, disks)
@staticmethod
def perspective_drbd_helper(params):
"""Query drbd helper.
"""
return backend.GetDrbdUsermodeHelper()
# export/import --------------------------
@staticmethod
......
......@@ -3055,6 +3055,16 @@ def DrbdWaitSync(nodes_ip, disks):
return (alldone, min_resync)
def GetDrbdUsermodeHelper():
"""Returns DRBD usermode helper currently configured.
"""
try:
return bdev.BaseDRBD.GetUsermodeHelper()
except errors.BlockDeviceError, err:
_Fail(str(err))
def PowercycleNode(hypervisor_type):
"""Hard-powercycle the node.
......
......@@ -993,6 +993,15 @@ class RpcRunner(object):
return self._MultiNodeCall(node_list, "drbd_wait_sync",
[nodes_ip, [cf.ToDict() for cf in disks]])
@_RpcTimeout(_TMO_URGENT)
def call_drbd_helper(self, node_list):
"""Gets drbd helper.
This is a multi-node call.
"""
return self._MultiNodeCall(node_list, "drbd_helper", [])
@classmethod
@_RpcTimeout(_TMO_NORMAL)
def call_upload_file(cls, node_list, file_name, address_list=None):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment