cluster: STABLE32 - cman: Improve quorum timer handling how quorum timers work
by Lon Hohberger
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 8947872a56f49f1658d793a8e9b60efa5337eba8
Parent: 7fc46e322b78c59b160d6dade2699eb841353a61
Author: John Ruemker <jruemker(a)redhat.com>
AuthorDate: Wed Feb 15 18:37:01 2012 -0500
Committer: Lon Hohberger <lhh(a)redhat.com>
CommitterDate: Wed Feb 15 18:37:01 2012 -0500
cman: Improve quorum timer handling how quorum timers work
Previously, the timer was simply once per quorumd poll interval.
This led to a possibility of qdiskd (or other programs using the
CMAN quorum API) to continue as 'alive' until a time period greater
than the poll interval.
With this patch, the quorum device timer is reset each time the
program using the quorum API.
Resolves: rhbz#759603
Signed-off-by: John Ruemker <jruemker(a)redhat.com>
Reviewed-by: Lon Hohberger <lhh(a)redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie(a)redhat.com>
---
cman/daemon/commands.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/cman/daemon/commands.c b/cman/daemon/commands.c
index f397234..e7df2f3 100644
--- a/cman/daemon/commands.c
+++ b/cman/daemon/commands.c
@@ -1331,19 +1331,21 @@ static void ccsd_timer_fn(void *arg)
static void quorum_device_timer_fn(void *arg)
{
struct timeval now;
+ unsigned long long timediff_us;
if (!quorum_device || quorum_device->state == NODESTATE_DEAD)
return;
log_printf(LOGSYS_LEVEL_DEBUG, "memb: quorum_device_timer_fn\n");
gettimeofday(&now, NULL);
- if (quorum_device->last_hello.tv_sec + quorumdev_poll/1000 < now.tv_sec) {
+ timediff_us=((now.tv_sec - quorum_device->last_hello.tv_sec)*1000000 + (now.tv_usec - quorum_device->last_hello.tv_usec));
+ if (timediff_us >= quorumdev_poll*1000) {
quorum_device->state = NODESTATE_DEAD;
log_printf(LOG_INFO, "lost contact with quorum device\n");
recalculate_quorum(0, 0);
}
else {
- corosync->timer_add_duration((unsigned long long)quorumdev_poll*1000000, quorum_device,
- quorum_device_timer_fn, &quorum_device_timer);
+ corosync->timer_add_duration(1000*(quorumdev_poll*1000 - timediff_us),
+ quorum_device, quorum_device_timer_fn, &quorum_device_timer);
}
}
12 years, 2 months
dlm: master - dlm_controld: fix cfg callbacks
by David Teigland
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 2ad89c869cbd6338361ccf25f7c84c719d88e5a9
Parent: 5907f811b534423e1cfe7ce69619a403558f66d1
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Feb 15 13:28:27 2012 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Feb 15 13:28:27 2012 -0600
dlm_controld: fix cfg callbacks
corosync_cfg_state_track_callback went away
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
dlm_controld/member.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/dlm_controld/member.c b/dlm_controld/member.c
index 783fcb4..7af581c 100644
--- a/dlm_controld/member.c
+++ b/dlm_controld/member.c
@@ -265,7 +265,6 @@ static void shutdown_callback(corosync_cfg_handle_t h,
static corosync_cfg_callbacks_t cfg_callbacks =
{
.corosync_cfg_shutdown_callback = shutdown_callback,
- .corosync_cfg_state_track_callback = NULL,
};
void process_cluster_cfg(int ci)
12 years, 2 months
dlm: master - dlm_controld: fail to start with negative nodeid
by David Teigland
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 5907f811b534423e1cfe7ce69619a403558f66d1
Parent: fd1a6e23de6397382732abb3b9286367b926ed33
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Feb 15 13:26:52 2012 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Feb 15 13:27:19 2012 -0600
dlm_controld: fail to start with negative nodeid
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
dlm_controld/member.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/dlm_controld/member.c b/dlm_controld/member.c
index 4a445c8..783fcb4 100644
--- a/dlm_controld/member.c
+++ b/dlm_controld/member.c
@@ -302,9 +302,16 @@ int setup_cluster_cfg(void)
corosync_cfg_finalize(ch);
return -1;
}
+
our_nodeid = nodeid;
log_debug("our_nodeid %d", our_nodeid);
+ if (our_nodeid < 0) {
+ log_error("negative nodeid, set corosync totem.clear_node_high_bit");
+ corosync_cfg_finalize(ch);
+ return -1;
+ }
+
return fd;
}
12 years, 2 months
dlm: master - dlm_controld: require cluster_name
by David Teigland
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: fd1a6e23de6397382732abb3b9286367b926ed33
Parent: 0f19d2e7fb331ba3aedc69c6bd3eb5a75cf631c5
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Feb 15 13:15:24 2012 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Feb 15 13:27:19 2012 -0600
dlm_controld: require cluster_name
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
dlm_controld/action.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlm_controld/action.c b/dlm_controld/action.c
index 8aa84a4..d4bf11d 100644
--- a/dlm_controld/action.c
+++ b/dlm_controld/action.c
@@ -848,10 +848,12 @@ int setup_configfs_options(void)
detect_cluster_name();
- if (cluster_name[0])
+ if (cluster_name[0]) {
set_configfs_cluster("cluster_name", cluster_name, 0);
- else
+ } else {
log_error("no cluster name");
+ return -1;
+ }
}
return 0;
}
12 years, 2 months
gfs2-utils: master - libgfs2: Add pointer restriction flags
by Steven Whitehouse
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 1c0cc10fffa68b2fa57c5cb44afedb85fe8f162a
Parent: 0932c002b340c0d7d7cda415ac7167a89612a626
Author: Steven Whitehouse <swhiteho(a)redhat.com>
AuthorDate: Tue Feb 14 10:49:51 2012 +0000
Committer: Steven Whitehouse <swhiteho(a)redhat.com>
CommitterDate: Tue Feb 14 10:49:51 2012 +0000
libgfs2: Add pointer restriction flags
This patch adds a couple of new metadata block types to represent free
blocks and data blocks. This then allows these types to be used to
specify all the valid block target types which pointers might point to.
We can then add a new field to store this restriction information.
Also this adds a new test to check that the restriction information is
supplied for all pointers.
Signed-off-by: Steven Whitehouse <swhiteho(a)redhat.com>
---
gfs2/libgfs2/libgfs2.h | 6 ++-
gfs2/libgfs2/meta.c | 110 ++++++++++++++++++++++++++++++++++--------------
2 files changed, 83 insertions(+), 33 deletions(-)
diff --git a/gfs2/libgfs2/libgfs2.h b/gfs2/libgfs2/libgfs2.h
index ef80b63..4bd01a8 100644
--- a/gfs2/libgfs2/libgfs2.h
+++ b/gfs2/libgfs2/libgfs2.h
@@ -99,7 +99,9 @@ enum lgfs2_meta_type {
LGFS2_MT_STATFS_CHANGE = 23,
LGFS2_MT_GFS_JINDEX = 24,
LGFS2_MT_GFS_BLOCK_TAG = 25,
-
+ LGFS2_MT_DATA = 26,
+ LGFS2_MT_FREE = 27,
+
LGFS2_MT_NR,
};
@@ -132,6 +134,8 @@ struct lgfs2_metafield {
#define LGFS2_MFF_MAJOR 0x08000 /* Major device number */
#define LGFS2_MFF_MINOR 0x10000 /* Minor device number */
+ /* If it is a pointer, then this field must be set */
+ const unsigned points_to;
/* If isenum or ismask are set, these must also be filled in */
const struct lgfs2_symbolic *symtab;
const unsigned nsyms;
diff --git a/gfs2/libgfs2/meta.c b/gfs2/libgfs2/meta.c
index 737182a..87f8f31 100644
--- a/gfs2/libgfs2/meta.c
+++ b/gfs2/libgfs2/meta.c
@@ -96,9 +96,9 @@ const unsigned int lgfs2_ld1_type_size = ARRAY_SIZE(lgfs2_ld1_types);
.offset = offsetof(struct STRUCT, f), \
.length = sizeof(((struct STRUCT *)(0))->f), \
__VA_ARGS__ },
-#define FP(f) F(f, .flags = LGFS2_MFF_POINTER )
+#define FP(f,...) F(f, .flags = LGFS2_MFF_POINTER, __VA_ARGS__)
#define RF(f) F(f, .flags = LGFS2_MFF_RESERVED)
-#define RFP(f) F(f, .flags = LGFS2_MFF_POINTER|LGFS2_MFF_RESERVED)
+#define RFP(f,...) F(f, .flags = LGFS2_MFF_POINTER|LGFS2_MFF_RESERVED, __VA_ARGS__)
#define MH(f) F(f.mh_magic) \
@@ -107,12 +107,28 @@ const unsigned int lgfs2_ld1_type_size = ARRAY_SIZE(lgfs2_ld1_types);
F(f.mh_format, .flags = LGFS2_MFF_ENUM, .symtab=lgfs2_metaformats, .nsyms=ARRAY_SIZE(lgfs2_metaformats)) \
F(f.mh_jid)
-#define IN(f) F(f.no_formal_ino) \
- FP(f.no_addr)
+#define IN(f,...) F(f.no_formal_ino) \
+ FP(f.no_addr, __VA_ARGS__)
-#define INR(f) RF(f.no_formal_ino) \
- RFP(f.no_addr)
+#define INR(f,...) RF(f.no_formal_ino) \
+ RFP(f.no_addr, __VA_ARGS__)
+#define ANY_COMMON_BLOCK (1 << LGFS2_MT_DIR_LEAF) | \
+ (1 << LGFS2_MT_JRNL_DATA) | \
+ (1 << LGFS2_MT_EA_ATTR) | \
+ (1 << LGFS2_MT_EA_DATA) | \
+ (1 << LGFS2_MT_DATA)
+
+#define ANY_GFS2_BLOCK (1 << LGFS2_MT_GFS2_DINODE) | \
+ (1 << LGFS2_MT_GFS2_INDIRECT) | \
+ (1 << LGFS2_MT_GFS2_LOG_HEADER) | \
+ (1 << LGFS2_MT_GFS2_LOG_DESC) | \
+ (1 << LGFS2_MT_GFS2_LOG_BLOCK) | \
+ ANY_COMMON_BLOCK
+
+#define ANY_GFS_BLOCK (1 << LGFS2_MT_GFS_DINODE) | \
+ (1 << LGFS2_MT_GFS_INDIRECT) | \
+ ANY_COMMON_BLOCK
#undef STRUCT
#define STRUCT gfs2_sb
@@ -125,13 +141,13 @@ RF(__pad0)
F(sb_bsize, .flags = LGFS2_MFF_BYTES)
F(sb_bsize_shift, .flags = LGFS2_MFF_BYTES|LGFS2_MFF_SHIFT)
RF(__pad1)
-IN(sb_master_dir)
-INR(__pad2)
-IN(sb_root_dir)
+IN(sb_master_dir, .points_to = (1 << LGFS2_MT_GFS2_DINODE))
+INR(__pad2, .points_to = (1 << LGFS2_MT_GFS2_DINODE))
+IN(sb_root_dir, .points_to = (1 << LGFS2_MT_GFS2_DINODE))
F(sb_lockproto, .flags = LGFS2_MFF_STRING)
F(sb_locktable, .flags = LGFS2_MFF_STRING)
-IN(__pad3)
-IN(__pad4)
+INR(__pad3, .points_to = (1 << LGFS2_MT_GFS2_DINODE))
+INR(__pad4, .points_to = (1 << LGFS2_MT_GFS2_DINODE))
F(sb_uuid, .flags = LGFS2_MFF_UUID)
};
@@ -146,13 +162,13 @@ F(sb_flags)
F(sb_bsize, .flags = LGFS2_MFF_BYTES)
F(sb_bsize_shift, .flags = LGFS2_MFF_BYTES|LGFS2_MFF_SHIFT)
F(sb_seg_size, .flags = LGFS2_MFF_FSBLOCKS)
-IN(sb_jindex_di)
-IN(sb_rindex_di)
-IN(sb_root_di)
+IN(sb_jindex_di, .points_to = (1 << LGFS2_MT_GFS_DINODE))
+IN(sb_rindex_di, .points_to = (1 << LGFS2_MT_GFS_DINODE))
+IN(sb_root_di, .points_to = (1 << LGFS2_MT_GFS_DINODE))
F(sb_lockproto, .flags = LGFS2_MFF_STRING)
F(sb_locktable, .flags = LGFS2_MFF_STRING)
-IN(sb_quota_di)
-IN(sb_license_di)
+IN(sb_quota_di, .points_to = (1 << LGFS2_MT_GFS_DINODE))
+IN(sb_license_di, .points_to = (1 << LGFS2_MT_GFS_DINODE))
RF(sb_reserved)
};
@@ -160,10 +176,10 @@ RF(sb_reserved)
#define STRUCT gfs2_rindex
static const struct lgfs2_metafield gfs2_rindex_fields[] = {
-FP(ri_addr)
+FP(ri_addr, .points_to = (1 << LGFS2_MT_GFS2_RGRP))
F(ri_length, .flags = LGFS2_MFF_FSBLOCKS)
RF(__pad)
-FP(ri_data0)
+FP(ri_data0, .points_to = ANY_GFS2_BLOCK|(1 << LGFS2_MT_FREE))
F(ri_data, .flags = LGFS2_MFF_FSBLOCKS)
F(ri_bitbytes, .flags = LGFS2_MFF_BYTES)
F(ri_reserved)
@@ -191,7 +207,7 @@ F(rg_flags)
F(rg_free, .flags = LGFS2_MFF_FSBLOCKS)
F(rg_useddi, .flags = LGFS2_MFF_FSBLOCKS)
F(rg_freedi, .flags = LGFS2_MFF_FSBLOCKS)
-IN(rg_freedi_list)
+IN(rg_freedi_list, .points_to = (1 << LGFS2_MT_GFS_DINODE))
F(rg_usedmeta, .flags = LGFS2_MFF_FSBLOCKS)
F(rg_freemeta, .flags = LGFS2_MFF_FSBLOCKS)
RF(rg_reserved)
@@ -210,7 +226,7 @@ MH(rb_header)
static const struct lgfs2_metafield gfs2_dinode_fields[] = {
MH(di_header)
-IN(di_num)
+IN(di_num, .points_to = (1 << LGFS2_MT_GFS2_DINODE))
F(di_mode, .flags = LGFS2_MFF_MODE)
F(di_uid, .flags = LGFS2_MFF_UID)
F(di_gid, .flags = LGFS2_MFF_GID)
@@ -222,8 +238,8 @@ F(di_mtime, .flags = LGFS2_MFF_SECS)
F(di_ctime, .flags = LGFS2_MFF_SECS)
F(di_major, .flags = LGFS2_MFF_MAJOR)
F(di_minor, .flags = LGFS2_MFF_MINOR)
-FP(di_goal_meta)
-FP(di_goal_data)
+FP(di_goal_meta, .points_to = ANY_GFS2_BLOCK | (1 << LGFS2_MT_FREE))
+FP(di_goal_data, .points_to = ANY_GFS2_BLOCK | (1 << LGFS2_MT_FREE))
F(di_generation)
F(di_flags, .flags = LGFS2_MFF_MASK, .symtab=lgfs2_di_flags, .nsyms=ARRAY_SIZE(lgfs2_di_flags))
F(di_payload_format)
@@ -233,8 +249,8 @@ RF(__pad2)
RF(__pad3)
F(di_depth)
F(di_entries)
-INR(__pad4)
-FP(di_eattr)
+INR(__pad4, .points_to = (1 << LGFS2_MT_GFS2_DINODE))
+FP(di_eattr, .points_to = (1 << LGFS2_MT_EA_ATTR)|(1 << LGFS2_MT_GFS2_INDIRECT))
F(di_atime_nsec, .flags = LGFS2_MFF_NSECS)
F(di_mtime_nsec, .flags = LGFS2_MFF_NSECS)
F(di_ctime_nsec, .flags = LGFS2_MFF_NSECS)
@@ -246,7 +262,7 @@ RF(di_reserved)
static const struct lgfs2_metafield gfs_dinode_fields[] = {
MH(di_header)
-IN(di_num)
+IN(di_num, .points_to = (1 << LGFS2_MT_GFS_DINODE))
F(di_mode, .flags = LGFS2_MFF_MODE)
F(di_uid, .flags = LGFS2_MFF_UID)
F(di_gid, .flags = LGFS2_MFF_GID)
@@ -258,8 +274,8 @@ F(di_mtime, .flags = LGFS2_MFF_SECS)
F(di_ctime, .flags = LGFS2_MFF_SECS)
F(di_major, .flags = LGFS2_MFF_MAJOR)
F(di_minor, .flags = LGFS2_MFF_MINOR)
-FP(di_rgrp)
-FP(di_goal_rgrp)
+FP(di_rgrp, .points_to = LGFS2_MT_GFS_RGRP)
+FP(di_goal_rgrp, .points_to = LGFS2_MT_GFS_RGRP)
F(di_goal_dblk)
F(di_goal_mblk)
F(di_flags, .flags = LGFS2_MFF_MASK, .symtab=lgfs2_di_flags, .nsyms=ARRAY_SIZE(lgfs2_di_flags))
@@ -270,8 +286,8 @@ F(di_incarn)
F(di_pad)
F(di_depth)
F(di_entries)
-INR(di_next_unused)
-FP(di_eattr)
+INR(di_next_unused, .points_to = (1 << LGFS2_MT_GFS_DINODE))
+FP(di_eattr, .points_to = (1 << LGFS2_MT_EA_ATTR)|(1 << LGFS2_MT_GFS_INDIRECT))
F(di_reserved)
};
@@ -398,7 +414,7 @@ F(qc_id)
#define STRUCT gfs2_dirent
static const struct lgfs2_metafield gfs2_dirent_fields[] = {
-IN(de_inum)
+IN(de_inum, .points_to = (1 << LGFS2_MT_GFS_DINODE)|(1 << LGFS2_MT_GFS2_DINODE))
F(de_hash, .flags = LGFS2_MFF_CHECK)
F(de_rec_len, .flags = LGFS2_MFF_BYTES)
F(de_name_len, .flags = LGFS2_MFF_BYTES)
@@ -440,7 +456,7 @@ F(sc_dinodes, .flags = LGFS2_MFF_FSBLOCKS)
#define STRUCT gfs_jindex
static const struct lgfs2_metafield gfs_jindex_fields[] = {
-FP(ji_addr)
+FP(ji_addr, .points_to = (1 << LGFS2_MT_DATA))
F(ji_nsegment)
RF(ji_pad)
RF(ji_reserved)
@@ -455,7 +471,7 @@ struct gfs_block_tag {
#define STRUCT gfs_block_tag
static const struct lgfs2_metafield gfs_block_tag_fields[] = {
-FP(bt_blkno)
+FP(bt_blkno, .points_to = ANY_GFS_BLOCK)
RF(bt_flags)
RF(bt_pad)
};
@@ -706,6 +722,16 @@ const struct lgfs2_metadata lgfs2_metadata[] = {
.nfields = ARRAY_SIZE(gfs_block_tag_fields),
.size = sizeof(struct gfs_block_tag),
},
+ [LGFS2_MT_DATA] = {
+ .gfs1 = 1,
+ .gfs2 = 1,
+ .name = "data",
+ },
+ [LGFS2_MT_FREE] = {
+ .gfs1 = 1,
+ .gfs2 = 2,
+ .name = "free",
+ },
};
const unsigned lgfs2_metadata_size = ARRAY_SIZE(lgfs2_metadata);
@@ -763,12 +789,32 @@ static int check_symtab(void)
return ret;
}
+static int check_ptrs(void)
+{
+ int i, j;
+ int ret = 0;
+
+ for (i = 0; i < lgfs2_metadata_size; i++) {
+ const struct lgfs2_metadata *m = &lgfs2_metadata[i];
+ for (j = 0; j < m->nfields; j++) {
+ const struct lgfs2_metafield *f = &m->fields[j];
+ if ((f->flags & LGFS2_MFF_POINTER) && !f->points_to) {
+ fprintf(stderr, "%s: Pointer entry %s has no destination\n", m->name, f->name);
+ ret = -1;
+ }
+ }
+ }
+
+ return ret;
+}
+
int lgfs2_selfcheck(void)
{
int ret = 0;
ret |= check_metadata_sizes();
ret |= check_symtab();
+ ret |= check_ptrs();
return ret;
}
12 years, 2 months
cluster: RHEL6 - gfs_controld: don't ignore dlmc_fs_register error
by David Teigland
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: b950000e35d922fe24de64d798f59f712ba7017f
Parent: 2552e504f228f2e6dafee9f43666fda871fdb92e
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Nov 11 14:30:44 2011 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Feb 14 10:33:02 2012 -0600
gfs_controld: don't ignore dlmc_fs_register error
gfs_controld ignores an error returned by dlm_controld for
dlmc_fs_register() during mount. This results in a successful
mount, but dlm/gfs recovery not being coordinated. The mount
should return an error instead.
bz 753300
Signed-off-by: David Teigland <teigland(a)redhat.com>
---
group/gfs_controld/cpg-new.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/group/gfs_controld/cpg-new.c b/group/gfs_controld/cpg-new.c
index b3f25ae..fd20250 100644
--- a/group/gfs_controld/cpg-new.c
+++ b/group/gfs_controld/cpg-new.c
@@ -778,11 +778,12 @@ void process_dlmcontrol(int ci)
if (result) {
/* shouldn't happen */
log_error("process_dlmcontrol register %d", result);
- } else
+ client_reply_join_full(mg, result);
+ mg->mount_client_notified = 1;
+ } else {
log_group(mg, "process_dlmcontrol register %d", result);
-
- mg->dlm_registered = 1;
-
+ mg->dlm_registered = 1;
+ }
} else {
log_group(mg, "process_dlmcontrol unknown type %d", type);
}
12 years, 2 months
dlm: master - init/service scripts: make environment filename consistent with service name
by Fabio M. Di Nitto
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 0f19d2e7fb331ba3aedc69c6bd3eb5a75cf631c5
Parent: 792fdada8e5ec08ad0afc957d4899f4d62904b23
Author: Fabio M. Di Nitto <fdinitto(a)redhat.com>
AuthorDate: Mon Feb 13 06:15:32 2012 +0100
Committer: Fabio M. Di Nitto <fdinitto(a)redhat.com>
CommitterDate: Mon Feb 13 06:15:32 2012 +0100
init/service scripts: make environment filename consistent with service name
Generally speaking if a service is called foo, users expects to pass
options to the script via /etc/sysconfig/foo and not foo_something.
This fix an oversight on my side in the previous round of init fixes.
Signed-off-by: Fabio M. Di Nitto <fdinitto(a)redhat.com>
---
init/dlm.init | 2 +-
init/dlm.service | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/init/dlm.init b/init/dlm.init
index db8f17f..7f3da2d 100644
--- a/init/dlm.init
+++ b/init/dlm.init
@@ -26,7 +26,7 @@ progdir="cluster"
lockfile="/var/run/$progdir/$prog.pid"
exec="/usr/sbin/$prog"
-[ -f /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
+[ -f /etc/sysconfig/dlm ] && . /etc/sysconfig/dlm
setup() {
modprobe dlm > /dev/null 2>&1
diff --git a/init/dlm.service b/init/dlm.service
index 7be2ffd..d7cf9c7 100644
--- a/init/dlm.service
+++ b/init/dlm.service
@@ -4,7 +4,7 @@ After=syslog.target network.target corosync.service
[Service]
Type=forking
-EnvironmentFile=/etc/sysconfig/dlm_controld
+EnvironmentFile=/etc/sysconfig/dlm
ExecStartPre=/sbin/modprobe dlm
ExecStart=/usr/sbin/dlm_controld $DLM_CONTROLD_OPTS
#ExecStopPost=/sbin/modprobe -r dlm
12 years, 2 months
fence-agents: master - fence_ipmilan: power_wait timeout is not used for power off operation
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 9fb1a85034eb8f94a766ba9766a75924947f5e77
Parent: 155370d65d5c027b10ef878c120e26c106625f7c
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Wed Feb 8 17:31:53 2012 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Wed Feb 8 17:37:59 2012 +0100
fence_ipmilan: power_wait timeout is not used for power off operation
Patch proposed by Vlastimil Holer.
Resolves: rhbz#787706
---
fence/agents/ipmilan/ipmilan.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fence/agents/ipmilan/ipmilan.c b/fence/agents/ipmilan/ipmilan.c
index ddcc0f6..33b6496 100644
--- a/fence/agents/ipmilan/ipmilan.c
+++ b/fence/agents/ipmilan/ipmilan.c
@@ -473,7 +473,7 @@ ipmi_off(struct ipmi *ipmi)
if (ret != 0)
return ret;
- sleep(2);
+ sleep(ipmi->i_power_wait);
--retries;
ret = ipmi_op(ipmi, ST_STATUS, power_status);
12 years, 3 months
fence-agents: master - fencing: Missing password is not reported properly
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 57ae9aa78b1d6bed89551944a8e0b5fa6c1f0075
Parent: d35b0da5fcbf186cb316ce81c1168c8e54992a6d
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Mon Jan 30 15:56:51 2012 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Wed Feb 8 17:37:39 2012 +0100
fencing: Missing password is not reported properly
When username is entered and password is missing then it is possible
that fence code will end with exception.
Resolves: rhbz#785091
---
fence/agents/lib/fencing.py.py | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py
index 8be0a61..e93f59a 100644
--- a/fence/agents/lib/fencing.py.py
+++ b/fence/agents/lib/fencing.py.py
@@ -25,6 +25,7 @@ EC_WAITING_ON = 6
EC_WAITING_OFF = 7
EC_STATUS = 8
EC_STATUS_HMC = 9
+EC_PASSWORD_MISSING = 10
TELNET_PATH = "/usr/bin/telnet"
SSH_PATH = "/usr/bin/ssh"
@@ -439,7 +440,8 @@ def fail(error_code):
EC_WAITING_ON : "Failed: Timed out waiting to power ON",
EC_WAITING_OFF : "Failed: Timed out waiting to power OFF",
EC_STATUS : "Failed: Unable to obtain correct plug status or plug is not available",
- EC_STATUS_HMC : "Failed: Either unable to obtaion correct plug status, partition is not available or incorrect HMC version used"
+ EC_STATUS_HMC : "Failed: Either unable to obtaion correct plug status, partition is not available or incorrect HMC version used",
+ EC_PASSWORD_MISSING : "Failed: You have to set login password"
}[error_code] + "\n"
sys.stderr.write(message)
sys.exit(EC_GENERIC_ERROR)
@@ -946,8 +948,11 @@ def fence_login(options):
conn.log_expect(options, re_login, int(options["-y"]))
conn.send(options["-l"] + login_eol)
conn.log_expect(options, re_pass, int(options["-Y"]))
- conn.send(options["-p"] + login_eol)
- conn.log_expect(options, options["-c"], int(options["-Y"]))
+ try:
+ conn.send(options["-p"] + login_eol)
+ conn.log_expect(options, options["-c"], int(options["-Y"]))
+ except KeyError:
+ fail(EC_PASSWORD_MISSING)
except pexpect.EOF:
fail(EC_LOGIN_DENIED)
except pexpect.TIMEOUT:
12 years, 3 months
fence-agents: master - fence_rhevm: Incorrect status detected when VM is not in up/down
by Marek Grác
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=...
Commit: 155370d65d5c027b10ef878c120e26c106625f7c
Parent: 57ae9aa78b1d6bed89551944a8e0b5fa6c1f0075
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Mon Jan 30 16:50:30 2012 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Wed Feb 8 17:37:46 2012 +0100
fence_rhevm: Incorrect status detected when VM is not in up/down
For fencing purposes we have to focus on getting OFF status
when machine is really 100% down, conditions for ON status are much simplier
(as fact that machine is has power does not mean that it works). This patch
specify condition for OFF status - in fact only 'Down' is accepted now
Resolves: rhbz#769681
---
fence/agents/rhevm/fence_rhevm.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fence/agents/rhevm/fence_rhevm.py b/fence/agents/rhevm/fence_rhevm.py
index 65a7395..3578b5f 100644
--- a/fence/agents/rhevm/fence_rhevm.py
+++ b/fence/agents/rhevm/fence_rhevm.py
@@ -41,10 +41,10 @@ def get_power_status(conn, options):
else:
status = result.group(1)
- if (status == "up"):
- return "on"
- else:
+ if (status.lower() == "down"):
return "off"
+ else:
+ return "on"
def set_power_status(conn, options):
action = {
12 years, 3 months