Revision c06e0c83 lib/rpc.py
b/lib/rpc.py | ||
---|---|---|
919 | 919 |
|
920 | 920 |
@classmethod |
921 | 921 |
@_RpcTimeout(_TMO_FAST) |
922 |
def call_node_start_master(cls, node, start_daemons, no_voting):
|
|
923 |
"""Tells a node to activate itself as a master.
|
|
922 |
def call_node_start_master_daemons(cls, node, no_voting):
|
|
923 |
"""Starts master daemons on a node.
|
|
924 | 924 |
|
925 | 925 |
This is a single-node call. |
926 | 926 |
|
927 | 927 |
""" |
928 |
return cls._StaticSingleNodeCall(node, "node_start_master", |
|
929 |
[start_daemons, no_voting])
|
|
928 |
return cls._StaticSingleNodeCall(node, "node_start_master_daemons",
|
|
929 |
[no_voting]) |
|
930 | 930 |
|
931 | 931 |
@classmethod |
932 | 932 |
@_RpcTimeout(_TMO_FAST) |
933 |
def call_node_stop_master(cls, node, stop_daemons):
|
|
934 |
"""Tells a node to demote itself from master status.
|
|
933 |
def call_node_activate_master_ip(cls, node):
|
|
934 |
"""Activates master IP on a node.
|
|
935 | 935 |
|
936 | 936 |
This is a single-node call. |
937 | 937 |
|
938 | 938 |
""" |
939 |
return cls._StaticSingleNodeCall(node, "node_stop_master", [stop_daemons]) |
|
939 |
return cls._StaticSingleNodeCall(node, "node_activate_master_ip", []) |
|
940 |
|
|
941 |
@classmethod |
|
942 |
@_RpcTimeout(_TMO_FAST) |
|
943 |
def call_node_stop_master(cls, node): |
|
944 |
"""Deactivates master IP and stops master daemons on a node. |
|
945 |
|
|
946 |
This is a single-node call. |
|
947 |
|
|
948 |
""" |
|
949 |
return cls._StaticSingleNodeCall(node, "node_stop_master", []) |
|
950 |
|
|
951 |
@classmethod |
|
952 |
@_RpcTimeout(_TMO_FAST) |
|
953 |
def call_node_deactivate_master_ip(cls, node): |
|
954 |
"""Deactivates master IP on a node. |
|
955 |
|
|
956 |
This is a single-node call. |
|
957 |
|
|
958 |
""" |
|
959 |
return cls._StaticSingleNodeCall(node, "node_deactivate_master_ip", []) |
|
940 | 960 |
|
941 | 961 |
@classmethod |
942 | 962 |
@_RpcTimeout(_TMO_URGENT) |
Also available in: Unified diff