When daemonization is used, heuristics worker is not a child of
the corosync-qdevice process any longer so it's not possible
to wait for its exit.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
configure.ac adds by optimization and debug flags by default. This is
not always intended so conifgure option is added.
Support for using this option in specfile is added too.
Also fix GDB_CFLAGS typo. GDB_FLAGS (without C)
is the correct name of variable to print in the summary.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
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>
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>
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.
Based on knet patch 88491f27375a9e8aceb946853a1abf4d23ebb8f3.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
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>
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.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
OpenSUSE does not ship docs in the normal dir and their rpm macro
does not appear to set it for us.
Based on corosync 30c7f3319f003efa1abeb2173eef9e5c7943ae5b.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
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.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
This is not needed at least for cert8 -> cert9, but it's still nice to
have it documented. Also document NSS_IGNORE_SYSTEM_POLICY=1 workaround.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
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.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
New NSS database uses files cert9.db, key4.db and pkcs11.txt. Add
support for these files into cert utilities.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Previously there was no waiting for establish of bash trap.
This may result in situation when sigint/term was send before trap
making test fail.
Solution is to catch the sigusr1 and sigusr2 signals in tests and wait
till these signals are sent by bash after trap is established.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Blocking version of send was used in the very early phases of qdevice
development and it's not used any longer, so it make sense to delete
it.
Signed-off-by: Jan Friesse <jfriesse@redhat.com>