Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
List overview
Download
cluster-commits
December 2009
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
cluster-commits@lists.stg.fedorahosted.org
11 participants
131 discussions
Start a n
N
ew thread
resource-agents: master - resource-agents: Add missing btrfs & ext4 support
by Lon Hohberger
22 Dec '09
22 Dec '09
Gitweb:
http://git.fedorahosted.org/git/resource-agents.git?p=resource-agents.git;a…
Commit: 486670ecde7edeae9c1c40c8b84f5ffc9131fabe Parent: f66e1223656fa2e20706393936a546c0c895ef4a Author: Lon Hohberger <lhh(a)redhat.com> AuthorDate: Tue Dec 22 14:20:22 2009 -0500 Committer: Lon Hohberger <lhh(a)redhat.com> CommitterDate: Tue Dec 22 14:22:03 2009 -0500 resource-agents: Add missing btrfs & ext4 support Signed-off-by: Lon Hohberger <lhh(a)redhat.com> --- rgmanager/src/resources/fs.sh.in | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/rgmanager/src/resources/fs.sh.in b/rgmanager/src/resources/fs.sh.in index 51f8f48..65cff9c 100644 --- a/rgmanager/src/resources/fs.sh.in +++ b/rgmanager/src/resources/fs.sh.in @@ -364,7 +364,7 @@ verify_fstype() [ -z "$OCF_RESKEY_fstype" ] && return 0 case $OCF_RESKEY_fstype in - ext2|ext3|jfs|xfs|reiserfs|vfat|tmpfs|vxfs) + ext2|ext3|ext4|btrfs|jfs|xfs|reiserfs|vfat|tmpfs|vxfs) return 0 ;; *) @@ -397,7 +397,7 @@ verify_options() esac case $OCF_RESKEY_fstype in - ext2|ext3) + ext2|ext3|ext4) case $o in bsddf|minixdf|check|check=*|nocheck|debug) continue @@ -413,7 +413,8 @@ verify_options() ;; esac - if [ "$OCF_RESKEY_fstype" = "ext3" ]; then + if [ "$OCF_RESKEY_fstype" = "ext3" ] || + [ "$OCF_RESKEY_fstype" = "ext4" ]; then case $0 in noload|data=*) continue @@ -485,6 +486,10 @@ verify_options() ;; esac ;; + btrfs) + # tbd + continue + ;; esac echo Option $o not supported for $OCF_RESKEY_fstype @@ -1008,6 +1013,8 @@ Cannot mount $dev on $mp, the device or mount point is already in use!" case "$fstype" in reiserfs) typeset fsck_needed="" ;; ext3) typeset fsck_needed="" ;; + ext4) typeset fsck_needed="" ;; + btrfs) typeset fsck_needed="" ;; jfs) typeset fsck_needed="" ;; xfs) typeset fsck_needed="" ;; vxfs) typeset fsck_needed="" ;;
1
0
0
0
cluster: STABLE3 - resource-agents: Add missing btrfs & ext4 support
by Lon Hohberger
22 Dec '09
22 Dec '09
Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=e5…
Commit: e58857309b1491f4b780211eea9523589a1cdf66 Parent: 83fa41cb23b81108a6ffc6fe79c2656238a0ffb7 Author: Lon Hohberger <lhh(a)redhat.com> AuthorDate: Tue Dec 22 14:20:22 2009 -0500 Committer: Lon Hohberger <lhh(a)redhat.com> CommitterDate: Tue Dec 22 14:21:11 2009 -0500 resource-agents: Add missing btrfs & ext4 support Signed-off-by: Lon Hohberger <lhh(a)redhat.com> --- rgmanager/src/resources/fs.sh.in | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/rgmanager/src/resources/fs.sh.in b/rgmanager/src/resources/fs.sh.in index 51f8f48..65cff9c 100644 --- a/rgmanager/src/resources/fs.sh.in +++ b/rgmanager/src/resources/fs.sh.in @@ -364,7 +364,7 @@ verify_fstype() [ -z "$OCF_RESKEY_fstype" ] && return 0 case $OCF_RESKEY_fstype in - ext2|ext3|jfs|xfs|reiserfs|vfat|tmpfs|vxfs) + ext2|ext3|ext4|btrfs|jfs|xfs|reiserfs|vfat|tmpfs|vxfs) return 0 ;; *) @@ -397,7 +397,7 @@ verify_options() esac case $OCF_RESKEY_fstype in - ext2|ext3) + ext2|ext3|ext4) case $o in bsddf|minixdf|check|check=*|nocheck|debug) continue @@ -413,7 +413,8 @@ verify_options() ;; esac - if [ "$OCF_RESKEY_fstype" = "ext3" ]; then + if [ "$OCF_RESKEY_fstype" = "ext3" ] || + [ "$OCF_RESKEY_fstype" = "ext4" ]; then case $0 in noload|data=*) continue @@ -485,6 +486,10 @@ verify_options() ;; esac ;; + btrfs) + # tbd + continue + ;; esac echo Option $o not supported for $OCF_RESKEY_fstype @@ -1008,6 +1013,8 @@ Cannot mount $dev on $mp, the device or mount point is already in use!" case "$fstype" in reiserfs) typeset fsck_needed="" ;; ext3) typeset fsck_needed="" ;; + ext4) typeset fsck_needed="" ;; + btrfs) typeset fsck_needed="" ;; jfs) typeset fsck_needed="" ;; xfs) typeset fsck_needed="" ;; vxfs) typeset fsck_needed="" ;;
1
0
0
0
cluster: RHEL55 - dm-log-clustered/clogd: Fix mixed arch and rolling upgrade issues (bs488102)
by Jonathan Brassow
22 Dec '09
22 Dec '09
Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=ce…
Commit: cecd340f67bda6d65465b13a018dd1a1fe5692a5 Parent: e1e194a8337d0ced672e9b6fd08f4ca0d02fb52e Author: Jonathan Brassow <jbrassow(a)redhat.com> AuthorDate: Tue Dec 22 10:39:57 2009 -0600 Committer: Jonathan Brassow <jbrassow(a)redhat.com> CommitterDate: Tue Dec 22 10:40:50 2009 -0600 dm-log-clustered/clogd: Fix mixed arch and rolling upgrade issues (bs488102) Fields used in the communication structure were not explicitly stated to be 32 or 64-bit. They could then change depending on the arch. Additionally, the endian issues were not accounted for. This patch appends the upstream structure to the original communication structure, making it forwards compatable with upstream and upstream backwards compatable with the rhel versions. It also will make mixed architecture clusters possible. There may be follow-on work to this patch to bring compatibility between all rhel releases and architectures, but this puts all the necessary data on the wire so that can happen. --- cmirror-kernel/src/dm-clog-tfr.c | 5 +- cmirror-kernel/src/dm-clog-tfr.h | 2 + cmirror/src/Makefile | 2 +- cmirror/src/cluster.c | 23 ++- cmirror/src/compat.c | 483 ++++++++++++++++++++++++++++++++++++++ cmirror/src/compat.h | 80 +++++++ cmirror/src/local.c | 10 + 7 files changed, 600 insertions(+), 5 deletions(-) diff --git a/cmirror-kernel/src/dm-clog-tfr.c b/cmirror-kernel/src/dm-clog-tfr.c index ddcf359..5047e08 100644 --- a/cmirror-kernel/src/dm-clog-tfr.c +++ b/cmirror-kernel/src/dm-clog-tfr.c @@ -166,7 +166,7 @@ int dm_clog_consult_server(const char *uuid, uint32_t uuid_instance, { int r = 0; int dummy = 0; - int overhead_size = sizeof(struct clog_tfr *) + sizeof(struct cn_msg); + int overhead_size = sizeof(struct clog_tfr) + sizeof(struct cn_msg); struct clog_tfr *tfr = prealloced_clog_tfr; struct receiving_pkg pkg; @@ -188,7 +188,8 @@ resend: */ mutex_lock(&_lock); - memset(tfr, 0, DM_CLOG_PREALLOCED_SIZE - overhead_size); + memset(tfr, 0, DM_CLOG_PREALLOCED_SIZE - sizeof(struct cn_msg)); + tfr->private[0] = CLOG_TFR_VERSION; memcpy(tfr->uuid, uuid, DM_UUID_LEN); tfr->uuid_instance = uuid_instance; tfr->seq = seq++; diff --git a/cmirror-kernel/src/dm-clog-tfr.h b/cmirror-kernel/src/dm-clog-tfr.h index 802db8b..5a48575 100644 --- a/cmirror-kernel/src/dm-clog-tfr.h +++ b/cmirror-kernel/src/dm-clog-tfr.h @@ -49,6 +49,8 @@ ((x) == DM_CLOG_IS_REMOTE_RECOVERING) ? \ "DM_CLOG_IS_REMOTE_RECOVERING" : NULL +#define CLOG_TFR_VERSION 4 + struct clog_tfr { uint64_t private[2]; char uuid[DM_UUID_LEN]; /* Ties a request to a specific mirror log */ diff --git a/cmirror/src/Makefile b/cmirror/src/Makefile index 67ee0d5..53f0703 100644 --- a/cmirror/src/Makefile +++ b/cmirror/src/Makefile @@ -23,7 +23,7 @@ TMP_INCLUDE = $(shell if [ -e ${KERNEL_SRC}/include/linux/dm-clog-tfr.h ]; then echo '-I${incdir}'; else \ echo ''; fi) -SOURCES = clogd.c cluster.c functions.c link_mon.c local.c logging.c +SOURCES = clogd.c cluster.c compat.c functions.c link_mon.c local.c logging.c ifneq (${TMP_INCLUDE}, ) INCLUDE += ${TMP_INCLUDE} -I. diff --git a/cmirror/src/cluster.c b/cmirror/src/cluster.c index 9c84f1d..c04051a 100644 --- a/cmirror/src/cluster.c +++ b/cmirror/src/cluster.c @@ -22,6 +22,7 @@ #include "logging.h" #include "link_mon.h" #include "cluster.h" +#include "compat.h" /* Open AIS error codes */ #define str_ais_error(x) \ @@ -96,6 +97,7 @@ struct checkpoint_data { #define LEAVING 2 #define MAX_CHECKPOINT_REQUESTERS 10 + struct clog_cpg { struct list_head list; @@ -152,8 +154,18 @@ int cluster_send(struct clog_tfr *tfr) */ tfr->uuid_instance = 0; - iov.iov_base = tfr; - iov.iov_len = sizeof(struct clog_tfr) + tfr->data_size; + /* + * All fields will be translated to little endian in the + * compatibility layer. We can skip various translation + * if the following two fields are the same. + */ + tfr->private[0] = cpu_to_le64(CLOG_TFR_VERSION); + tfr->private[1] = CLOG_TFR_VERSION; + + iov.iov_len = add_compatibility_layer(tfr, &(iov.iov_base), + CLOG_TFR_VERSION); + if (iov.iov_len < 0) + return iov.iov_len; if (entry->cpg_state != VALID) return -EINVAL; @@ -948,6 +960,13 @@ static void cpg_message_callback(cpg_handle_t handle, struct cpg_name *gname, struct clog_tfr *tmp_tfr = NULL; struct clog_cpg *match; + r = strip_compatibility_layer(msg, &msg, CLOG_TFR_VERSION); + if (r < 0) { + LOG_ERROR("Failed to strip compatibility layer"); + return; + } + r = 0; + match = find_clog_cpg(handle); if (!match) { LOG_ERROR("Unable to find clog_cpg for cluster message"); diff --git a/cmirror/src/compat.c b/cmirror/src/compat.c new file mode 100644 index 0000000..3639d99 --- /dev/null +++ b/cmirror/src/compat.c @@ -0,0 +1,483 @@ +/* + * Copyright (C) 2009 Red Hat, Inc. + * + * This file is released under the GPL. + */ +#include <errno.h> +#include <stdint.h> +#include <string.h> +#include "linux/dm-clog-tfr.h" +#include "logging.h" +#include "compat.h" + +#define DM_CLOG_RESPONSE 0x1000 /* in last byte of 32-bit value */ +#define DM_CLOG_CHECKPOINT_READY 21 +#define DM_CLOG_MEMBER_JOIN 22 + +/* Version 1 structures never were public */ + +/************************************************************************* + ** RHEL5.2 STRUCTURES + ************************************************************************/ +struct clog_tfr_v2 { + uint64_t private[2]; + char uuid[DM_UUID_LEN]; /* Ties a request to a specific mirror log */ + + int error; /* Used by server to inform of errors */ + uint32_t originator; /* Cluster ID of this machine */ + + uint64_t seq; /* Sequence number for request */ + uint32_t request_type; /* DM_CLOG_* */ + uint32_t data_size; /* How much data (not including this struct) */ + char data[0]; +}; + + +/************************************************************************* + ** RHEL5.3 STRUCTURES + ************************************************************************/ +struct clog_tfr_v3 { + uint64_t private[2]; + char uuid[DM_UUID_LEN]; /* Ties a request to a specific mirror log */ + + int error; /* Used by server to inform of errors */ + uint32_t originator; /* Cluster ID of this machine */ + + uint32_t seq; /* Sequence number for request */ + uint32_t request_type; /* DM_CLOG_* */ + uint32_t data_size; /* How much data (not including this struct) */ + char data[0]; +}; + + +/************************************************************************* + ** RHEL5.4+ STRUCTURES + ************************************************************************/ +struct clog_tfr_v4 { + uint64_t private[2]; + char uuid[DM_UUID_LEN]; /* Ties a request to a specific mirror log */ + char uuid_padding[3]; /* DM_UUID_LEN == 129 */ + uint32_t uuid_instance; /* Allows more than one instance w/ same uuid */ + + int32_t error; /* Used by server to inform of errors */ + uint32_t originator; /* Cluster ID of this machine */ + + uint32_t seq; /* Sequence number for request */ + uint32_t request_type; /* DM_CLOG_* */ + uint64_t data_size; /* How much data (not including this struct) */ + char data[0]; +}; + + +/************************************************************************* + ** UPSTREAM STRUCTURES + ************************************************************************/ + +/* + * The upstream machine <-> machine communication structure + */ +struct clog_version { + uint64_t version; + uint64_t flags; +}; + +struct compat_list { + struct compat_list *a, *b; +}; + +/* + * The upstream (2.6.32) kernel <-> user communication structure + */ +struct dm_ulog_request { + uint64_t luid; + char uuid[DM_UUID_LEN]; + char padding[7]; /* Padding because DM_UUID_LEN = 129 */ + + int32_t error; /* Used to report back processing errors */ + + uint32_t seq; /* Sequence number for request */ + uint32_t request_type; /* DM_ULOG_* defined above */ + uint32_t data_size; /* How much data (not including this struct) */ + + char data[0]; +}; + +struct clog_request { + union { + struct compat_list list; + struct clog_version v; + } u; + + /* + * 'originator' is the machine from which the requests + * was made. + */ + uint32_t originator; + + /* + * 'pit_server' is the "point-in-time" server for the + * request. (I.e. The machine that was the server at + * the time the request was issued - only important during + * startup. + */ + uint32_t pit_server; + + /* + * The request from the kernel that is being processed + */ + struct dm_ulog_request u_rq; +}; + +#define COMPAT_SIZE 512 +#define COMPAT_OFFSET 256 +unsigned char buffer[COMPAT_SIZE]; + +static int v2_to_v5(struct clog_tfr_v2 *v2, struct clog_request *rq) +{ + LOG_ERROR("Unable to add compat layer v2->v5"); + return -EINVAL; +} + +static int v3_to_v5(struct clog_tfr_v3 *v3, struct clog_request *rq) +{ + LOG_ERROR("Unable to add compat layer v3->v5"); + return -EINVAL; +} + +static int v4_to_v5_copy_data(struct clog_tfr_v4 *v4, struct clog_request *rq) +{ + int data_size = 0; + uint32_t rq_type = v4->request_type & ~DM_CLOG_RESPONSE; + + if (v4->request_type & DM_CLOG_RESPONSE) { + switch (rq_type) { + case DM_CLOG_CTR: + case DM_CLOG_DTR: + case DM_CLOG_PRESUSPEND: + case DM_CLOG_POSTSUSPEND: + case DM_CLOG_RESUME: + case DM_CLOG_FLUSH: + case DM_CLOG_MARK_REGION: + case DM_CLOG_CLEAR_REGION: + case DM_CLOG_SET_REGION_SYNC: + case DM_CLOG_CHECKPOINT_READY: + case DM_CLOG_MEMBER_JOIN: + /* No outbound data */ + break; + + case DM_CLOG_GET_REGION_SIZE: + data_size = sizeof(uint64_t); + if (rq) { + uint64_t *a64, *b64; + + a64 = (uint64_t *)v4->data; + b64 = (uint64_t *)rq->u_rq.data; + *b64 = cpu_to_le64(*a64); + } + break; + case DM_CLOG_IS_CLEAN: + case DM_CLOG_IN_SYNC: + data_size = sizeof(int64_t); + if (rq) { + int i; + int64_t *p64; + + i = *((int *)v4->data); + p64 = (int64_t *)rq->u_rq.data; + *p64 = cpu_to_le64((int64_t)i); + } + break; + case DM_CLOG_GET_RESYNC_WORK: + data_size = sizeof(uint64_t) * 2; + if (rq) { + int32_t i; + int64_t *pi64; + uint64_t *pu64, u64; + + i = *((int32_t *)v4->data); + u64 = ((uint64_t *)v4->data)[1]; + pi64 = (int64_t *)rq->u_rq.data; + pu64 = (uint64_t *)rq->u_rq.data; + pu64++; + *pi64 = cpu_to_le64((int64_t )i); + *pu64 = cpu_to_le64(u64); + } + break; + case DM_CLOG_GET_SYNC_COUNT: + data_size = sizeof(uint64_t); + if (rq) { + uint64_t *a64, *b64; + + a64 = (uint64_t *)v4->data; + b64 = (uint64_t *)rq->u_rq.data; + *b64 = cpu_to_le64(*a64); + } + break; + case DM_CLOG_STATUS_INFO: + case DM_CLOG_STATUS_TABLE: + data_size = v4->data_size; + if (rq) + memcpy(rq->u_rq.data, v4->data, v4->data_size); + break; + case DM_CLOG_IS_REMOTE_RECOVERING: + data_size = sizeof(int32_t) + + sizeof(uint32_t) + sizeof(uint64_t); + if (rq) { + int32_t is_recovering; + uint64_t in_sync_hint, *pu64; + int64_t *pi64; + + is_recovering = *((int32_t *)v4->data); + in_sync_hint = ((uint64_t *)v4->data)[1]; + pi64 = (int64_t *)rq->u_rq.data; + pu64 = ((uint64_t *)rq->u_rq.data) + 1; + *pi64 = cpu_to_le64((int64_t)is_recovering); + *pu64 = cpu_to_le64(in_sync_hint); + } + break; + default: + LOG_ERROR("Unknown request type, %u", rq_type); + return -EINVAL; + } + } else { + switch (rq_type) { + case DM_CLOG_CTR: + case DM_CLOG_DTR: + case DM_CLOG_PRESUSPEND: + case DM_CLOG_POSTSUSPEND: + case DM_CLOG_RESUME: + case DM_CLOG_GET_REGION_SIZE: + case DM_CLOG_FLUSH: + case DM_CLOG_GET_RESYNC_WORK: + case DM_CLOG_GET_SYNC_COUNT: + case DM_CLOG_STATUS_INFO: + case DM_CLOG_STATUS_TABLE: + case DM_CLOG_CHECKPOINT_READY: + case DM_CLOG_MEMBER_JOIN: + /* No incoming data */ + break; + case DM_CLOG_IS_CLEAN: + case DM_CLOG_IN_SYNC: + data_size = sizeof(uint64_t); + if (rq) { + uint64_t *a64, *b64; + + a64 = (uint64_t *)v4->data; + b64 = (uint64_t *)rq->u_rq.data; + *b64 = cpu_to_le64(*a64); + } + break; + case DM_CLOG_MARK_REGION: + case DM_CLOG_CLEAR_REGION: + data_size = v4->data_size; + if (rq) { + int i, end = data_size/sizeof(uint64_t); + uint64_t *a64, *b64; + + a64 = (uint64_t *)v4->data; + b64 = (uint64_t *)rq->u_rq.data; + for (i = 0; i < end; i++) + b64[i] = cpu_to_le64(a64[i]); + } + break; + case DM_CLOG_SET_REGION_SYNC: + data_size = sizeof(uint64_t) * 2; + if (rq) { + uint64_t r, *pu64; + int64_t *pi64; + int32_t in_sync; + + r = *((uint64_t *)v4->data); + in_sync = ((int32_t *)v4->data)[3]; + pu64 = (uint64_t *)rq->u_rq.data; + pi64 = ((int64_t *)rq->u_rq.data) + 1; + *pu64 = cpu_to_le64(r); + *pi64 = cpu_to_le64((int64_t)in_sync); + } + break; + case DM_CLOG_IS_REMOTE_RECOVERING: + data_size = sizeof(uint64_t); + if (rq) { + uint64_t *a64, *b64; + + a64 = (uint64_t *)v4->data; + b64 = (uint64_t *)rq->u_rq.data; + *b64 = cpu_to_le64(*a64); + } + break; + default: + LOG_ERROR("Unknown request type, %u", rq_type); + return -EINVAL; + } + } + + return data_size; +} + +static int v4_to_v5(struct clog_tfr_v4 *v4, struct clog_request *rq) +{ + int size; + struct dm_ulog_request *u_rq = &rq->u_rq; + + size = sizeof(*rq) + v4_to_v5_copy_data(v4, NULL); + + if (size > (COMPAT_SIZE - COMPAT_OFFSET)) { + LOG_ERROR("Not enough space for compatibility layer (v4->v5)"); + return -EINVAL; + } + + memcpy(u_rq->uuid, v4->uuid, DM_UUID_LEN); + u_rq->error = cpu_to_le32(v4->error); + u_rq->seq = cpu_to_le32(v4->seq); + u_rq->request_type = cpu_to_le32(v4->request_type); + u_rq->data_size = cpu_to_le64(v4->data_size); + + rq->originator = cpu_to_le32(v4->originator); + + v4_to_v5_copy_data(v4, rq); + + return COMPAT_OFFSET + sizeof(*rq) + u_rq->data_size; +} + +int add_compatibility_layer(void *from, void **compat_version, + unsigned from_version) +{ + int from_size = COMPAT_SIZE; + struct clog_tfr_v2 *v2 = from; + struct clog_tfr_v3 *v3 = from; + struct clog_tfr_v4 *v4 = from; + + switch (from_version) { + case 2: + from_size = sizeof(*v2) + v2->data_size; + break; + case 3: + from_size = sizeof(*v3) + v3->data_size; + break; + case 4: + from_size = sizeof(*v4) + v4->data_size; + break; + default: + LOG_ERROR("Invalid 'from_version'"); + return -EINVAL; + } + + if (from_size > COMPAT_OFFSET) { + LOG_ERROR("Not enough space for request (v%d:%d)", + from_version, from_size); + return -EINVAL; + } + + memset(buffer, 0, COMPAT_SIZE); + memcpy(buffer, from, from_size); + *compat_version = buffer; + + switch (from_version) { + case 2: + return v2_to_v5((void *)buffer, (void *)buffer + COMPAT_OFFSET); + case 3: + return v3_to_v5((void *)buffer, (void *)buffer + COMPAT_OFFSET); + case 4: + return v4_to_v5((void *)buffer, (void *)buffer + COMPAT_OFFSET); + } + + return -EINVAL; +} + +static int v5_to_v2(struct clog_request *rq, struct clog_tfr_v2 *v2) +{ + LOG_ERROR("Unable to convert v5->v2"); + return -EINVAL; +} + +static int v5_to_v3(struct clog_request *rq, struct clog_tfr_v3 *v3) +{ + LOG_ERROR("Unable to convert v5->v3"); + return -EINVAL; +} + +static int v5_to_v4(struct clog_request *rq, struct clog_tfr_v4 *v4) +{ + struct dm_ulog_request *u_rq = &rq->u_rq; + + if ((sizeof(*v4) + u_rq->data_size) > (COMPAT_SIZE - COMPAT_OFFSET)) { + LOG_ERROR("Not enough space for compatibility data (v5->v4)"); + return -EINVAL; + } + + LOG_ERROR("Stripping compatibility layer (v5->v4)"); + v4->uuid_instance = (uint32_t)u_rq->luid; + + memcpy(v4->uuid, u_rq->uuid, DM_UUID_LEN); + v4->error = u_rq->error; + v4->seq = u_rq->seq; + v4->request_type = u_rq->request_type; + v4->data_size = u_rq->data_size; + + v4->originator = rq->originator; + + memcpy(v4->data, u_rq->data, u_rq->data_size); + + return 0; +} + +int strip_compatibility_layer(void *from, void **to, + unsigned to_version) +{ + static int report = 1; + uint64_t *vp = from; + uint64_t version = le64_to_cpu(*vp); + uint64_t unconverted_version = vp[1]; + + /* We will modify the front of the area in place */ + *to = from; + + /* Already the version we need and same byte-order? */ + if ((version == to_version) && (unconverted_version == version)) + return 0; + + /* A different acceptable version? */ + if ((version > 1) && (version < 5)) { + /* We can use the compatibility layer to convert */ + switch (to_version) { + case 2: + return v5_to_v2(from + COMPAT_OFFSET, from); + case 3: + return v5_to_v3(from + COMPAT_OFFSET, from); + case 4: + return v5_to_v4(from + COMPAT_OFFSET, from); + case 5: + *to = from + COMPAT_OFFSET; + return 0; + } + } + + /* Is it upstream format? */ + if (version == 5) { + *to = buffer; + switch (to_version) { + case 2: + return v5_to_v2(from, (void *)buffer); + case 3: + return v5_to_v3(from, (void *)buffer); + case 4: + return v5_to_v4(from, (void *)buffer); + } + return -EINVAL; + } + + /* + * Is version unknown? (From a release that didn't specify?) + * We must assume it is the same version - that the user is + * z-stream updating first. + * + * IOW, assume (version == to_version) + */ + + if (report) { + LOG_ERROR("Unknown version for communication struct - forced to assume version %d", to_version); + report = 0; + } + + return 0; +} diff --git a/cmirror/src/compat.h b/cmirror/src/compat.h new file mode 100644 index 0000000..f6d373b --- /dev/null +++ b/cmirror/src/compat.h @@ -0,0 +1,80 @@ +/* + * Copyright (C) 2009 Red Hat, Inc. + * + * This file is released under the GPL. + */ +#ifndef __COMPAT_DOT_H__ +#define __COMPAT_DOT_H__ + +/* + * THE BYTE SWAPPING CODE IS LIFTED DIRECTLY FROM: + * cluster/group/include/linux_endian.h - a GPL v.2 file. + */ + +#include <endian.h> +#include <byteswap.h> + +/* I'm not sure which versions of alpha glibc/gcc are broken, + so fix all of them. */ +#ifdef __alpha__ +#undef bswap_64 +static __inline__ unsigned long bswap_64(unsigned long x) +{ + unsigned int h = x >> 32; + unsigned int l = x; + + h = bswap_32(h); + l = bswap_32(l); + + return ((unsigned long)l << 32) | h; +} +#endif /* __alpha__ */ + + +#if __BYTE_ORDER == __BIG_ENDIAN + +#define be16_to_cpu(x) (x) +#define be32_to_cpu(x) (x) +#define be64_to_cpu(x) (x) + +#define cpu_to_be16(x) (x) +#define cpu_to_be32(x) (x) +#define cpu_to_be64(x) (x) + +#define le16_to_cpu(x) (bswap_16((x))) +#define le32_to_cpu(x) (bswap_32((x))) +#define le64_to_cpu(x) (bswap_64((x))) + +#define cpu_to_le16(x) (bswap_16((x))) +#define cpu_to_le32(x) (bswap_32((x))) +#define cpu_to_le64(x) (bswap_64((x))) + +#endif /* __BYTE_ORDER == __BIG_ENDIAN */ + + +#if __BYTE_ORDER == __LITTLE_ENDIAN + +#define be16_to_cpu(x) (bswap_16((x))) +#define be32_to_cpu(x) (bswap_32((x))) +#define be64_to_cpu(x) (bswap_64((x))) + +#define cpu_to_be16(x) (bswap_16((x))) +#define cpu_to_be32(x) (bswap_32((x))) +#define cpu_to_be64(x) (bswap_64((x))) + +#define le16_to_cpu(x) (x) +#define le32_to_cpu(x) (x) +#define le64_to_cpu(x) (x) + +#define cpu_to_le16(x) (x) +#define cpu_to_le32(x) (x) +#define cpu_to_le64(x) (x) + +#endif /* __BYTE_ORDER == __LITTLE_ENDIAN */ + + +int add_compatibility_layer(void *from, void **compat_version, + unsigned from_version); +int strip_compatibility_layer(void *from, void **to, + unsigned to_version); +#endif /* __COMPAT_DOT_H__ */ diff --git a/cmirror/src/local.c b/cmirror/src/local.c index cf64855..4d4800b 100644 --- a/cmirror/src/local.c +++ b/cmirror/src/local.c @@ -15,6 +15,7 @@ #include "logging.h" #include "link_mon.h" #include "local.h" +#include "compat.h" static int cn_fd; /* Connector (netlink) socket fd */ static char recv_buf[2048]; @@ -193,6 +194,15 @@ static int do_local_work(void *data) if (!tfr) return 0; + if (tfr->private[0] != CLOG_TFR_VERSION) { + LOG_ERROR("Kernel/Userspace version mismatch!"); + tfr->data_size = 0; + tfr->error = -EINVAL; + kernel_send(tfr); + + return tfr->error; + } + LOG_DBG("[%s] Request from kernel received: [%s/%u]", SHORT_UUID(tfr->uuid), RQ_TYPE(tfr->request_type), tfr->seq);
1
0
0
0
cluster: STABLE3 - rgmanager: Fix event generation with central_processing
by Lon Hohberger
22 Dec '09
22 Dec '09
Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=83…
Commit: 83fa41cb23b81108a6ffc6fe79c2656238a0ffb7 Parent: 1f283367656fdad0ae5fd66c2cd58ec0fc08f9f4 Author: Lon Hohberger <lhh(a)redhat.com> AuthorDate: Mon Dec 21 17:54:37 2009 -0500 Committer: Lon Hohberger <lhh(a)redhat.com> CommitterDate: Tue Dec 22 10:53:47 2009 -0500 rgmanager: Fix event generation with central_processing This patch fixes event generation and processing when a node dies. Effectively, what was happening is that when a node failed and was fenced, no events for the dead services on that host were generated. This led to dependent services not restarting correctly in many cases. Resolves: rhbz#523999 Signed-off-by: Lon Hohberger <lhh(a)redhat.com> --- rgmanager/include/resgroup.h | 2 ++ rgmanager/src/daemons/main.c | 1 + rgmanager/src/daemons/rg_forward.c | 4 ++-- rgmanager/src/daemons/rg_state.c | 9 ++++++--- rgmanager/src/daemons/service_op.c | 2 +- rgmanager/src/resources/default_event_script.sl | 8 ++++++++ 6 files changed, 20 insertions(+), 6 deletions(-) diff --git a/rgmanager/include/resgroup.h b/rgmanager/include/resgroup.h index 7011a0c..5a13fcf 100644 --- a/rgmanager/include/resgroup.h +++ b/rgmanager/include/resgroup.h @@ -180,6 +180,8 @@ int get_rg_state_local(const char *servicename, rg_state_t *svcblk); uint32_t best_target_node(cluster_member_list_t *allowed, uint32_t owner, const char *rg_name, int lock); +extern int cluster_timeout; + #ifdef DEBUG int _rg_lock(const char *name, struct dlm_lksb *p); int _rg_lock_dbg(const char *, struct dlm_lksb *, const char *, int); diff --git a/rgmanager/src/daemons/main.c b/rgmanager/src/daemons/main.c index 04d9961..883266a 100644 --- a/rgmanager/src/daemons/main.c +++ b/rgmanager/src/daemons/main.c @@ -34,6 +34,7 @@ void flag_shutdown(int sig); int watchdog_init(void); +int cluster_timeout = 10; int shutdown_pending = 0, running = 1, need_reconfigure = 0; char debug = 0; /* XXX* */ static int signalled = 0; diff --git a/rgmanager/src/daemons/rg_forward.c b/rgmanager/src/daemons/rg_forward.c index bb42922..48649b8 100644 --- a/rgmanager/src/daemons/rg_forward.c +++ b/rgmanager/src/daemons/rg_forward.c @@ -85,7 +85,7 @@ forwarding_thread(void *arg) build_message(&msg, req->rr_request, req->rr_group, req->rr_target, req->rr_arg0, req->rr_arg1); - if (msg_open(MSG_CLUSTER, rgs.rs_owner, RG_PORT, ctx, 10) < 0) { + if (msg_open(MSG_CLUSTER, rgs.rs_owner, RG_PORT, ctx, 2 * cluster_timeout) < 0) { logt_print(LOG_DEBUG, "FW: Failed to open channel to %d CTX: %p\n", rgs.rs_owner, ctx); goto out_fail; @@ -184,7 +184,7 @@ forwarding_thread_v2(void *arg) strerror(errno)); goto out_fail; } - if (msg_open(MSG_CLUSTER, target, RG_PORT, ctx, 10) < 0) { + if (msg_open(MSG_CLUSTER, target, RG_PORT, ctx, 2 * cluster_timeout) < 0) { logt_print(LOG_DEBUG, "FW: Failed to open channel to %d CTX: %p\n", target, ctx); goto out_fail; diff --git a/rgmanager/src/daemons/rg_state.c b/rgmanager/src/daemons/rg_state.c index 6f80047..029100e 100644 --- a/rgmanager/src/daemons/rg_state.c +++ b/rgmanager/src/daemons/rg_state.c @@ -969,7 +969,7 @@ get_new_owner(const char *svcName) continue; if (msg_open(MSG_CLUSTER, membership->cml_members[x].cn_nodeid, - RG_PORT, &ctx, 10) < 0) { + RG_PORT, &ctx, 2 * cluster_timeout) < 0) { /* failed to open: better to claim false successful status rather than claim a failure and possibly end up with a service on >1 node */ @@ -1254,7 +1254,10 @@ _svc_stop(const char *svcName, int req, int recover, uint32_t newstate) rg_unlock(&lockp); return RG_EFAIL; } - /* FALLTHROUGH */ + rg_unlock(&lockp); + broadcast_event(svcName, RG_STATE_STOPPED, + -1, svcStatus.rs_last_owner); + return RG_ESUCCESS; case 2: rg_unlock(&lockp); return RG_ESUCCESS; @@ -1553,7 +1556,7 @@ svc_start_remote(const char *svcName, int request, uint32_t target) msg_relo.sm_data.d_svcOwner = target; /* Open a connection to the other node */ - if (msg_open(MSG_CLUSTER, target, RG_PORT, &ctx, 2)< 0) { + if (msg_open(MSG_CLUSTER, target, RG_PORT, &ctx, 2 * cluster_timeout)< 0) { logt_print(LOG_ERR, "#58: Failed opening connection to member #%d\n", target); diff --git a/rgmanager/src/daemons/service_op.c b/rgmanager/src/daemons/service_op.c index a508f1e..112b267 100644 --- a/rgmanager/src/daemons/service_op.c +++ b/rgmanager/src/daemons/service_op.c @@ -142,7 +142,7 @@ service_op_stop(char *svcName, int do_disable, int event_type) } } - if (msg_open(MSG_CLUSTER, msgtarget, RG_PORT, &ctx, 2)< 0) { + if (msg_open(MSG_CLUSTER, msgtarget, RG_PORT, &ctx, 2 * cluster_timeout)< 0) { logt_print(LOG_ERR, "#58: Failed opening connection to member #%d\n", my_id()); diff --git a/rgmanager/src/resources/default_event_script.sl b/rgmanager/src/resources/default_event_script.sl index 84e6d72..fad22ac 100644 --- a/rgmanager/src/resources/default_event_script.sl +++ b/rgmanager/src/resources/default_event_script.sl @@ -157,6 +157,14 @@ define move_or_start(service, node_list) (,,, owner, state) = service_status(service); debug("Evaluating ", service, " state=", state, " owner=", owner); + if ((event_type == EVENT_NODE) and (node_id == owner) and + (node_state == NODE_OFFLINE)) { + info("Marking service ", service, " on down member ", + owner, " as stopped"); + if (service_stop(service) < 0) { + return ERR_ABORT; + } + } len = length(node_list); if (len == 0) {
1
0
0
0
cluster: RHEL55 - rgmanager: Fix event generation with central_processing
by Lon Hohberger
22 Dec '09
22 Dec '09
Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=e1…
Commit: e1e194a8337d0ced672e9b6fd08f4ca0d02fb52e Parent: 952090aca003968b8e9b47baa865cd6d603b061d Author: Lon Hohberger <lhh(a)redhat.com> AuthorDate: Mon Dec 21 17:54:37 2009 -0500 Committer: Lon Hohberger <lhh(a)redhat.com> CommitterDate: Tue Dec 22 10:16:04 2009 -0500 rgmanager: Fix event generation with central_processing This patch fixes event generation and processing when a node dies. Effectively, what was happening is that when a node failed and was fenced, no events for the dead services on that host were generated. This led to dependent services not restarting correctly in many cases. Resolves: rhbz#523999 Signed-off-by: Lon Hohberger <lhh(a)redhat.com> --- rgmanager/include/resgroup.h | 2 ++ rgmanager/src/daemons/main.c | 2 +- rgmanager/src/daemons/rg_forward.c | 4 ++-- rgmanager/src/daemons/rg_state.c | 9 ++++++--- rgmanager/src/daemons/service_op.c | 2 +- rgmanager/src/resources/default_event_script.sl | 8 ++++++++ 6 files changed, 20 insertions(+), 7 deletions(-) diff --git a/rgmanager/include/resgroup.h b/rgmanager/include/resgroup.h index a4b53fe..ec3e67d 100644 --- a/rgmanager/include/resgroup.h +++ b/rgmanager/include/resgroup.h @@ -166,6 +166,8 @@ int get_rg_state_local(char *servicename, rg_state_t *svcblk); uint32_t best_target_node(cluster_member_list_t *allowed, uint32_t owner, char *rg_name, int lock); +extern int cluster_timeout; + #ifdef DEBUG int _rg_lock_dbg(char *, struct dlm_lksb *, char *, int); #define rg_lock(name, p) _rg_lock_dbg(name, p, __FILE__, __LINE__) diff --git a/rgmanager/src/daemons/main.c b/rgmanager/src/daemons/main.c index 601e7d0..93ecff3 100644 --- a/rgmanager/src/daemons/main.c +++ b/rgmanager/src/daemons/main.c @@ -63,6 +63,7 @@ int32_t master_event_callback(char *key, uint64_t viewno, void *data, uint32_t d int node_has_fencing(int nodeid); int fence_domain_joined(void); +int cluster_timeout = 10; int shutdown_pending = 0, running = 1, need_reconfigure = 0; char debug = 0; /* XXX* */ static int signalled = 0; @@ -1022,7 +1023,6 @@ main(int argc, char **argv) msgctx_t *local_ctx; pthread_t th; cman_handle_t clu = NULL; - int cluster_timeout = 10; while ((rv = getopt(argc, argv, "wfdN")) != EOF) { switch (rv) { diff --git a/rgmanager/src/daemons/rg_forward.c b/rgmanager/src/daemons/rg_forward.c index c827c62..bf32f1d 100644 --- a/rgmanager/src/daemons/rg_forward.c +++ b/rgmanager/src/daemons/rg_forward.c @@ -103,7 +103,7 @@ forwarding_thread(void *arg) build_message(&msg, req->rr_request, req->rr_group, req->rr_target, req->rr_arg0, req->rr_arg1); - if (msg_open(MSG_CLUSTER, rgs.rs_owner, RG_PORT, ctx, 10) < 0) { + if (msg_open(MSG_CLUSTER, rgs.rs_owner, RG_PORT, ctx, 2 * cluster_timeout) < 0) { clulog(LOG_DEBUG, "FW: Failed to open channel to %d CTX: %p\n", rgs.rs_owner, ctx); goto out_fail; @@ -202,7 +202,7 @@ forwarding_thread_v2(void *arg) strerror(errno)); goto out_fail; } - if (msg_open(MSG_CLUSTER, target, RG_PORT, ctx, 10) < 0) { + if (msg_open(MSG_CLUSTER, target, RG_PORT, ctx, 2 * cluster_timeout) < 0) { clulog(LOG_DEBUG, "FW: Failed to open channel to %d CTX: %p\n", target, ctx); goto out_fail; diff --git a/rgmanager/src/daemons/rg_state.c b/rgmanager/src/daemons/rg_state.c index d68ce9b..ce5189c 100644 --- a/rgmanager/src/daemons/rg_state.c +++ b/rgmanager/src/daemons/rg_state.c @@ -1031,7 +1031,7 @@ get_new_owner(char *svcName) continue; if (msg_open(MSG_CLUSTER, membership->cml_members[x].cn_nodeid, - RG_PORT, &ctx, 2) < 0) { + RG_PORT, &ctx, 2 * cluster_timeout) < 0) { /* failed to open: better to claim false successful status rather than claim a failure and possibly end up with a service on >1 node */ @@ -1315,7 +1315,10 @@ _svc_stop(char *svcName, int req, int recover, uint32_t newstate) rg_unlock(&lockp); return RG_EFAIL; } - /* FALLTHROUGH */ + rg_unlock(&lockp); + broadcast_event(svcName, RG_STATE_STOPPED, + -1, svcStatus.rs_last_owner); + return RG_ESUCCESS; case 2: rg_unlock(&lockp); return RG_ESUCCESS; @@ -1615,7 +1618,7 @@ svc_start_remote(char *svcName, int request, uint32_t target) msg_relo.sm_data.d_svcOwner = target; /* Open a connection to the other node */ - if (msg_open(MSG_CLUSTER, target, RG_PORT, &ctx, 2)< 0) { + if (msg_open(MSG_CLUSTER, target, RG_PORT, &ctx, 2 * cluster_timeout)< 0) { clulog(LOG_ERR, "#58: Failed opening connection to member #%d\n", target); diff --git a/rgmanager/src/daemons/service_op.c b/rgmanager/src/daemons/service_op.c index 8206d50..8e1cc91 100644 --- a/rgmanager/src/daemons/service_op.c +++ b/rgmanager/src/daemons/service_op.c @@ -162,7 +162,7 @@ service_op_stop(char *svcName, int do_disable, int event_type) } } - if (msg_open(MSG_CLUSTER, msgtarget, RG_PORT, &ctx, 2)< 0) { + if (msg_open(MSG_CLUSTER, msgtarget, RG_PORT, &ctx, 2 * cluster_timeout)< 0) { clulog(LOG_ERR, "#58: Failed opening connection to member #%d\n", my_id()); diff --git a/rgmanager/src/resources/default_event_script.sl b/rgmanager/src/resources/default_event_script.sl index 7809b20..25347eb 100644 --- a/rgmanager/src/resources/default_event_script.sl +++ b/rgmanager/src/resources/default_event_script.sl @@ -157,6 +157,14 @@ define move_or_start(service, node_list) (,,, owner, state) = service_status(service); debug("Evaluating ", service, " state=", state, " owner=", owner); + if ((event_type == EVENT_NODE) and (node_id == owner) and + (node_state == NODE_OFFLINE)) { + info("Marking service ", service, " on down member ", + owner, " as stopped"); + if (service_stop(service) < 0) { + return ERR_ABORT; + } + } len = length(node_list); if (len == 0) {
1
0
0
0
cluster: RHEL55 - fencing: fence_rsa fails to login
by Marek Grác
22 Dec '09
22 Dec '09
Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=95…
Commit: 952090aca003968b8e9b47baa865cd6d603b061d Parent: 6819f2d19bf02448b3b099c90450031d60192d06 Author: Marek 'marx' Grac <mgrac(a)redhat.com> AuthorDate: Tue Dec 22 15:51:53 2009 +0100 Committer: Marek 'marx' Grac <mgrac(a)redhat.com> CommitterDate: Tue Dec 22 15:55:01 2009 +0100 fencing: fence_rsa fails to login New version/firmware have new login screen which was not supported. Also it is slower, so default timeout for login-timeout is set to 10 seconds. Resolves: rhbz#549473 --- fence/agents/lib/fencing.py.py | 2 +- fence/agents/rsa/fence_rsa.py | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py index 711e17d..b54d1a8 100644 --- a/fence/agents/lib/fencing.py.py +++ b/fence/agents/lib/fencing.py.py @@ -802,7 +802,7 @@ def fence_login(options): login_eol = "\r\n" try: - re_login = re.compile("(login: )|(Login Name: )|(username: )|(User Name :)", re.IGNORECASE) + re_login = re.compile("(login\s*: )|(Login Name: )|(username: )|(User Name :)", re.IGNORECASE) re_pass = re.compile("password", re.IGNORECASE) if options.has_key("-z"): diff --git a/fence/agents/rsa/fence_rsa.py b/fence/agents/rsa/fence_rsa.py index 7611298..ed794fa 100755 --- a/fence/agents/rsa/fence_rsa.py +++ b/fence/agents/rsa/fence_rsa.py @@ -46,6 +46,7 @@ def main(): atexit.register(atexit_handler) + all_opt["login_timeout"]["default"] = 10 options = check_input(device_opt, process_input(device_opt)) ##
1
0
0
0
cluster: STABLE3 - fencing: fence_rsa fails to login
by Marek Grác
22 Dec '09
22 Dec '09
Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=1f…
Commit: 1f283367656fdad0ae5fd66c2cd58ec0fc08f9f4 Parent: 8afc2b31b9f5742b5ab56b35cf34e01c75284a00 Author: Marek 'marx' Grac <mgrac(a)redhat.com> AuthorDate: Tue Dec 22 15:51:53 2009 +0100 Committer: Marek 'marx' Grac <mgrac(a)redhat.com> CommitterDate: Tue Dec 22 15:51:53 2009 +0100 fencing: fence_rsa fails to login New version/firmware have new login screen which was not supported. Also it is slower, so default timeout for login-timeout is set to 10 seconds. Resolves: rhbz#549473 --- fence/agents/lib/fencing.py.py | 2 +- fence/agents/rsa/fence_rsa.py | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py index 70bdd34..2617492 100644 --- a/fence/agents/lib/fencing.py.py +++ b/fence/agents/lib/fencing.py.py @@ -804,7 +804,7 @@ def fence_login(options): login_eol = "\r\n" try: - re_login = re.compile("(login: )|(Login Name: )|(username: )|(User Name :)", re.IGNORECASE) + re_login = re.compile("(login\s*: )|(Login Name: )|(username: )|(User Name :)", re.IGNORECASE) re_pass = re.compile("password", re.IGNORECASE) if options.has_key("-z"): diff --git a/fence/agents/rsa/fence_rsa.py b/fence/agents/rsa/fence_rsa.py index 133129e..eb5b635 100644 --- a/fence/agents/rsa/fence_rsa.py +++ b/fence/agents/rsa/fence_rsa.py @@ -46,6 +46,7 @@ def main(): atexit.register(atexit_handler) + all_opt["login_timeout"]["default"] = 10 options = check_input(device_opt, process_input(device_opt)) ##
1
0
0
0
fence-agents: master - fencing: fence_rsa fails to login
by Marek Grác
22 Dec '09
22 Dec '09
Gitweb:
http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commi…
Commit: 1c1883f8d650a8c1b1fe03ad4a47654031be4c96 Parent: 8c15101216a7a87134e0f9b8abe1f2eb444fcee1 Author: Marek 'marx' Grac <mgrac(a)redhat.com> AuthorDate: Tue Dec 22 15:47:57 2009 +0100 Committer: Marek 'marx' Grac <mgrac(a)redhat.com> CommitterDate: Tue Dec 22 15:47:57 2009 +0100 fencing: fence_rsa fails to login New version/firmware have new login screen which was not supported. Also it is slower, so default timeout for login-timeout is set to 10 seconds. --- fence/agents/lib/fencing.py.py | 2 +- fence/agents/rsa/fence_rsa.py | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/fence/agents/lib/fencing.py.py b/fence/agents/lib/fencing.py.py index c4556d5..1a34210 100644 --- a/fence/agents/lib/fencing.py.py +++ b/fence/agents/lib/fencing.py.py @@ -804,7 +804,7 @@ def fence_login(options): login_eol = "\r\n" try: - re_login = re.compile("(login: )|(Login Name: )|(username: )|(User Name :)", re.IGNORECASE) + re_login = re.compile("(login\s*: )|(Login Name: )|(username: )|(User Name :)", re.IGNORECASE) re_pass = re.compile("password", re.IGNORECASE) if options.has_key("-z"): diff --git a/fence/agents/rsa/fence_rsa.py b/fence/agents/rsa/fence_rsa.py index 415df52..cce3777 100644 --- a/fence/agents/rsa/fence_rsa.py +++ b/fence/agents/rsa/fence_rsa.py @@ -45,6 +45,7 @@ def main(): atexit.register(atexit_handler) + all_opt["login_timeout"]["default"] = 10 options = check_input(device_opt, process_input(device_opt)) ##
1
0
0
0
cluster: STABLE3 - fencing: Add support for identity files
by Marek Grác
22 Dec '09
22 Dec '09
Gitweb:
http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=8a…
Commit: 8afc2b31b9f5742b5ab56b35cf34e01c75284a00 Parent: aa2747f28b0541947dc0b718484cf5278f46c2e1 Author: Marek 'marx' Grac <mgrac(a)redhat.com> AuthorDate: Tue Dec 22 14:22:18 2009 +0100 Committer: Marek 'marx' Grac <mgrac(a)redhat.com> CommitterDate: Tue Dec 22 14:22:18 2009 +0100 fencing: Add support for identity files Some fence agents contains support for ssh but did not support identity files. --- fence/agents/alom/fence_alom.py | 2 +- fence/agents/apc/fence_apc.py | 2 +- fence/agents/drac5/fence_drac5.py | 2 +- fence/agents/ilo_mp/fence_ilo_mp.py | 2 +- fence/agents/lpar/fence_lpar.py | 2 +- fence/agents/rsa/fence_rsa.py | 2 +- fence/agents/vmware/fence_vmware.py | 2 +- fence/agents/wti/fence_wti.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fence/agents/alom/fence_alom.py b/fence/agents/alom/fence_alom.py index 086b69b..5dfe9e0 100644 --- a/fence/agents/alom/fence_alom.py +++ b/fence/agents/alom/fence_alom.py @@ -45,7 +45,7 @@ def set_power_status(conn, options): def main(): device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug", "action", "ipaddr", "login", "passwd", "passwd_script", - "secure", "test", "inet4_only", "inet6_only", "ipport", + "secure", "identity_file", "test", "inet4_only", "inet6_only", "ipport", "power_timeout", "shell_timeout", "login_timeout", "power_wait" ] atexit.register(atexit_handler) diff --git a/fence/agents/apc/fence_apc.py b/fence/agents/apc/fence_apc.py index ea29d6a..b70b220 100755 --- a/fence/agents/apc/fence_apc.py +++ b/fence/agents/apc/fence_apc.py @@ -184,7 +184,7 @@ def set_power_status(conn, options): def main(): device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug", "action", "ipaddr", "login", "passwd", "passwd_script", - "secure", "port", "switch", "test", "separator", + "secure", "port", "identity_file", "switch", "test", "separator", "inet4_only", "inet6_only", "ipport", "power_timeout", "shell_timeout", "login_timeout", "power_wait" ] diff --git a/fence/agents/drac5/fence_drac5.py b/fence/agents/drac5/fence_drac5.py index b185541..900b547 100755 --- a/fence/agents/drac5/fence_drac5.py +++ b/fence/agents/drac5/fence_drac5.py @@ -83,7 +83,7 @@ def get_list_devices(conn, options): def main(): device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug", "action", "ipaddr", "login", "passwd", "passwd_script", - "cmd_prompt", "secure", "drac_version", "module_name", + "cmd_prompt", "secure", "identity_file", "drac_version", "module_name", "separator", "inet4_only", "inet6_only", "ipport", "power_timeout", "shell_timeout", "login_timeout", "power_wait" ] diff --git a/fence/agents/ilo_mp/fence_ilo_mp.py b/fence/agents/ilo_mp/fence_ilo_mp.py index 83aec1d..b96c417 100644 --- a/fence/agents/ilo_mp/fence_ilo_mp.py +++ b/fence/agents/ilo_mp/fence_ilo_mp.py @@ -31,7 +31,7 @@ def set_power_status(conn, options): def main(): device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug", "action", "ipaddr", "login", "passwd", "passwd_script", - "secure", "cmd_prompt", "ipport", "login_eol_lf", + "secure", "identity_file", "cmd_prompt", "ipport", "login_eol_lf", "separator", "inet4_only", "inet6_only", "power_timeout", "shell_timeout", "login_timeout", "power_wait" ] diff --git a/fence/agents/lpar/fence_lpar.py b/fence/agents/lpar/fence_lpar.py index 52711d8..c8bf22f 100644 --- a/fence/agents/lpar/fence_lpar.py +++ b/fence/agents/lpar/fence_lpar.py @@ -132,7 +132,7 @@ def get_lpar_list(conn, options): def main(): device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug", "action", "ipaddr", "login", "passwd", "passwd_script", - "secure", "partition", "managed", "hmc_version", "cmd_prompt", + "secure", "identity_file", "partition", "managed", "hmc_version", "cmd_prompt", "separator", "inet4_only", "inet6_only", "ipport", "power_timeout", "shell_timeout", "login_timeout", "power_wait" ] diff --git a/fence/agents/rsa/fence_rsa.py b/fence/agents/rsa/fence_rsa.py index a18b43d..133129e 100644 --- a/fence/agents/rsa/fence_rsa.py +++ b/fence/agents/rsa/fence_rsa.py @@ -41,7 +41,7 @@ def set_power_status(conn, options): def main(): device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug", "action", "ipaddr", "login", "passwd", "passwd_script", - "cmd_prompt", "secure", "ipport", + "cmd_prompt", "secure", "identity_file", "ipport", "power_timeout", "shell_timeout", "login_timeout", "power_wait" ] atexit.register(atexit_handler) diff --git a/fence/agents/vmware/fence_vmware.py b/fence/agents/vmware/fence_vmware.py index 75fd887..ad51687 100644 --- a/fence/agents/vmware/fence_vmware.py +++ b/fence/agents/vmware/fence_vmware.py @@ -287,7 +287,7 @@ def main(): device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug", "action", "ipaddr", "login", "passwd", "passwd_script", "test", "port", "separator", "exec", "vmware_type", - "vmware_datacenter", "secure", + "vmware_datacenter", "secure", "identity_file", "power_timeout", "shell_timeout", "login_timeout", "power_wait" ] atexit.register(atexit_handler) diff --git a/fence/agents/wti/fence_wti.py b/fence/agents/wti/fence_wti.py index 3ac9217..a45e3ec 100644 --- a/fence/agents/wti/fence_wti.py +++ b/fence/agents/wti/fence_wti.py @@ -75,7 +75,7 @@ def set_power_status(conn, options): def main(): device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug", "action", "ipaddr", "login", "passwd", "passwd_script", - "cmd_prompt", "secure", "port", "no_login", "no_password", + "cmd_prompt", "secure", "identity_file", "port", "no_login", "no_password", "test", "separator", "inet4_only", "inet6_only", "ipport", "power_timeout", "shell_timeout", "login_timeout", "power_wait" ]
1
0
0
0
fence-agents: master - fencing: Add support for identity files
by Marek Grác
22 Dec '09
22 Dec '09
Gitweb:
http://git.fedorahosted.org/git/fence-agents.git?p=fence-agents.git;a=commi…
Commit: 8c15101216a7a87134e0f9b8abe1f2eb444fcee1 Parent: 5e17d78cb5e7745b7cc4762767a2bc093c95f535 Author: Marek 'marx' Grac <mgrac(a)redhat.com> AuthorDate: Tue Dec 22 14:15:30 2009 +0100 Committer: Marek 'marx' Grac <mgrac(a)redhat.com> CommitterDate: Tue Dec 22 14:15:30 2009 +0100 fencing: Add support for identity files Some fence agents contains support for ssh but did not support identity files. --- fence/agents/alom/fence_alom.py | 2 +- fence/agents/apc/fence_apc.py | 2 +- fence/agents/drac5/fence_drac5.py | 2 +- fence/agents/ilo_mp/fence_ilo_mp.py | 2 +- fence/agents/lpar/fence_lpar.py | 2 +- fence/agents/rsa/fence_rsa.py | 2 +- fence/agents/vmware/fence_vmware.py | 2 +- fence/agents/wti/fence_wti.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fence/agents/alom/fence_alom.py b/fence/agents/alom/fence_alom.py index 8793e92..9009cdf 100644 --- a/fence/agents/alom/fence_alom.py +++ b/fence/agents/alom/fence_alom.py @@ -45,7 +45,7 @@ def set_power_status(conn, options): def main(): device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug", "action", "ipaddr", "login", "passwd", "passwd_script", - "secure", "test", "inet4_only", "inet6_only", "ipport", + "secure", "identity_file", "test", "inet4_only", "inet6_only", "ipport", "power_timeout", "shell_timeout", "login_timeout", "power_wait" ] atexit.register(atexit_handler) diff --git a/fence/agents/apc/fence_apc.py b/fence/agents/apc/fence_apc.py index 92b109c..57858cf 100755 --- a/fence/agents/apc/fence_apc.py +++ b/fence/agents/apc/fence_apc.py @@ -184,7 +184,7 @@ def set_power_status(conn, options): def main(): device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug", "action", "ipaddr", "login", "passwd", "passwd_script", - "secure", "port", "switch", "test", "separator", + "secure", "port", "identity_file", "switch", "test", "separator", "inet4_only", "inet6_only", "ipport", "power_timeout", "shell_timeout", "login_timeout", "power_wait" ] diff --git a/fence/agents/drac5/fence_drac5.py b/fence/agents/drac5/fence_drac5.py index ab5056b..ce2a801 100644 --- a/fence/agents/drac5/fence_drac5.py +++ b/fence/agents/drac5/fence_drac5.py @@ -83,7 +83,7 @@ def get_list_devices(conn, options): def main(): device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug", "action", "ipaddr", "login", "passwd", "passwd_script", - "cmd_prompt", "secure", "drac_version", "module_name", + "cmd_prompt", "secure", "identity_file", "drac_version", "module_name", "separator", "inet4_only", "inet6_only", "ipport", "power_timeout", "shell_timeout", "login_timeout", "power_wait" ] diff --git a/fence/agents/ilo_mp/fence_ilo_mp.py b/fence/agents/ilo_mp/fence_ilo_mp.py index 3aac36d..c3b2219 100644 --- a/fence/agents/ilo_mp/fence_ilo_mp.py +++ b/fence/agents/ilo_mp/fence_ilo_mp.py @@ -46,7 +46,7 @@ def set_power_status(conn, options): def main(): device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug", "action", "ipaddr", "login", "passwd", "passwd_script", - "secure", "cmd_prompt", "ipport", "login_eol_lf", + "secure", "identity_file", "cmd_prompt", "ipport", "login_eol_lf", "separator", "inet4_only", "inet6_only", "power_timeout", "shell_timeout", "login_timeout", "power_wait" ] diff --git a/fence/agents/lpar/fence_lpar.py b/fence/agents/lpar/fence_lpar.py index dd01b50..444cacf 100644 --- a/fence/agents/lpar/fence_lpar.py +++ b/fence/agents/lpar/fence_lpar.py @@ -132,7 +132,7 @@ def get_lpar_list(conn, options): def main(): device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug", "action", "ipaddr", "login", "passwd", "passwd_script", - "secure", "partition", "managed", "hmc_version", "cmd_prompt", + "secure", "identity_file", "partition", "managed", "hmc_version", "cmd_prompt", "separator", "inet4_only", "inet6_only", "ipport", "power_timeout", "shell_timeout", "login_timeout", "power_wait" ] diff --git a/fence/agents/rsa/fence_rsa.py b/fence/agents/rsa/fence_rsa.py index 583a84a..415df52 100644 --- a/fence/agents/rsa/fence_rsa.py +++ b/fence/agents/rsa/fence_rsa.py @@ -40,7 +40,7 @@ def set_power_status(conn, options): def main(): device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug", "action", "ipaddr", "login", "passwd", "passwd_script", - "cmd_prompt", "secure", "ipport", + "cmd_prompt", "secure", "identity_file", "ipport", "power_timeout", "shell_timeout", "login_timeout", "power_wait" ] atexit.register(atexit_handler) diff --git a/fence/agents/vmware/fence_vmware.py b/fence/agents/vmware/fence_vmware.py index b7a8eeb..b91a265 100644 --- a/fence/agents/vmware/fence_vmware.py +++ b/fence/agents/vmware/fence_vmware.py @@ -287,7 +287,7 @@ def main(): device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug", "action", "ipaddr", "login", "passwd", "passwd_script", "test", "port", "separator", "exec", "vmware_type", - "vmware_datacenter", "secure", + "vmware_datacenter", "secure", "identity_file", "power_timeout", "shell_timeout", "login_timeout", "power_wait" ] atexit.register(atexit_handler) diff --git a/fence/agents/wti/fence_wti.py b/fence/agents/wti/fence_wti.py index f5eb169..3ece06e 100644 --- a/fence/agents/wti/fence_wti.py +++ b/fence/agents/wti/fence_wti.py @@ -75,7 +75,7 @@ def set_power_status(conn, options): def main(): device_opt = [ "help", "version", "agent", "quiet", "verbose", "debug", "action", "ipaddr", "login", "passwd", "passwd_script", - "cmd_prompt", "secure", "port", "no_login", "no_password", + "cmd_prompt", "secure", "identity_file", "port", "no_login", "no_password", "test", "separator", "inet4_only", "inet6_only", "ipport", "power_timeout", "shell_timeout", "login_timeout", "power_wait" ]
1
0
0
0
← Newer
1
2
3
4
...
14
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Results per page:
10
25
50
100
200