All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] unfencing
Date: Fri, 20 Feb 2009 15:44:32 -0600	[thread overview]
Message-ID: <20090220214431.GC23911@redhat.com> (raw)

Fencing devices that do not reboot a node, but just cut off storage have
always required the impractical step of re-enabling storage access after the
node has been reset.  We've never provided a mechanism to automate this
unfencing.

Below is an outline of how we might automate unfencing with some simple
extensions to the existing fencing library, config scheme and agents.  It does
not involve the fencing daemon (fenced).  Nodes would unfence themselves when
they start up.  We might also consider a scheme where a node is unfenced by
*other* nodes when it starts up, if that has any advantage over
self-unfencing.

cluster3 is the context, but a similar thing would apply to a next generation
unified fencing system, e.g.
https://www.redhat.com/archives/cluster-devel/2008-October/msg00005.html

init.d/cman would run:
	cman_tool join
	fence_node -U <ourname>
	qdiskd
	groupd
	fenced
	dlm_controld
	gfs_controld
	fence_tool join

The new step fence_node -U <name> would call libfence:fence_node_undo(name).
[fence_node <name> currently calls libfence:fence_node(name) to fence a node.]

libfence:fence_node_undo(node_name) logic:
	for each device_name under given node_name,
	if an unfencedevice exists with name=device_name, then
	run the unfencedevice agent with first arg of "undo"
	and other args the normal combination of node and device args
	(any agent used with unfencing must recognize/support "undo")

[logic derived from cluster.conf structure and similar to fence_node logic]

Example 1:

<clusternode name="foo" nodeid="3">
	<fence>
	<method="1">
		<device name="san" node="foo"/>
	</method>
	</fence>
</clusternode>

<fencedevices>
	<fencedevice name="san" agent="fence_scsi"/>
</fencedevices>

<unfencedevices>
	<unfencedevice name="san" agent="fence_scsi"/>
</unfencedevices>

fence_node_undo("foo") would:
- fork fence_scsi
- pass arg string: undo node="foo" agent="fence_scsi"

[Note: we've talked about fence_scsi getting a device list from
 /etc/cluster/fence_scsi.conf instead of from clvm.  It would require
 more user configuration, but would create fewer problems and should
 be more robust.]

Example 2:

<clusternode name="bar" nodeid="4">
	<fence>
	<method="1">
		<device name="switch1" port="4"/>
		<device name="switch2" port="6"/>
	</method>
	<method="2">
		<device name="apc" port="4"/>
	</method>
	</fence>
</clusternode>

<fencedevices>
	<fencedevice name="switch1" agent="fence_brocade" ipaddr="1.1.1.1"/>
	<fencedevice name="switch2" agent="fence_brocade" ipaddr="2.2.2.2"/>
	<fencedevice name="apc" agent="fence_apc" ipaddr="3.3.3.3"/>
</fencedevices>

<unfencedevices>
	<unfencedevice name="switch1" agent="fence_brocade" ipaddr="1.1.1.1"/>
	<unfencedevice name="switch2" agent="fence_brocade" ipaddr="2.2.2.2"/>
</unfencedevices>

fence_node_undo("bar") would:
- fork fence_brocade
- pass arg string: undo port="4" agent="fence_brocade" ipaddr="1.1.1.1"
- fork fence_brocade
- pass arg string: undo port="6" agent="fence_brocade" ipaddr="2.2.2.2"
- ignore device "apc" because it's not found under <unfencedevices>



             reply	other threads:[~2009-02-20 21:44 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-20 21:44 David Teigland [this message]
2009-02-23  6:27 ` [Cluster-devel] unfencing Fabio M. Di Nitto
2009-02-23 18:15   ` David Teigland
2009-02-23 18:31     ` Fabio M. Di Nitto
2009-02-23 18:40       ` David Teigland
2009-02-23 18:52         ` Fabio M. Di Nitto
2009-02-23 19:09           ` David Teigland
2009-02-23 19:22             ` Ryan O'Hara
2009-02-23 19:27               ` David Teigland
2009-02-23 20:24             ` Ryan O'Hara
2009-02-23 20:28               ` David Teigland
2009-02-26  6:51             ` Fabio M. Di Nitto
2009-02-26 14:33               ` David Teigland
2009-02-26 18:06                 ` [Cluster-devel] unfencing (cman startup) Fabio M. Di Nitto
2009-02-27 12:54                   ` Chrissie Caulfield
2009-02-27 15:52                     ` David Teigland
2009-02-27 16:27                       ` Chrissie Caulfield
2009-02-27 17:46                       ` Fabio M. Di Nitto
2009-03-02  7:59                         ` Chrissie Caulfield
2009-02-23 19:36 ` [Cluster-devel] unfencing Ryan O'Hara
2009-02-23 19:44   ` David Teigland
2009-02-26 21:35 ` David Teigland
2009-02-27  7:04   ` Fabio M. Di Nitto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090220214431.GC23911@redhat.com \
    --to=teigland@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.