• R/O
  • SSH

pm_diskd: Commit

※ リポジトリは、pm-diskd ブランチが https://github.com/linux-ha-japan/pm_diskd-1.0 へ、pm-diskd-2.0ブランチが https://github.com/linux-ha-japan/pm_diskd へ移行しました。

Pacemaker 対応ディスク故障監視機能。

Pacemaker-1.0公式リポジトリのクローンに対し、パッチ作成用のブランチを作成して管理する。
ブランチ名: pm-diskd

初回 hg clone 実行後は、hg update -r pm-diskd を実行すること。

Heartbeat-2.1.4 用 hb-diskd(*) のPacemaker対応版
(*) http://sourceforge.jp/projects/linux-ha/releases/?package_id=10555


Commit MetaInfo

Revisiond2bf984a83c685fa035ab6d212a50575e4040a0f (tree)
Time2010-06-09 23:22:54
AuthorYuusuke IIDA <iidayuus@inte...>
CommiterYuusuke IIDA

Log Message

Medium: Shell: allow adding force parameter to resource migrate
(transplanted from 7a0ee1e8132d166e7ce9d314d229ed62427443d5)

Change Summary

Incremental Difference

diff -r 4f8c36ade2b7 -r d2bf984a83c6 doc/crm_cli.txt
--- a/doc/crm_cli.txt Wed Jun 23 13:48:01 2010 +0200
+++ b/doc/crm_cli.txt Wed Jun 09 16:22:54 2010 +0200
@@ -725,7 +725,7 @@
725725
726726 Usage:
727727 ...............
728- migrate <rsc> [<node>] [<lifetime>]
728+ migrate <rsc> [<node>] [<lifetime>] [force]
729729 ...............
730730
731731 [[cmdhelp_resource_unmigrate,unmigrate a resource to another node]]
diff -r 4f8c36ade2b7 -r d2bf984a83c6 shell/modules/ui.py.in
--- a/shell/modules/ui.py.in Wed Jun 23 13:48:01 2010 +0200
+++ b/shell/modules/ui.py.in Wed Jun 09 16:22:54 2010 +0200
@@ -771,7 +771,7 @@
771771 self.cmd_table["demote"] = (self.demote,(1,1),0,(rsc_list,))
772772 self.cmd_table["manage"] = (self.manage,(1,1),0,(rsc_list,))
773773 self.cmd_table["unmanage"] = (self.unmanage,(1,1),0,(rsc_list,))
774- self.cmd_table["migrate"] = (self.migrate,(1,3),0,(rsc_list,nodes_list))
774+ self.cmd_table["migrate"] = (self.migrate,(1,4),0,(rsc_list,nodes_list))
775775 self.cmd_table["unmigrate"] = (self.unmigrate,(1,1),0,(rsc_list,))
776776 self.cmd_table["param"] = (self.param,(3,4),1,(rsc_list,attr_cmds))
777777 self.cmd_table["meta"] = (self.meta,(3,4),1,(rsc_list,attr_cmds))
@@ -837,27 +837,47 @@
837837 return False
838838 return set_deep_meta_attr("is-managed","false",rsc)
839839 def migrate(self,cmd,*args):
840- """usage: migrate <rsc> [<node>] [<lifetime>]"""
840+ """usage: migrate <rsc> [<node>] [<lifetime>] [force]"""
841841 rsc = args[0]
842842 if not is_name_sane(rsc):
843843 return False
844844 node = None
845845 lifetime = None
846+ force = False
846847 if len(args) == 2:
847848 if not args[1] in listnodes():
848- lifetime = args[1]
849+ if args[1] == "force":
850+ force = True
851+ else:
852+ lifetime = args[1]
849853 else:
850854 node = args[1]
851855 elif len(args) == 3:
856+ if not args[1] in listnodes():
857+ lifetime = args[1]
858+ force = True
859+ else:
860+ node = args[1]
861+ if args[2] == "force":
862+ force = True
863+ else:
864+ lifetime = args[2]
865+ elif len(args) == 4:
852866 if not is_name_sane(args[1]):
853867 return False
854868 node = args[1]
855869 lifetime = args[2]
870+ if not args[3] == "force":
871+ syntax_err((cmd,force))
872+ return False
873+ force = True
856874 opts = ''
857875 if node:
858876 opts = "--node='%s'" % node
859877 if lifetime:
860878 opts = "%s --lifetime='%s'" % (opts,lifetime)
879+ if force or user_prefs.get_force():
880+ opts = "%s --force" % opts
861881 return ext_cmd(self.rsc_migrate % (rsc,opts)) == 0
862882 def unmigrate(self,cmd,rsc):
863883 "usage: unmigrate <rsc>"
Show on old repository browser