Jan Friesse [Tue, 19 Mar 2019 14:16:11 +0000 (15:16 +0100)]
qnetd: Check existence of NSS DB dir before fork
Previously, when user tried start corosync-qnetd without
initialized NSS database then generic (not very helpful
and misleading) NSS error was logged
"NSS error (-8015): The certificate/key database is in an old,
unsupported format.".
Solution is to check if it's possible to open NSS DB directory and
display (usually much more informative) result of strerror function.
Such check is called before fork, so init system can return error code
during start.
Signed-off-by: Jan Friesse <jfriesse@redhat.com> Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Jan Friesse [Wed, 14 Nov 2018 16:52:11 +0000 (17:52 +0100)]
init: Fix init scripts to work with containers
Previously init scripts were not using pid file so pidof was used. This
is usually not a problem, but when containers are used it may result to
killing improper instance when issued on host.
Solution is to always use pidfile.
Also try to use LSB complaint status codes.
Signed-off-by: Jan Friesse <jfriesse@redhat.com> Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Jan Friesse [Wed, 7 Nov 2018 14:16:13 +0000 (09:16 -0500)]
configure: move to AC_COMPILE_IFELSE
from AC_PREPROC_IFELSE which is strongly discouraged.
Our detection system was very weak and recent versions of clang did
show that PREPROC_IFELFE (cpp) would enable warning options that
the compiler does not support (clang).
Use a full compilation test to detect what works and what doesn't.
Jan Friesse [Mon, 3 Sep 2018 15:01:21 +0000 (17:01 +0200)]
build: Support for git archive stored tags
Attempt to solve problem with git archive generated tarballs
(used for example by github when release is downloaded) which are no
longer git tree and (in contrast to officially released tarballs) also
doesn't contain .tarball-version file so git-version-gen script simply
cannot obtain valid version info.
Solution is based on using gitattributes which is instructs git to
replace string in the .gitarchivever file by known ref names.
git-version-gen is enhanced to support this file and tries to parse
any string which looks like "tag: v[0-9]+.[0-9]+.[0-9]". If such string
is found it's used as a version. This file is used as a last attempt and
other methods (.tarball-version, git abbrev) have precedence.
Based on idea stated by Jan Pokorný <jpokorny@redhat.com>.
Signed-off-by: Jan Friesse <jfriesse@redhat.com> Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Jan Friesse [Mon, 27 Aug 2018 15:07:53 +0000 (17:07 +0200)]
qdevice: Propagate error to exit code
Net model never returned error when qdevice_model_run was called. This
was incorrect because with exception of local ipc close all other
disconnect reasons are errors.
Solution is to return proper error code.
Also instead of exit right after qdevice_model_run it's better to store
result value, try clean resources and use stored value to return correct
exit code.
Jan Friesse [Tue, 21 Aug 2018 08:01:26 +0000 (10:01 +0200)]
init: disable stderr output in systemd unit file
Usually both syslog and stderr are enabled so log entries are duplicated
in journal. Solution is to use similar patch as corosync c34208ad402b45f52b5d3ee8d2a08df0779ec9aa and disable stderr.
Jan Friesse [Wed, 8 Aug 2018 13:20:02 +0000 (09:20 -0400)]
qdevice-net-certutil: Implement scp wrapper
Standard scp doesn't handle copy of file from remote machine to remote
machine very well when agent forwarding is used and no key exists
between the machines.