Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 930525 Details for
Bug 614122
[RFE] port qdisk as corosync votequorum external quorum device
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
testvotequorum2: Opt for polling with old ringid
tmp.XjiLtd3afk (text/plain), 3.03 KB, created by
Jan Friesse
on 2014-08-25 14:39:45 UTC
(
hide
)
Description:
testvotequorum2: Opt for polling with old ringid
Filename:
MIME Type:
Creator:
Jan Friesse
Created:
2014-08-25 14:39:45 UTC
Size:
3.03 KB
patch
obsolete
>From f8413350b2df4e37822e6d34e9337da87993d271 Mon Sep 17 00:00:00 2001 >From: Jan Friesse <jfriesse@redhat.com> >Date: Mon, 4 Aug 2014 16:19:00 +0200 >Subject: [PATCH] testvotequorum2: Opt for polling with old ringid > >Option -F is added to force sending old ringid for given number of >times. Option is useful for testing failure scenario during corosync >synchronization phase. > >Signed-off-by: Jan Friesse <jfriesse@redhat.com> >Reviewed-by: Christine Caulfield <ccaulfie@redhat.com> >--- > test/testvotequorum2.c | 24 +++++++++++++++++++++--- > 1 files changed, 21 insertions(+), 3 deletions(-) > >diff --git a/test/testvotequorum2.c b/test/testvotequorum2.c >index f545070..0a2e926 100644 >--- a/test/testvotequorum2.c >+++ b/test/testvotequorum2.c >@@ -47,6 +47,8 @@ > static votequorum_handle_t handle; > > static votequorum_ring_id_t last_received_ring_id; >+static votequorum_ring_id_t ring_id_to_send; >+static int no_sent_old_ringid = 0; > > static int print_info(int ok_to_fail) > { >@@ -88,11 +90,13 @@ static void votequorum_notification_fn( > printf("\n"); > > memcpy(&last_received_ring_id, &ring_id, sizeof(ring_id)); >+ no_sent_old_ringid = 0; > } > > static void usage(const char *command) > { >- printf("%s [-p <num>] [-t <time>] [-n <name>] [-c] [-m]\n", command); >+ printf("%s [-F <num>] [-p <num>] [-t <time>] [-n <name>] [-c] [-m]\n", command); >+ printf(" -F <num> Number of times to send old ringid before actual ringid is sent (for testing, default = 0)\n"); > printf(" -p <num> Number of times to poll qdevice (default 0=infinte)\n"); > printf(" -t <secs> Time (in seconds) to wait between polls (default=1)\n"); > printf(" -n <name> Name of quorum device (default QDEVICE)\n"); >@@ -107,11 +111,12 @@ int main(int argc, char *argv[]) > int ret = 0; > int cast_vote = 1, master_wins = 0; > int pollcount=0, polltime=1, quiet=0, once=0; >+ int send_old_ringid = 0; > int err; > int opt; > votequorum_callbacks_t callbacks; > const char *devicename = "QDEVICE"; >- const char *options = "n:p:t:cmq1h"; >+ const char *options = "F:n:p:t:cmq1h"; > > memset(&callbacks, 0, sizeof(callbacks)); > callbacks.votequorum_notify_fn = votequorum_notification_fn; >@@ -130,6 +135,9 @@ int main(int argc, char *argv[]) > case 'q': > quiet = 1; > break; >+ case 'F': >+ send_old_ringid = atoi(optarg)+1; >+ break; > case 'p': > pollcount = atoi(optarg)+1; > break; >@@ -191,7 +199,17 @@ int main(int argc, char *argv[]) > } > > if (!quiet) print_info(0); >- if ((err=votequorum_qdevice_poll(handle, devicename, cast_vote, last_received_ring_id)) != CS_OK && >+ >+ if (no_sent_old_ringid + 1 >= send_old_ringid) { >+ /* >+ * Finally send correct ringid >+ */ >+ memcpy(&ring_id_to_send, &last_received_ring_id, sizeof(ring_id_to_send)); >+ } else { >+ no_sent_old_ringid++; >+ } >+ >+ if ((err=votequorum_qdevice_poll(handle, devicename, cast_vote, ring_id_to_send)) != CS_OK && > err != CS_ERR_MESSAGE_ERROR) { > fprintf(stderr, "qdevice poll FAILED: %d\n", err); > ret = -1; >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 614122
:
930521
|
930522
|
930523
|
930524
|
930525
|
930526
|
1205194