[acassen/keepalived] 17686e: parser: do not exit when glob() doesn't match any ...

pqarmitage <[email protected]> Fri, 06 Oct 2017 14:46:05 -0700
Newsgroups gmane.linux.keepalived.devel
Message-ID <59d7f99d75fbf_6ae43f96b01cdc3013862a@hookshot-fe-92cdb05.cp1-iad.github.net.mail>
  Branch: refs/heads/master
  Home:   https://github.com/acassen/keepalived
  Commit: 17686eecfef274d215f180a8445939623696431a
      https://github.com/acassen/keepalived/commit/17686eecfef274d215f180a8445939623696431a
  Author: Apollon Oikonomopoulos <[email protected]>
  Date:   2017-10-03 (Tue, 03 Oct 2017)

  Changed paths:
    M lib/parser.c

  Log Message:
  -----------
  parser: do not exit when glob() doesn't match any files

Commit 3455c4a9 changed read_conf_file()'s behaviour to exit when glob()
returned non-success. Calling exit(3) from within a utility function
like read_conf_file causes a number of issues:

 - Keepalived will refuse to start when used together with `include` to
   modularize configuration (e.g. include
   /etc/keepalived/puppet.d/*.conf which may be empty).
 - It also causes the main process to exit uncleanly during reloads,
   leaving orphan child processes around. This issue is serious, as it
   leaves keepalived in a crippled state; subsequent attempts to restart
   the keepalived service without manually killing the VRRP/healthcheck
   children first will fail.

The original commit message makes it clear that this is about the main
configuration file, which is essential indeed. However, the presence of
the main config file is also checked and handled by check_conf_file() on
startup.

Revert to the previous behavior by having read_conf_file() log glob()
failures and skip using the glob buffer. For more fine-grained control
of file read failures, the signature of read_conf_file() should be
changed to return a value that can be used to check for and handle
errors.


  Commit: b7df9594e68c90e77dbb22e112f5bf4f0aaa277d
      https://github.com/acassen/keepalived/commit/b7df9594e68c90e77dbb22e112f5bf4f0aaa277d
  Author: pqarmitage <[email protected]>
  Date:   2017-10-06 (Fri, 06 Oct 2017)

  Changed paths:
    M lib/parser.c

  Log Message:
  -----------
  Merge pull request #659 from apoikos/fix/no-exit-on-glob-failures

parser: do not exit when glob() doesn't match any files


Compare: https://github.com/acassen/keepalived/compare/a1c71f13a88c...b7df9594e68c

------------------------------------------------------------------------------
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