Skip to content

Commit e67fcd4

Browse files
committed
Merge branch 'master' of github.com:ClusterLabs/fence-agents
2 parents 07cedd7 + bd4255d commit e67fcd4

File tree

137 files changed

+1175
-1444
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+1175
-1444
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ libtoolize
2020
ltmain.sh
2121
libtool
2222
make/stamp-h1
23-
m4
23+
24+
# ignore "libtoolized" m4 files, but keep our (enumerated) ones
25+
/m4/*
26+
!/m4/ac_python_module.m4
27+
2428
make/clusterautoconfig.h*
2529
missing
2630
*.pc

Makefile.am

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,8 @@ gen-ChangeLog:
4242
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
4343
fi
4444

45+
# this will get rid of "libtoolized" m4 files
4546
maintainer-clean-local:
46-
rm -rf m4
47+
rm -rf $(filter-out \
48+
$(top_srcdir)/m4/ac_python_module.m4,$(wildcard \
49+
$(top_srcdir)/m4/*.m4))

autogen.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
# Run this to generate all the initial makefiles, etc.
3-
mkdir -p m4
3+
# ("-I make" is superfluous, kept only for legacy purposes, if any)
44
autoreconf -i -I make -v && echo Now run ./configure and make

configure.ac

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ AC_PYTHON_MODULE(suds, 1)
163163
AC_PYTHON_MODULE(pexpect, 1)
164164
AC_PYTHON_MODULE(pycurl, 1)
165165
AC_PYTHON_MODULE(requests, 1)
166+
AC_PYTHON_MODULE(pywsman, 1)
166167

167168
## path to 3rd-party binaries
168169
AC_PATH_PROG([IPMITOOL_PATH], [ipmitool], [/usr/bin/ipmitool])
@@ -182,6 +183,7 @@ AC_PATH_PROG([SNMPWALK_PATH], [snmpwalk], [/usr/bin/snmpwalk])
182183
AC_PATH_PROG([SNMPSET_PATH], [snmpset], [/usr/bin/snmpset])
183184
AC_PATH_PROG([SNMPGET_PATH], [snmpget], [/usr/bin/snmpget])
184185
AC_PATH_PROG([NOVA_PATH], [nova], [/usr/bin/nova])
186+
AC_PATH_PROG([POWERMAN_PATH], [powerman], [/usr/bin/powerman])
185187

186188
## do subst
187189

@@ -213,6 +215,7 @@ AC_SUBST([COROSYNC_CMAPCTL_PATH])
213215
AC_SUBST([SG_PERSIST_PATH])
214216
AC_SUBST([SG_TURS_PATH])
215217
AC_SUBST([VGS_PATH])
218+
AC_SUBST([POWERMAN_PATH])
216219

217220
## *FLAGS handling
218221

fence/agents/Makefile.am

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ TARGET = $(AGENTS_LIST:%.py=%)
44

55
SRC = $(TARGET:=.py)
66

7-
CLEAN_TARGET_ADDITIONAL = kdump/fence_kdump_send
7+
CLEAN_TARGET_ADDITIONAL = kdump/fence_kdump_send manual/fence_ack_manual */*.o
88

9-
EXTRA_DIST = $(SRC)
9+
EXTRA_DIST = $(SRC) manual/fence_ack_manual.in manual/fence_ack_manual.8 zvm/fence_zvm_man_page
1010

1111
sbin_SCRIPTS = $(TARGET) manual/fence_ack_manual
1212

@@ -17,21 +17,21 @@ man_MANS = $(sbin_SCRIPTS:=.8)
1717
sbin_PROGRAMS = kdump/fence_kdump zvm/fence_zvm
1818
libexec_PROGRAMS = kdump/fence_kdump_send
1919

20-
noinst_HEADERS = kdump/list.h kdump/message.h kdump/options.h kdump/version.h
20+
noinst_HEADERS = kdump/list.h kdump/message.h kdump/options.h kdump/version.h zvm/fence_zvm.h
2121

2222
kdump_fence_kdump_SOURCES = kdump/fence_kdump.c
2323
kdump_fence_kdump_CFLAGS = -D_GNU_SOURCE -Ikdump
2424

2525
kdump_fence_kdump_send_SOURCES = kdump/fence_kdump_send.c
2626
kdump_fence_kdump_send_CFLAGS = -D_GNU_SOURCE -Ikdump
2727

28-
dist_man_MANS = kdump/fence_kdump.8 kdump/fence_kdump_send.8
28+
dist_man_MANS = kdump/fence_kdump.8 kdump/fence_kdump_send.8 zvm/fence_zvm.8
2929

3030
scsidatadir = $(CLUSTERDATA)
3131
scsidata_SCRIPTS = scsi/fence_scsi_check scsi/fence_scsi_check_hardreboot
3232

3333
zvm_fence_zvm_SOURCES = zvm/fence_zvm.c
34-
zvm_fence_zvm_CFLAGS = -D_GNU_SOURCE
34+
zvm_fence_zvm_CFLAGS = -D_GNU_SOURCE -Izvm
3535

3636
FENCE_TEST_ARGS = \
3737
login=test\n\
@@ -44,6 +44,7 @@ session_url=http://test\n\
4444
4545

4646
manual/fence_ack_manual: manual/fence_ack_manual.in
47+
mkdir -p $(@D)
4748
cat $^ | sed \
4849
-e 's#@clustervarrun@#${CLUSTERVARRUN}#g' \
4950
> $@

fence/agents/alom/Makefile.am

Lines changed: 0 additions & 17 deletions
This file was deleted.

fence/agents/amt/Makefile.am

Lines changed: 0 additions & 17 deletions
This file was deleted.

fence/agents/amt_ws/Makefile.am

Lines changed: 0 additions & 17 deletions
This file was deleted.

fence/agents/apc/Makefile.am

Lines changed: 0 additions & 17 deletions
This file was deleted.

fence/agents/apc/fence_apc.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
## cipher (des/blowfish) have to be defined
1515
#####
1616

17-
import sys, re
17+
import sys, re, time
1818
import atexit
1919
sys.path.append("@FENCEAGENTSLIBDIR@")
2020
from fencing import *
@@ -26,6 +26,10 @@
2626
BUILD_DATE="March, 2008"
2727
#END_VERSION_GENERATION
2828

29+
# Fix for connection timed out issue in:
30+
# https://bugzilla.redhat.com/show_bug.cgi?id=1342584
31+
TIMEDOUT_DELAY = 0.5
32+
2933
def get_power_status(conn, options):
3034
exp_result = 0
3135
outlets = {}
@@ -78,6 +82,7 @@ def get_power_status(conn, options):
7882
res = show_re.search(line)
7983
if res != None:
8084
outlets[res.group(2)] = (res.group(3), res.group(4))
85+
time.sleep(TIMEDOUT_DELAY)
8186
conn.send_eol("")
8287
if exp_result != 0:
8388
break
@@ -151,6 +156,7 @@ def set_power_status(conn, options):
151156

152157
while 0 == conn.log_expect(
153158
["Press <ENTER>"] + options["--command-prompt"], int(options["--shell-timeout"])):
159+
time.sleep(TIMEDOUT_DELAY)
154160
conn.send_eol("")
155161

156162
conn.send_eol(options["--plug"]+"")
@@ -171,6 +177,7 @@ def set_power_status(conn, options):
171177
conn.log_expect("Enter 'YES' to continue or <ENTER> to cancel :", int(options["--shell-timeout"]))
172178
conn.send_eol("YES")
173179
conn.log_expect("Press <ENTER> to continue...", int(options["--power-timeout"]))
180+
time.sleep(TIMEDOUT_DELAY)
174181
conn.send_eol("")
175182
conn.log_expect(options["--command-prompt"], int(options["--power-timeout"]))
176183
conn.send(chr(0o3))

0 commit comments

Comments
 (0)