Code Monkey home page Code Monkey logo

stonith-fences's Introduction

stonith-fences

Pacemaker stonith fencing agents for vmware fusion.

Installation instructions cp fence* /usr/sbin on all servers running stonith.

pacemaker configuration example

primitive fusion-fencing stonith:fence_fusion
params ipaddr="MAC_IP_REACHABLE_FROM_CLUSTER_HOSTS" login="MAC_USERNAME" passwd="MAC_PASSWORD"
pcmk_host_list="box1.example.loc box2.example.loc"
pcmk_host_map="box1.example.loc:00_0C_29_93_11_B5;box2.example.loc:00_0C_29_6E_5A_43"
meta target-role="started" property stonith-enabled="true"

** Note 00_0C_29_6E_5A_43 is the mac address of any of the interfaces on one of the vms that will be killed via stonith. We are just replacing : with _ in the syntax to fit into the stonith rules.

** Testing. kill -9 the corosync process on one of the cluster nodes

stonith-fences's People

Watchers

 avatar  avatar  avatar

stonith-fences's Issues

fence_fusion did not work as expected

Tried to get VMware Fusion fencing to work with Fusion 5 from CentOS 6.4 pacemaker node (with Python 2.6.6). The functions for status, on and off were not functioning as expected.

I noticed a problem with the try-expect blocks and made the following change:

try:
conn.sendline('''IFS=$'\n';for x in $(mdfind vmwarevm |grep ".vmwarevm$"); do IFS=$'\n';find $x -name *vmx -exec grep -H "Address " {} ; ;done|sort|uniq''')
conn.log_expect(options, options["-c"], int(options["-g"]))
except pexpect.EOF:
fail(EC_CONNECTION_LOST)
except pexpect.TIMEOUT:
fail(EC_TIMED_OUT)
else: # ADDED THIS
results = conn.before.splitlines()[2:]
for line in results:
file, data = line.split(':', 1)
mac = data.split("= ")[1].strip(""")
mac_results.setdefault(file, []).append(mac)

...and added "else:" block to all the other similar places too. Seems to work correctly now as previously it never made it to the result handling.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.