Re: [ClusterLabs] About fencing stonith

2018-09-26 Thread Jan Pokorný
On 26/09/18 20:19 +0200, Valentin Vidic wrote:
> On Thu, Sep 06, 2018 at 04:47:32PM -0400, Digimer wrote:
>> It depends on the hardware you have available. In your case, RPi has no
>> IPMI or similar feature, so you'll need something external, like a
>> switched PDU. I like the APC AP7900 (or your countries variant), which
>> you can often get used for a decent price if this isn't a production system.
>> 
>> http://www.apc.com/shop/us/en/products/Rack-PDU-Switched-1U-15A-100-120V-85-15/P-AP7900
> 
> RPi should have a reset pin, so it might be possible to cross connect
> GPIO from one RPi to a reset pin on another and get a cheap reset
> functionality.

Hacking at its best :-D

-- 
Nazdar,
Jan (Poki)


pgpU85b2SJWqh.pgp
Description: PGP signature
___
Users mailing list: Users@clusterlabs.org
https://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] About fencing stonith

2018-09-26 Thread Valentin Vidic
On Thu, Sep 06, 2018 at 04:47:32PM -0400, Digimer wrote:
> It depends on the hardware you have available. In your case, RPi has no
> IPMI or similar feature, so you'll need something external, like a
> switched PDU. I like the APC AP7900 (or your countries variant), which
> you can often get used for a decent price if this isn't a production system.
> 
> http://www.apc.com/shop/us/en/products/Rack-PDU-Switched-1U-15A-100-120V-85-15/P-AP7900

RPi should have a reset pin, so it might be possible to cross connect
GPIO from one RPi to a reset pin on another and get a cheap reset
functionality.

-- 
Valentin
___
Users mailing list: Users@clusterlabs.org
https://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] About fencing stonith

2018-09-07 Thread Klaus Wenninger
On 09/07/2018 11:41 AM, Klaus Wenninger wrote:
> On 09/06/2018 10:47 PM, Digimer wrote:
>> On 2018-09-06 04:33 PM, Marcos Renato da Silva Junior wrote:
>>> Hi,
>>>
>>> I created a testing environment based on Raspberry Pi (attached
>>> diagram), in my tests it has worked well, but I did not implement
>>> anything about fencing and stonith, what is the need and how to implement?
>>>
>>> Thanks,
>>>
>>> Marcos.
>> It depends on the hardware you have available. In your case, RPi has no
>> IPMI or similar feature, so you'll need something external, like a
>> switched PDU. I like the APC AP7900 (or your countries variant), which
>> you can often get used for a decent price if this isn't a production system.
>>
>> http://www.apc.com/shop/us/en/products/Rack-PDU-Switched-1U-15A-100-120V-85-15/P-AP7900
>>
>>
> For a test-environment switching mains might be an overkill.
> And it makes the nice and tiny test-environment a lot less
> nice and tiny ;-)
> Anyway the scenario made me google a little bit.
> e.g.: https://www.yepkit.com/products/ykush

Some code and a list of alternative devices:
https://github.com/mvp/uhubctl

> is what I stumbled over.
> Add a RPi to it and you have IP-controlled USB-power.
> (Guess I have to order one to play with ;-) )
>
> On the other hand iirc the Broadcom-SOC found in the RPi
> has a hardware-watchdog the linux-kernel has a driver
> for. So you might consider going for SBD (no shared disk)
> with watchdog-fencing as well.
> But that would require you to add a 3rd node (or some
> kind of shared disk).
> Andrew's blog article is a nice introduction:
> http://blog.clusterlabs.org/blog/2015/sbd-fun-and-profit
>
> Klaus
>
> ___
> Users mailing list: Users@clusterlabs.org
> https://lists.clusterlabs.org/mailman/listinfo/users
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org

___
Users mailing list: Users@clusterlabs.org
https://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] About fencing stonith

2018-09-07 Thread Klaus Wenninger
On 09/06/2018 10:47 PM, Digimer wrote:
> On 2018-09-06 04:33 PM, Marcos Renato da Silva Junior wrote:
>> Hi,
>>
>> I created a testing environment based on Raspberry Pi (attached
>> diagram), in my tests it has worked well, but I did not implement
>> anything about fencing and stonith, what is the need and how to implement?
>>
>> Thanks,
>>
>> Marcos.
> It depends on the hardware you have available. In your case, RPi has no
> IPMI or similar feature, so you'll need something external, like a
> switched PDU. I like the APC AP7900 (or your countries variant), which
> you can often get used for a decent price if this isn't a production system.
>
> http://www.apc.com/shop/us/en/products/Rack-PDU-Switched-1U-15A-100-120V-85-15/P-AP7900
>
>
For a test-environment switching mains might be an overkill.
And it makes the nice and tiny test-environment a lot less
nice and tiny ;-)
Anyway the scenario made me google a little bit.
e.g.: https://www.yepkit.com/products/ykush
is what I stumbled over.
Add a RPi to it and you have IP-controlled USB-power.
(Guess I have to order one to play with ;-) )

On the other hand iirc the Broadcom-SOC found in the RPi
has a hardware-watchdog the linux-kernel has a driver
for. So you might consider going for SBD (no shared disk)
with watchdog-fencing as well.
But that would require you to add a 3rd node (or some
kind of shared disk).
Andrew's blog article is a nice introduction:
http://blog.clusterlabs.org/blog/2015/sbd-fun-and-profit

Klaus

___
Users mailing list: Users@clusterlabs.org
https://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] About fencing stonith

2018-09-06 Thread Ken Gaillot
On Thu, 2018-09-06 at 17:33 -0300, Marcos Renato da Silva Junior wrote:
> Hi,
> I created a testing environment based on Raspberry Pi (attached
> diagram), in my tests it has worked well, but I did not implement
> anything about fencing and stonith, what is the need and how to
> implement?
> Thanks,
> Marcos.

The need for fencing is to be able to recover from problems that
disrupt normal cluster operation.

For example, if one node has the IP but becomes overloaded and can't
respond to requests, the cluster can't stop the IP on the unresponsive
node. If the cluster brings up the IP on another node anyway (which it
will do if there's no fencing), packets will randomly go to one or the
other node, causing the service to fail. With fencing, the cluster
powers down the unresponsive node, and can safely bring up the IP
elsewhere.

> corosync.conf :
> totem {
>     version: 2
>     cluster_name: debian
>     token: 3000
>     token_retransmits_before_loss_const: 10
>     clear_node_high_bit: yes
>     crypto_cipher: aes256
>     crypto_hash: sha1
>     interface {
>         bindnetaddr: 192.168.0.0
>         mcastaddr: 239.255.1.1
>         mcastport: 5405
>         ttl: 1
>     }
> }
> 
> logging {
>     fileline: off
>     to_stderr: no
>     to_logfile: no
>     to_syslog: yes
>     syslog_facility: daemon
>     debug: off
>     timestamp: on
>     logger_subsys {
>         subsys: QUORUM
>         debug: off
>     }
> }
> 
> quorum {
>     provider: corosync_votequorum
>     expected_votes: 2
>     two_node: 1
> }
> 
> crm configure property stonith-enabled=false
> 
> crm configure property no-quorum-policy=ignore
> 
> crm configure primitive LDAP-IP ocf:heartbeat:IPaddr2 \
> params ip="192.168.0.10" nic="eth0" cidr_netmask="24" \
> op monitor interval=10s timeout=20s
> crm configure primitive LDAP ocf:heartbeat:slapd params \
>  slapd="/usr/sbin/slapd" \
>  config="/etc/ldap/slapd.d/" \
>  user="openldap" group="openldap" \
>  services="ldap:///; \
>  watch_suffix="dc=acme,dc=lab" \
>  bind_dn="cn=admin,dc=acme,dc=lab" \
>  password="password" \
>  op monitor interval=10s timeout=20s
> crm configure clone LDAP-CLONE LDAP
> crm configure colocation LDAP-IP_WITH_LDAP inf: LDAP-IP LDAP-CLONE
> 
> crm configure order LDAP-IP_BEFORE_LDAP inf: LDAP-IP LDAP-CLONE
> 
> crm configure location PREFER_RASP4_LDAP LDAP-IP 50: rasp4
> 
> crm configure primitive RADIUS-IP ocf:heartbeat:IPaddr2 \
> params ip="192.168.0.9" nic="eth0" cidr_netmask="24" \
> op monitor interval=10s timeout=20s
> crm configure primitive RADIUS lsb:freeradius op monitor interval=10s
> timeout=20s
> crm configure clone RADIUS-CLONE RADIUS
> crm configure colocation RADIUS-IP_WITH_RADIUS inf: RADIUS-IP RADIUS-
> CLONE
> 
> crm configure order RADIUS-IP_BEFORE_RADIUS inf: RADIUS-IP RADIUS-
> CLONE
> 
> crm configure location PREFER_RASP4_RADIUS RADIUS-IP 50: rasp4
> 
> 
> diagram.jpg
-- 
Ken Gaillot 
___
Users mailing list: Users@clusterlabs.org
https://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] About fencing stonith

2018-09-06 Thread Digimer
On 2018-09-06 04:33 PM, Marcos Renato da Silva Junior wrote:
> Hi,
> 
> I created a testing environment based on Raspberry Pi (attached
> diagram), in my tests it has worked well, but I did not implement
> anything about fencing and stonith, what is the need and how to implement?
> 
> Thanks,
> 
> Marcos.

It depends on the hardware you have available. In your case, RPi has no
IPMI or similar feature, so you'll need something external, like a
switched PDU. I like the APC AP7900 (or your countries variant), which
you can often get used for a decent price if this isn't a production system.

http://www.apc.com/shop/us/en/products/Rack-PDU-Switched-1U-15A-100-120V-85-15/P-AP7900

-- 
Digimer
Papers and Projects: https://alteeve.com/w/
"I am, somehow, less interested in the weight and convolutions of
Einstein’s brain than in the near certainty that people of equal talent
have lived and died in cotton fields and sweatshops." - Stephen Jay Gould
___
Users mailing list: Users@clusterlabs.org
https://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org