Hello community, here is the log from the commit of package booth for openSUSE:Factory checked in at 2016-01-21 23:44:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/booth (Old) and /work/SRC/openSUSE:Factory/.booth.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "booth" Changes: -------- --- /work/SRC/openSUSE:Factory/booth/booth.changes 2015-12-09 22:13:08.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.booth.new/booth.changes 2016-01-22 01:09:43.000000000 +0100 @@ -1,0 +2,7 @@ +Tue Jan 12 14:00:41 UTC 2016 - dmuhameda...@suse.com + +- Update to release candidate v1.0 rc1 + + main: prevent segfault on no arguments + + ticket: term 0 is a valid term (bsc#952426) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ booth.spec ++++++ --- /var/tmp/diff_new_pack.VY4M2y/_old 2016-01-22 01:09:45.000000000 +0100 +++ /var/tmp/diff_new_pack.VY4M2y/_new 2016-01-22 01:09:45.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package booth # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -45,8 +45,8 @@ Summary: Ticket Manager for Multi-site Clusters License: GPL-2.0+ Group: %{pkg_group} -Version: 0.2.0 -Release: 0 +Version: 1.0 +Release: 0rc1 Source: booth.tar.bz2 Source1: %name-rpmlintrc BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ booth.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/.git_info new/booth/.git_info --- old/booth/.git_info 2015-12-03 11:52:44.000000000 +0100 +++ new/booth/.git_info 2016-01-12 15:03:32.000000000 +0100 @@ -1 +1 @@ -v0.2.0-130-g9c5c19f +v1.0rc1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/ChangeLog new/booth/ChangeLog --- old/booth/ChangeLog 1970-01-01 01:00:00.000000000 +0100 +++ new/booth/ChangeLog 2016-01-12 11:50:01.000000000 +0100 @@ -0,0 +1,39 @@ +* Mon Jan 11 2016 Dejan Muhamedagic <dmuhameda...@suse.com> and others +- release candidate 1.0 rc1 +- main: prevent segfault on no arguments +- ticket: term 0 is a valid term (bsc#952426) +- main: add 'other' as possible site reference +- arbitrator: mark expired tickets as lost (bsc#956321) +- geo attributes support +- booth-keygen: key generate auxiliary program +- ticket: prevent running external program twice +- ticket: make sure that we're the leader if granting ticket (bsc#940037) +- docs: add booth processing FSM dot graphs +- main: add booth peers command +- main: don't allow zero poll timeout (bsc#938820) +- pcmk: don't log error when ticket not in CIB +- client: fix memory leak in ticket list +- client: fix memory growing indefinitely on new client connect +- extprog: ignore running external program on revoke +- client: make sure that the client is still there to be notified +- client: don't allow SIGPIPE to kill the server (if the client leaves too early) +- extprog: preserve child exit status +- extprog: run programs asynchronously +- clients: fix memory leak when removing client +- transport: use non-blocking read +- hmac based authentication support +- ticket: ignore late MY_INDEX requests +- contrib: add geo-cluster.fwd (suse firewall rules) +- ticket: restart elections after last candidate disappears +- ticket: add -C option (wait for commit) +- raft: handle duplicate ticket release requests +- booth-site: exit early in start if daemon cannot start +- raft: ignore messages with invalid term (lower than already committed) +- raft: better control of term increment +- ticket: allow finer resolution time in messages +- use subsecond timers internally +- booth-arbitrator: fix exit codes for all actions +- booth-arbitrator: set the right LSB exit code in status +- booth-arbitrator: fix stop exit code (bnc#914306) +- booth-arbitrator: update exit codes +- main: use /proc/self/oom_score_adj instead of oom_adj (bnc#914037) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/booth.spec new/booth/booth.spec --- old/booth/booth.spec 2015-12-03 11:52:35.000000000 +0100 +++ new/booth/booth.spec 2016-01-12 11:50:01.000000000 +0100 @@ -28,8 +28,8 @@ Summary: Ticket Manager for Multi-site Clusters License: GPL-2.0+ Group: %{pkg_group} -Version: 0.2.0 -Release: 0 +Version: 1.0 +Release: rc1 Source: booth.tar.bz2 Source1: %name-rpmlintrc BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/configure.ac new/booth/configure.ac --- old/booth/configure.ac 2015-12-03 11:52:35.000000000 +0100 +++ new/booth/configure.ac 2016-01-12 11:50:01.000000000 +0100 @@ -4,7 +4,7 @@ # bootstrap / init AC_PREREQ([2.61]) -AC_INIT([booth], [0.2.0], [us...@clusterlabs.org]) +AC_INIT([booth], [1.0-0-rc1], [us...@clusterlabs.org]) AM_INIT_AUTOMAKE([-Wno-portability]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/config.c new/booth/src/config.c --- old/booth/src/config.c 2015-12-03 11:52:35.000000000 +0100 +++ new/booth/src/config.c 2016-01-12 11:50:01.000000000 +0100 @@ -211,13 +211,6 @@ tk = booth_conf->ticket + booth_conf->ticket_count; booth_conf->ticket_count++; - tk->last_valid_tk = malloc(sizeof(struct ticket_config)); - if (!tk->last_valid_tk) { - log_error("out of memory"); - return -ENOMEM; - } - memset(tk->last_valid_tk, 0, sizeof(struct ticket_config)); - if (!check_max_len_valid(name, sizeof(tk->name))) { log_error("ticket name \"%s\" too long.", name); return -EINVAL; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/inline-fn.h new/booth/src/inline-fn.h --- old/booth/src/inline-fn.h 2015-12-03 11:52:35.000000000 +0100 +++ new/booth/src/inline-fn.h 2016-01-12 11:50:01.000000000 +0100 @@ -115,7 +115,7 @@ } #define my_last_term(tk) \ - (((tk)->state == ST_CANDIDATE && (tk)->last_valid_tk->current_term) ? \ + (((tk)->state == ST_CANDIDATE && (tk)->last_valid_tk) ? \ (tk)->last_valid_tk->current_term : (tk)->current_term) extern int TIME_RES, TIME_MULT; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/main.c new/booth/src/main.c --- old/booth/src/main.c 2015-12-03 11:52:35.000000000 +0100 +++ new/booth/src/main.c 2016-01-12 11:50:01.000000000 +0100 @@ -1001,16 +1001,16 @@ op = argv[1]; optind = 2; opt_string = ATTR_OPTION_STRING; - } else if (strcmp(arg1, "arbitrator") == 0 || + } else if (argc > 1 && (strcmp(arg1, "arbitrator") == 0 || strcmp(arg1, "site") == 0 || strcmp(arg1, "start") == 0 || - strcmp(arg1, "daemon") == 0) { + strcmp(arg1, "daemon") == 0)) { cl.type = DAEMON; optind = 2; - } else if (strcmp(arg1, "status") == 0) { + } else if (argc > 1 && (strcmp(arg1, "status") == 0)) { cl.type = STATUS; optind = 2; - } else if (strcmp(arg1, "client") == 0) { + } else if (argc > 1 && (strcmp(arg1, "client") == 0)) { cl.type = CLIENT; if (argc < 3) { print_usage(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/raft.c new/booth/src/raft.c --- old/booth/src/raft.c 2015-12-03 11:52:35.000000000 +0100 +++ new/booth/src/raft.c 2016-01-12 11:50:01.000000000 +0100 @@ -284,8 +284,7 @@ /* ยง5.1 */ if (is_term_invalid(tk, term)) { tk_log_info("got invalid term from %s " - "(%d vs. %d), ignoring", site_string(sender), - term, tk->last_valid_tk->current_term); + "(%d), ignoring", site_string(sender), term); return 1; } @@ -771,7 +770,7 @@ * valid or if there was a tie (in that case update_term > 1) */ if ((update_term > 1) || - (update_term && tk->last_valid_tk->current_term && + (update_term && tk->last_valid_tk && tk->last_valid_tk->current_term >= tk->current_term)) { /* save the previous term, we may need to send out the * MY_INDEX message */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/ticket.c new/booth/src/ticket.c --- old/booth/src/ticket.c 2015-12-03 11:52:35.000000000 +0100 +++ new/booth/src/ticket.c 2016-01-12 11:50:01.000000000 +0100 @@ -161,6 +161,19 @@ } +void save_committed_tkt(struct ticket_config *tk) +{ + if (!tk->last_valid_tk) { + tk->last_valid_tk = malloc(sizeof(struct ticket_config)); + if (!tk->last_valid_tk) { + log_error("out of memory"); + return; + } + } + memcpy(tk->last_valid_tk, tk, sizeof(struct ticket_config)); +} + + static void ext_prog_failed(struct ticket_config *tk, int start_election) { @@ -1294,19 +1307,22 @@ int send_msg ( int cmd, - struct ticket_config *current_tk, + struct ticket_config *tk, struct booth_site *dest, struct boothc_ticket_msg *in_msg ) { int req = 0; - struct ticket_config *tk = current_tk; + struct ticket_config *valid_tk = tk; struct boothc_ticket_msg msg; + /* if we want to send the last valid ticket, then if we're in + * the ST_CANDIDATE state, the last valid ticket is in + * tk->last_valid_tk + */ if (cmd == OP_MY_INDEX) { - if (current_tk->state == ST_CANDIDATE && - current_tk->last_valid_tk->current_term) { - tk = current_tk->last_valid_tk; + if (tk->state == ST_CANDIDATE && tk->last_valid_tk) { + valid_tk = tk->last_valid_tk; } tk_log_info("sending status to %s", site_string(dest)); @@ -1315,6 +1331,6 @@ if (in_msg) req = ntohl(in_msg->header.cmd); - init_ticket_msg(&msg, cmd, req, RLT_SUCCESS, 0, tk); + init_ticket_msg(&msg, cmd, req, RLT_SUCCESS, 0, valid_tk); return booth_udp_send_auth(dest, &msg, sendmsglen(&msg)); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/src/ticket.h new/booth/src/ticket.h --- old/booth/src/ticket.h 2015-12-03 11:52:35.000000000 +0100 +++ new/booth/src/ticket.h 2016-01-12 11:50:01.000000000 +0100 @@ -55,13 +55,10 @@ tk->next_state = newst; \ } while(0) -#define save_committed_tkt(tk) \ - memcpy((tk)->last_valid_tk, tk, sizeof(struct ticket_config)) - #define is_term_invalid(tk, term) \ - (tk->last_valid_tk->current_term && \ - tk->last_valid_tk->current_term > term) + ((tk)->last_valid_tk && (tk)->last_valid_tk->current_term > (term)) +void save_committed_tkt(struct ticket_config *tk); void disown_ticket(struct ticket_config *tk); int disown_if_expired(struct ticket_config *tk); int check_ticket(char *ticket, struct ticket_config **tc); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/booth/test/live_test.sh new/booth/test/live_test.sh --- old/booth/test/live_test.sh 2015-12-03 11:52:35.000000000 +0100 +++ new/booth/test/live_test.sh 2016-01-12 11:50:01.000000000 +0100 @@ -664,6 +664,7 @@ local rc booth_status dep_rsc_status local start_time end_time local usrmsg + rc=0 TEST=$1 start_time=`date` start_ts=`date +%s`