[acassen/keepalived] eacec9: Improve and fix use of getopt_long()

pqarmitage <[email protected]> Thu, 04 Jan 2018 01:13:36 -0800
Newsgroups gmane.linux.keepalived.devel
Message-ID <5a4df04028f15_25cf2b0a70bd1c0826297@hookshot-fe-6b2eebc.cp1-iad.github.net.mail>
  Branch: refs/heads/master
  Home:   https://github.com/acassen/keepalived
  Commit: eacec9f7588b64a12ff77c0b484821d2fc87a52c
      https://github.com/acassen/keepalived/commit/eacec9f7588b64a12ff77c0b484821d2fc87a52c
  Author: Quentin Armitage <[email protected]>
  Date:   2017-12-31 (Sun, 31 Dec 2017)

  Changed paths:
    M keepalived/core/main.c

  Log Message:
  -----------
  Improve and fix use of getopt_long()

We musn't use a long option val of 1, since getopt_long() can return
that value.

getopt_long() also returns longindex == 0 when there is no matching
long option, and there needs to be careful checking if there is an
error to work out whether a long or short option was used, which is
needed for meaningful error messages.

Signed-off-by: Quentin Armitage <[email protected]>


  Commit: 36a6735865c291436314d34f4f6081e90e084de3
      https://github.com/acassen/keepalived/commit/36a6735865c291436314d34f4f6081e90e084de3
  Author: Quentin Armitage <[email protected]>
  Date:   2018-01-01 (Mon, 01 Jan 2018)

  Changed paths:
    M keepalived/core/main.c

  Log Message:
  -----------
  Fix commit eacec9f7 - Improve and fix use of getopt_long()

It seems some compilations would cause a segfault, and others wouldn't,
although the code was certainly wrong.

Signed-off-by: Quentin Armitage <[email protected]>


  Commit: 92b87dcbf521103233ff324e382069040fea69a5
      https://github.com/acassen/keepalived/commit/92b87dcbf521103233ff324e382069040fea69a5
  Author: Quentin Armitage <[email protected]>
  Date:   2018-01-03 (Wed, 03 Jan 2018)

  Changed paths:
    M lib/Makefile.am
    M lib/Makefile.in
    A lib/assert.c

  Log Message:
  -----------
  Write assert() messages to syslog

assert()s are nasty things, but at least let's get the benefit of
them, and write the messages to syslog, rather than losing them down
stderr.

Signed-off-by: Quentin Armitage <[email protected]>


  Commit: dce75b8bd75897ab805eef7a70cc8bd692308dc6
      https://github.com/acassen/keepalived/commit/dce75b8bd75897ab805eef7a70cc8bd692308dc6
  Author: Quentin Armitage <[email protected]>
  Date:   2018-01-04 (Thu, 04 Jan 2018)

  Changed paths:
    M keepalived/check/ipwrapper.c

  Log Message:
  -----------
  Enable sorry server at startup if quorum down due to alpha mode

If alpha mode is configured on sufficient checkers so that a
virtual server doesn't have a quorum, we need to add the sorry
server at startup, otherwise it won't be added until a quorum has
been achieved and subsequently lost again. In the case where some
of the checkers remain in the down state at startup, this would have
meant that the sorry server never got added.

Signed-off-by: Quentin Armitage <[email protected]>


  Commit: 1b6597f724539d937e536861cbf2d10fbc0cfd05
      https://github.com/acassen/keepalived/commit/1b6597f724539d937e536861cbf2d10fbc0cfd05
  Author: pqarmitage <[email protected]>
  Date:   2018-01-04 (Thu, 04 Jan 2018)

  Changed paths:
    M keepalived/check/ipwrapper.c
    M keepalived/core/main.c
    M lib/Makefile.am
    M lib/Makefile.in
    A lib/assert.c

  Log Message:
  -----------
  Merge pull request #736 from pqarmitage/fixes

Enable sorry server at startup if needed, and minor improvements


Compare: https://github.com/acassen/keepalived/compare/5df908938bbb...1b6597f72453

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel