]> git.proxmox.com Git - mirror_corosync.git/log
mirror_corosync.git
3 years agototemconfig: Do not process totem.nodeid
Jan Friesse [Fri, 30 Jul 2021 12:40:15 +0000 (14:40 +0200)]
totemconfig: Do not process totem.nodeid

totem.nodeid is relict from times when nodelist was not required and
totemsrp was sending whole membership with ip addresses.

With Corosync 3 ip addresses are no longer sent so
it is not possible to find "next" node ip address where to send token
(because only nodeid is sent) without having information about all of
the nodes stored locally.

When totem.nodeid was configured it was partly used and other parts
(most notably totemudpu_token_target_set) were using autogenerated
nodeid. Together it was not possible to create even single node
membership.

Solution is to ignore totem.nodeid completely (and display warning when
it is set).

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
3 years agoknet: Fix node status display
Christine Caulfield [Wed, 28 Jul 2021 13:25:42 +0000 (14:25 +0100)]
knet: Fix node status display

Currently if there is a gap in the links (eg link0 is missing)
corosync-cfgtool -s will still display the links as 0,1,2,3...
even if they are 1,2,5,6...

Also display the KNET transport type with the link in
corosync-cfgtool -s & -n

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
3 years agomain: Add support for cgroup v2 and auto mode
Jan Friesse [Mon, 3 May 2021 13:29:04 +0000 (15:29 +0200)]
main: Add support for cgroup v2 and auto mode

Support for cgroup v2 is very similar to cgroup v1 just checking (and
writing) different file.

Because of all the problems described later with cgroup v2 new "auto"
mode (new default) is added. This mode first tries to set rr scheduling
and moves Corosync to root cgroup only if it fails.

Testing this feature is a bit harder than with cgroup v1 so it's
probably worh noting in this commit message.

1. Copy some service file (I've used httpd service) and set
   CPUQuota=30% in the [service] section.
2. Check /sys/fs/cgroup/cgroup.subtree_control - there should be no
   "cpu"
3. Start modified service
4. Check /sys/fs/cgroup/cgroup.subtree_control - there should be "cpu"
5. Start corosync - It should be able to get rt priority

When move_to_root_cgroup is disabled (applies only for kernels
with CONFIG_RT_GROUP_SCHED enabled), behavior differs:
- If corosync is started before modified service, so
  there is no "cpu" in /sys/fs/cgroup/cgroup.subtree_control
  corosync starts without problem and gets rt priority.
  Starting modified service later will never add "cpu" into
  /sys/fs/cgroup/cgroup.subtree_control (because corosync is holding
  rt priority and it is placed in the non-root cgroup by systemd).

- When corosync is started after modified service, so "cpu"
  is in /sys/fs/cgroup/cgroup.subtree_control, corosync is not
  able to get RT priority.

It's worth noting problems when cgroup v2 is used together with systemd
logging described in corosync.conf(5) man page.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
3 years agostats: fix crash when iterating over deleted keys
Christine Caulfield [Thu, 3 Jun 2021 06:53:28 +0000 (07:53 +0100)]
stats: fix crash when iterating over deleted keys

The libqb map API leaves 'ownership' of the data with the caller
but does its own lifetime management, so it can easily happen that
map_rm() is called and the data deleted by the caller.
But if an iterator is running over that item then the map entry
will not get removed (leaving dangling pointers) until later.

libqb has a hack-y callback that tells the owner when it is safe to
delete the allocated memory, so we hook into that. icmap is already
using this.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
3 years agoman: Add note about single node configuration
Jan Friesse [Wed, 2 Jun 2021 10:29:31 +0000 (12:29 +0200)]
man: Add note about single node configuration

Internally knet is using just one link for localhost so for single node
configuration knet_link_get_link_list returns only one entry. This is
propagated to `corosync-cfgtool -s`.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
3 years agoRevert "main: Add support for cgroup v2"
Jan Friesse [Fri, 21 May 2021 06:38:17 +0000 (08:38 +0200)]
Revert "main: Add support for cgroup v2"

This reverts commit 57e6b86b53010dd2612b0a6a4e04917673062ecf.

We are in process of finding better solution so reverting for now.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
3 years agoRevert "man: Add info about cgroup v2 behavior"
Jan Friesse [Fri, 21 May 2021 06:37:16 +0000 (08:37 +0200)]
Revert "man: Add info about cgroup v2 behavior"

This reverts commit 9d3df5696ed6b04b379a2fe643eec1fcd5a4b10d.

We are in process of finding better solution so reverting for now.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
3 years agoman: Add info about cgroup v2 behavior
Jan Friesse [Tue, 18 May 2021 08:43:37 +0000 (10:43 +0200)]
man: Add info about cgroup v2 behavior

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
3 years agocfg: corosync_cfg_trackstop blocks forever
Jan Friesse [Tue, 18 May 2021 16:12:49 +0000 (18:12 +0200)]
cfg: corosync_cfg_trackstop blocks forever

corosync_cfg_trackstop expects reply but that was never sent. Make sure
to send reply so corosync_cfg_trackstop works.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
3 years agomain: Add support for cgroup v2
Jan Friesse [Mon, 3 May 2021 13:29:04 +0000 (15:29 +0200)]
main: Add support for cgroup v2

Support for cgroup v2 is very similar to cgroup v1 just checking (and
writing) different file.

Testing this feature is a bit harder than with cgroup v1 so it's
probably worh noting in this commit message.

1. Copy some service file (I've used httpd service) and set
   CPUQuota=30% in the [service] section.
2. Check /sys/fs/cgroup/cgroup.subtree_control - there should be no
   "cpu"
3. Start modified service
4. Check /sys/fs/cgroup/cgroup.subtree_control - there should be "cpu"
5. Start corosync - It should be able to get rt priority

When move_to_root_cgroup is disabled, behavior differs:
- If corosync is started before modified service, so
  there is no "cpu" in /sys/fs/cgroup/cgroup.subtree_control
  corosync starts without problem and gets rt priority.
  Starting modified service later will never add "cpu" into
  /sys/fs/cgroup/cgroup.subtree_control (because corosync is holding
  rt priority and it is placed in the non-root cgroup by systemd).

- When corosync is started after modified service, so "cpu"
  is in /sys/fs/cgroup/cgroup.subtree_control, corosync is not
  able to get RT priority.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
3 years agomain: Mark crypto_model key read only
Jan Friesse [Fri, 9 Apr 2021 11:06:40 +0000 (13:06 +0200)]
main: Mark crypto_model key read only

... to be in align with crypto_cypher and crypto_hash.

Reload (corosync-cfgtool -R) works without any problem and changing of
key is not supported anyway,

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
3 years agototemconfig: Ensure strncpy is always terminated
Jan Friesse [Fri, 9 Apr 2021 10:58:56 +0000 (12:58 +0200)]
totemconfig: Ensure strncpy is always terminated

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
3 years agoconfig: Properly check crypto and compress models
Jan Friesse [Fri, 9 Apr 2021 10:21:15 +0000 (12:21 +0200)]
config: Properly check crypto and compress models

Use knet_get_crypto_list to find knet supported crypto models and use
them instead of hardcoded list.

Also fix compression handling. Previously knet_compression_model
value was not checked at all and was directly passed to knet.

Use knet_get_compress_list to find knet supported compress models and
use them to check validity of config file and for more informative
error message.

Lastly enhance corosync version display with information
about available crypto/compression models.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
3 years agoman: corosync-cfgtool.8: use proper single quotes
Ferenc Wágner [Sat, 3 Apr 2021 11:14:28 +0000 (13:14 +0200)]
man: corosync-cfgtool.8: use proper single quotes

Apostrophe as the first character of the input line indicates a
request, so groff complained: macro 'onwire'' not defined.

Signed-off-by: Ferenc Wágner <wferi@debian.org>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
3 years agoknet: pass correct handle to knet_handle_compress v3.1.2
Fabio M. Di Nitto [Sat, 3 Apr 2021 06:42:18 +0000 (08:42 +0200)]
knet: pass correct handle to knet_handle_compress

totemknet_configure_compression was using knet_context
just to gather the knet handle / instance.

On first time config knet_contex is not initialized till
much later in the code, passing some random garbage pointers
to knet_handle_compress, that would crash later trying
to acquire a mutex lock.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
3 years agototemconfig: fix integer underflow and logic bug v3.1.1
Johannes Krupp [Mon, 29 Mar 2021 09:00:25 +0000 (11:00 +0200)]
totemconfig: fix integer underflow and logic bug

Fix integer underflow when computing `namelen` in `nodelist_byname`,
always use computed `namelen`.
Fixes #626.

Signed-off-by: Johannes Krupp <johannes.krupp@cispa.saarland>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
3 years agototemconfig: change udp netmtu value as a constant
liangxin1300 [Mon, 15 Mar 2021 06:38:26 +0000 (14:38 +0800)]
totemconfig: change udp netmtu value as a constant

Insted of using "magic number" use UDP_NETMTU constant.

Signed-off-by: liangxin1300 <XLiang@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
3 years agototemknet: retry knet_handle_new if it fails
Dan Streetman [Fri, 12 Mar 2021 12:31:47 +0000 (07:31 -0500)]
totemknet: retry knet_handle_new if it fails

Retry knet_handle_new without privileged operations if it fails

knet_handle_new can fail with ENAMETOOLONG if its privileged operations
fail, which can happen if we're running as a user process or in an
unprivileged container.

This adds a cmap key 'allow_knet_handle_fallback' that defaults to no,
which is the current behavior of exiting with error if the knet_handle
can't be created with privileged operations. If the new cmap key is set
to 'yes' and the knet_handle creation fails, fallback to creating the
handle using unprivileged operations is tried.

Signed-off-by: Dan Streetman <ddstreet@canonical.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
3 years agomain: Check memlock rlimit
Dan Streetman [Wed, 10 Mar 2021 17:48:01 +0000 (12:48 -0500)]
main: Check memlock rlimit

Don't lock all current and future memory if can't
increase memlock rlimit.

If we fail to increase our RLIMIT_MEMLOCK, then locking all our current
and future memory is extremely dangerous; once our memory use reaches
our RLIMIT_MEMLOCK, memory allocations will start failing, very likely
leading to our entire process crashing.

This can happen if we aren't a privileged process, for example if
running as non-root user, or inside an unprivileged container.

Signed-off-by: Dan Streetman <ddstreet@canonical.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
3 years agoconfigure: drop unnecessary check and define
Fabio M. Di Nitto [Tue, 9 Mar 2021 10:07:03 +0000 (11:07 +0100)]
configure: drop unnecessary check and define

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
3 years agoconfigure: move exec_prefix sanitize
Fabio M. Di Nitto [Tue, 9 Mar 2021 10:04:30 +0000 (11:04 +0100)]
configure: move exec_prefix sanitize

Move exec_prefix sanitize closer to prefix. This is not
functional change, just group functional tests together.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
3 years agoconfigure: drop dead code
Fabio M. Di Nitto [Tue, 9 Mar 2021 10:03:04 +0000 (11:03 +0100)]
configure: drop dead code

prefix is sanitized already at the top of configure.ac to /usr,
hence the second instance can never hit.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
3 years agoconfigure: detect and init pkg-config with macro
Fabio M. Di Nitto [Tue, 9 Mar 2021 10:01:50 +0000 (11:01 +0100)]
configure: detect and init pkg-config with macro

this also allows to use PKG_CONFIG_* macros immediately
in conditional calls

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
3 years agomain: Close race condition when moving to statedir
Christine Caulfield [Wed, 3 Mar 2021 14:10:09 +0000 (14:10 +0000)]
main: Close race condition when moving to statedir

Found by covscan which also didn't like us 'leaking' the
fd to the lockfile. So close that too.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
3 years agoinit: Use corosync-cfgtool for shutdown
Jan Friesse [Thu, 14 Jan 2021 13:00:42 +0000 (14:00 +0100)]
init: Use corosync-cfgtool for shutdown

... to trigger cfg shutdown callbacks.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
3 years agotest: Add testcfg to exercise some cfg functions
Christine Caulfield [Wed, 13 Jan 2021 08:26:27 +0000 (08:26 +0000)]
test: Add testcfg to exercise some cfg functions

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
3 years agocfg: Reinstate cfg tracking
Christine Caulfield [Mon, 11 Jan 2021 09:28:34 +0000 (09:28 +0000)]
cfg: Reinstate cfg tracking

CFG tracking was removed in 815375411e80131f31b172d7c43625769ee8b53d,
probably as a mistake, as part of the tidy up of cfg and the removal of
dynamic loading. This means that shutdown tracking (using
cfg_try_shutdown()) stopped working.

This patch restores the trackstart & trackstop API calls (renamed to be
more consistent with the exiting libraries) so that shutdown tracking
can be used again.

Change cfg.shutdown_timeout to be in milliseconds rather than seconds
nd use libqb macros for conversion.

Add --force option to corosync-cfgtool -H

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
3 years agocfg: Improve nodestatusget versioning
Jan Friesse [Tue, 24 Nov 2020 11:20:25 +0000 (12:20 +0100)]
cfg: Improve nodestatusget versioning

Patch tries to make nodestatusget really extendable. Following changes
are implemented:
- corosync_cfg_node_status_version_t is added with (for now) single
  value CFG_NODE_STATUS_V1
- corosync_knet_node_status renamed to corosync_cfg_node_status_v1 (it
  isn't really knet because it works as well for udp(u()
- struct res_lib_cfg_nodestatusget_version is added which holds only ipc
  result header and version on same position as for
  corosync_cfg_node_status_v1
- corosync_cfg_node_status_get requires version and pointer to one of
  corosync_cfg_node_status_v structures
- request is handled in case switches to make adding new version easier

Also fix following bugs:
- totempg_nodestatus_get error was retyped to cs_error_t without any
  meaning.
- header.error was not checked at all in the library

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
3 years agocfg: New API to get extended node/link infomation
Christine Caulfield [Thu, 29 Oct 2020 11:07:48 +0000 (11:07 +0000)]
cfg: New API to get extended node/link infomation

Current we horribly over-use totempg_ifaces_get() to
retrieve information about knet interfaces. This is an attempt to
improve on that.

All transports are supported (so not only Knet but also UDP(U)).

This patch builds best against the "onwire-upgrade" branch of knet
as that's what sparked my interest in getting more information out.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
3 years agototemknet: Check both cipher and hash for crypto
Jan Friesse [Tue, 10 Nov 2020 17:10:17 +0000 (18:10 +0100)]
totemknet: Check both cipher and hash for crypto

Previously only crypto cipher was used as a way to find out if crypto is
enabled or disabled.

This usually works ok until cipher is set to none and hash to some other
value (like sha1). Such config is perfectly valid and it was not
supported correctly.

As a solution, check both cipher and hash.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
3 years agoThe ring id file needn't be executable
Ferenc Wágner [Sun, 8 Nov 2020 19:49:15 +0000 (20:49 +0100)]
The ring id file needn't be executable

At the same time simplify the overwrite logic and stop clearing the
umask (which is unexpected and quite pointless here, as applications
can't really protect the users from their own pathological settings).

Signed-off-by: Ferenc Wágner <wferi@debian.org>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
3 years agopkgconfig: export LOGDIR in corosync.pc
Fabio M. Di Nitto [Fri, 6 Nov 2020 04:12:19 +0000 (05:12 +0100)]
pkgconfig: export LOGDIR in corosync.pc

logdir is configurable at build time and can change
from distro to distro. Export the path for pcs to use.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
3 years agospec: Add isa version of corosync-devel provides
Jan Friesse [Mon, 2 Nov 2020 09:53:33 +0000 (10:53 +0100)]
spec: Add isa version of corosync-devel provides

Also add release to version to match autogenerated corosynclib-devel
provides.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
4 years agototemconfig: remove redundant nodeid error log v3.1.0
liangxin1300 [Sun, 18 Oct 2020 14:40:25 +0000 (22:40 +0800)]
totemconfig: remove redundant nodeid error log

Signed-off-by: liangxin1300 <XLiang@suse.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
4 years agototemsrp: More informative messages
Aleksei Burlakov [Tue, 13 Oct 2020 08:57:24 +0000 (10:57 +0200)]
totemsrp: More informative messages

... when token and consensus timeouts pop.

Signed-off-by: Aleksei Burlakov <aburlakov@suse.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agoconfig: Increase default token timeout to 3000 ms
Jan Friesse [Mon, 12 Oct 2020 12:26:10 +0000 (14:26 +0200)]
config: Increase default token timeout to 3000 ms

Default token timeout of 1000 ms was often changed by users because of
other workloads on machine which may make corosync responding a bit
later than needed and resulting in token loss.

3000 ms was chosen as a compromise between token timeout increase
and allow live cluster upgrade (other nodes should receive token
by node with new default on time).

It doesn't affect token token_coefficient so final token timeout still
depends on number of configured nodes (just base is higher).

This change slows down failover a bit so for clusters where failover
times are important, please change the token timeout in configuration
file corosync.conf as a:

totem {
    version: 2
    token: 1000
...

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
4 years agoman: votequorum.5: use proper single quotes
Ferenc Wágner [Wed, 30 Sep 2020 08:26:42 +0000 (10:26 +0200)]
man: votequorum.5: use proper single quotes

Backtick and apostrophe are formatted as directional quotes by plain
groff, but they behave literally in the body of a man page.

Signed-off-by: Ferenc Wágner <wferi@debian.org>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agoman: fix typo: avaialable
Ferenc Wágner [Sun, 25 Aug 2019 13:48:33 +0000 (15:48 +0200)]
man: fix typo: avaialable

By slightly rewording the documentation of knet_compression_model.

Signed-off-by: Ferenc Wágner <wferi@debian.org>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agotests: Use CS_DISPATCH_BLOCKING instead of cycle
Jan Friesse [Tue, 29 Sep 2020 16:44:44 +0000 (18:44 +0200)]
tests: Use CS_DISPATCH_BLOCKING instead of cycle

Some tests were using dispatch function in CS_DISPATCH_ALL mode
without poll/select on fd. This leads to busywait cycle, because
CS_DISPATCH_ALL masks CS_ERR_TRY_AGAIN error.

Simpliest solution is to use CS_DISPATCH_BLOCKING instead and remove
while cycle, because CS_DISPATCH_BLOCKING handles CS_ERR_TRY_AGAIN
correctly.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
4 years agoquorum: Add support for nodelist callback
Jan Friesse [Wed, 9 Sep 2020 12:16:55 +0000 (14:16 +0200)]
quorum: Add support for nodelist callback

Current quorum callback contains only actual view list and there is no
way how to find out joined/left nodes. This cannot be emulated by user
app, because when corosync restarts before other nodes notices then view
list is unchanged (ring id is changed tho).

Solution is to implement similar callback as for cpg which contains ring
id, member list, joined list and left list.

To implement such callback and keep backwards compatibility,
quorum_model_initialize is introduced. Its behavior is similar to
cpg_model_initialize. This allows passing model v1, which contains
enhanced quorum (full ring id is passed instead of just seq number)
and nodelist callbacks.

To find out which events should be sent by corosync daemon, new message
MESSAGE_REQ_QUORUM_MODEL_GETTYPE is used. Quorum library on init was
sending MESSAGE_REQ_QUORUM_GETTYPE. Whem model v1 is requested the
MESSAGE_REQ_QUORUM_MODEL_GETTYPE is used, which contains model number
so corosync knows that client is using model v1 and can send enhanced
quorum and nodelist events.

Nodelist event is (for now) send both in case of change of membership
and also when requested, also when CS_TRACK_CURRENT is requested, but
then left_list and joined_list is left empty, because they don't make
too much sense there.

New test application testquorummodel is added as an example of new API
usage.

Also during patch developement, I found few bugs here and there, which
are also fixed:
- quorum_initialize was never returning error code returned by
  MESSAGE_REQ_QUORUM_GETTYPE call (always returned CS_OK)
- Allocated memory in send_library_notification was based
  on sizeof(unsigned int) instead of mar_uint32_t. That's not wrong,
  but   it make more sense to use sizeof(mar_uint32_t) instead

(big thanks to Chrissie for englishify the man pages)

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
4 years agoman: reload during rolling upgrade
Christine Caulfield [Wed, 30 Sep 2020 07:49:50 +0000 (08:49 +0100)]
man: reload during rolling upgrade

Make it clear that reloads during a rolling upgrade are not
supported.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agototemsrp: Move token received callback
Jan Friesse [Tue, 1 Sep 2020 13:24:19 +0000 (15:24 +0200)]
totemsrp: Move token received callback

Trigger token received callback only for valid token.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
4 years agocommon_lib: Remove trailing spaces in cs_strerror
Jan Friesse [Thu, 17 Sep 2020 13:30:07 +0000 (15:30 +0200)]
common_lib: Remove trailing spaces in cs_strerror

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
4 years agototemconfig: improve linknumber checking
liangxin1300 [Thu, 17 Sep 2020 02:54:03 +0000 (10:54 +0800)]
totemconfig: improve linknumber checking

Check whether linknumber larger than INTERFACE_MAX and display error if
so.

Signed-off-by: liangxin1300 <XLiang@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agototemconfig: add interface number to the error str
liangxin1300 [Wed, 16 Sep 2020 10:41:43 +0000 (18:41 +0800)]
totemconfig: add interface number to the error str

Signed-off-by: liangxin1300 <XLiang@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agocfg: enhance message_handler_req_lib_cfg_killnode
liangxin1300 [Fri, 11 Sep 2020 04:10:41 +0000 (12:10 +0800)]
cfg: enhance message_handler_req_lib_cfg_killnode

While execute corosync-cfgtool -k <nodeid> to kill node:
* Check whether nodeid exists
* Check whether the node was joined

Signed-off-by: liangxin1300 <XLiang@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agototemconfig: validate totem.transport value
liangxin1300 [Tue, 1 Sep 2020 03:02:37 +0000 (11:02 +0800)]
totemconfig: validate totem.transport value

Signed-off-by: liangxin1300 <XLiang@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agocmapctl: return error on no result of print prefix
liangxin1300 [Thu, 20 Aug 2020 16:13:11 +0000 (00:13 +0800)]
cmapctl: return error on no result of print prefix

return  EXIT_FAILURE if no result print for ACTION_PRINT_PREFIX.

Signed-off-by: liangxin1300 <XLiang@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agocmapctl: check NULL for key type and value for -p
liangxin1300 [Fri, 21 Aug 2020 05:30:50 +0000 (13:30 +0800)]
cmapctl: check NULL for key type and value for -p

To avoid segmentation fault.

Signed-off-by: liangxin1300 <XLiang@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agoquorumtool: strict check for -o option
liangxin1300 [Thu, 20 Aug 2020 06:02:40 +0000 (14:02 +0800)]
quorumtool: strict check for -o option

Signed-off-by: liangxin1300 <XLiang@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agoquorumtool: Help shouldn't require running service
liangxin1300 [Wed, 19 Aug 2020 03:11:37 +0000 (11:11 +0800)]
quorumtool: Help shouldn't require running service

Do not require corosync running when usage is requested.

Signed-off-by: liangxin1300 <XLiang@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agocfgtool: Return error when -i doesn't match
liangxin1300 [Mon, 17 Aug 2020 06:25:47 +0000 (14:25 +0800)]
cfgtool: Return error when -i doesn't match

Give error message and EXIT_FAILURE return code when -i
option doesn't match.

Signed-off-by: liangxin1300 <XLiang@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agoman: update output of -s and -b for cfgtool
liangxin1300 [Mon, 17 Aug 2020 09:21:15 +0000 (17:21 +0800)]
man: update output of -s and -b for cfgtool

Signed-off-by: liangxin1300 <XLiang@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agocmapctl: return EXIT_FAILURE on failure
liangxin1300 [Mon, 17 Aug 2020 07:14:46 +0000 (15:14 +0800)]
cmapctl: return EXIT_FAILURE on failure

For -g and -d option return EXIT_FAILURE when error occurs (most often
because key does not exist).

Signed-off-by: liangxin1300 <XLiang@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agotools: use util_strtonum for options checking
liangxin1300 [Fri, 7 Aug 2020 16:50:29 +0000 (00:50 +0800)]
tools: use util_strtonum for options checking

Function atoi is not safe since miss validation;
Function strtol is better but need to consider empty string and overflows
Function util_strtonum is a safer wrapper of strtoll

Use util_strtonum to check nodeid option and strict checking condition.

Signed-off-by: liangxin1300 <XLiang@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agocfgtool: enhancement -a option
liangxin1300 [Mon, 10 Aug 2020 02:08:36 +0000 (10:08 +0800)]
cfgtool: enhancement -a option

  * Add return code
  * Give error message when nodeid not exist

Signed-off-by: liangxin1300 <XLiang@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agocfgtool: output error messages to stderr
liangxin1300 [Fri, 7 Aug 2020 04:04:56 +0000 (12:04 +0800)]
cfgtool: output error messages to stderr

... and standardize the return code

Signed-off-by: liangxin1300 <XLiang@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agoconfigure: Use default systemd path with prefix
Jan Friesse [Thu, 16 Jul 2020 14:07:31 +0000 (16:07 +0200)]
configure: Use default systemd path with prefix

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years agobuild: Use git-version-gen during specfile build
Jan Friesse [Thu, 16 Jul 2020 13:50:42 +0000 (15:50 +0200)]
build: Use git-version-gen during specfile build

Instead of copying parts of git-version-gen for spec target use
git-version-gen directly and parse final version into components
(rpmver, alphatag, numcomm) and use them.

Main reason is to simplify code a bit (sed scripts are a bit repetitive
tho), reuse the code and also allow building of RPM from dist tarball
generated from non-tagged commit or dirty git (not very useful).

The code relies on fact, that hyphen is never used in tagged release
name.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years agobuild: Update git-version-gen
Jan Friesse [Tue, 14 Jul 2020 13:22:55 +0000 (15:22 +0200)]
build: Update git-version-gen

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years agospec: Require at least knet 1.18 for crypto reload
Jan Friesse [Thu, 16 Jul 2020 13:40:27 +0000 (15:40 +0200)]
spec: Require at least knet 1.18 for crypto reload

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
4 years agoconfig: Allow reconfiguration of crypto options
Christine Caulfield [Wed, 8 Jul 2020 09:31:20 +0000 (10:31 +0100)]
config: Allow reconfiguration of crypto options

Needs new knet crypto API.

If it's not available, then fall back to the old
API and forbid changing crypto while running.

To avoid us being dependant on the leader node, each
node sends its own crypto_reconfig_phase messages so
we can guarantee that the reconfiguration always completes
on each node.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agotest: Fix cpgtest
Christine Caulfield [Mon, 18 May 2020 12:34:07 +0000 (13:34 +0100)]
test: Fix cpgtest

... to cope with the max number of group members.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agoconfig: Fix crash when a reload fails twice
Christine Caulfield [Mon, 6 Apr 2020 12:42:47 +0000 (13:42 +0100)]
config: Fix crash when a reload fails twice

Have string values stored in char arrays in totem_config
so we don't get into a mess with the pointers.

Also remove vsftype (which hasn't been used since corosync 1)

Use strncpy even though we know the string is fine. Keep covscan happy

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agoconfig: Don't free pointers used by transports
Christine Caulfield [Fri, 3 Apr 2020 14:48:26 +0000 (15:48 +0100)]
config: Don't free pointers used by transports

reload failed for UDP[U] because they had saved pointers
to the interfaces[] array. so memcpy into that rather then
re-allocate it.

Also, move the check for different IP address families so
it also gets run at reload time.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agoconfig: don't reload vquorum if reload fails
Christine Caulfield [Thu, 2 Apr 2020 07:43:32 +0000 (08:43 +0100)]
config: don't reload vquorum if reload fails

Fix an 'error: success' stype message by propogating error_string
back down the stack.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agocfg: Improve error return to cfgtool -R
Christine Caulfield [Mon, 30 Mar 2020 10:28:28 +0000 (11:28 +0100)]
cfg: Improve error return to cfgtool -R

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agoconfig: Reorganise the config system
Christine Caulfield [Thu, 26 Mar 2020 08:28:18 +0000 (08:28 +0000)]
config: Reorganise the config system

To be more reliable & maintainable

The basic plan here is to fix reloads to be more stable
using read/parse/verify/build/commit stages, so that any errors
will not leave corosync in an unstable state. This should
also make the code more maintainable as currently the verify/commit
stages are horribly intertwined.

Also:
- Fix local_node_pos not being updated in the new map during validation
 (broke adding and removing new nodes in the middle of the list).
- Fix reconfiguration so that nodes are indexed by nodeid and not their
  position in the list. This is an old bug that's just been carried
  over

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agoRevert "totemip: compare sin6_scope_id and interface_num" v3.0.4
Jan Friesse [Wed, 22 Apr 2020 11:30:36 +0000 (13:30 +0200)]
Revert "totemip: compare sin6_scope_id and interface_num"

This reverts commit efd34df531d1b23d6458dca863a7517b7ac0099d to make
master compile after revert of 934c47ed4384daf2819c26306bebba3225807499.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
4 years agoRevert "totemip: Add support for sin6_scope_id"
Jan Friesse [Wed, 22 Apr 2020 11:28:57 +0000 (13:28 +0200)]
Revert "totemip: Add support for sin6_scope_id"

This reverts commit 934c47ed4384daf2819c26306bebba3225807499 which is
causing protocol incompatibility in needle. Master seems to be not
affected, but it needs more checking.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
4 years agocfgtool: Fix error code as described in MP
Hideo Yamauchi [Thu, 26 Mar 2020 01:38:54 +0000 (10:38 +0900)]
cfgtool: Fix error code as described in MP

If all links are connected 0 is returned to the shell, otherwise it's
error code 1.

Signed-off-by: Hideo Yamauchi <renayama19661014@ybb.ne.jp>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agoicmap: icmap_init_r() leaks if trie_create() fails
Christine Caulfield [Thu, 26 Mar 2020 10:26:16 +0000 (10:26 +0000)]
icmap: icmap_init_r() leaks if trie_create() fails

Thanks to Coverity for finding this

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agovotequorum: set wfa status only on startup
Jan Friesse [Tue, 10 Mar 2020 16:49:27 +0000 (17:49 +0100)]
votequorum: set wfa status only on startup

Previously reload of configuration with enabled wait_for_all result in
set of wait_for_all_status which set cluster_is_quorate to 0 but didn't
inform the quorum service so votequorum and quorum information may get
out of sync.

Example is 1 node cluster, which is extended to 3 nodes. Quorum service
reports cluster as a quorate (incorrect) and votequorum as not-quorate
(correct). Similar behavior happens when extending cluster in general,
but some configurations are less incorrect (3->4).

Discussed solution was to inform quorum service but that would mean
every reload would cause loss of quorum until all nodes would be seen
again.

Such behaviour is consistent but seems to be a bit too strict.

Proposed solution sets wait_for_all_status only on startup and
doesn't touch it during reload.

This solution fulfills requirement of "cluster will be quorate for
the first time only after all nodes have been visible at least
once at the same time." because node clears wait_for_all_status only
after it sees all other nodes or joins cluster which is quorate. It also
solves problem with extending cluster, because when cluster becomes
unquorate (1->3) wait_for_all_status is set.

Added assert is only for ensure that I haven't missed any case when
quorate cluster may become unquorate.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
4 years agoquorumtool: exit on invalid expected votes
Jan Friesse [Wed, 4 Mar 2020 07:53:41 +0000 (08:53 +0100)]
quorumtool: exit on invalid expected votes

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
4 years agovotequorum: Change check of expected_votes
Jan Friesse [Wed, 4 Mar 2020 10:42:15 +0000 (11:42 +0100)]
votequorum: Change check of expected_votes

Previously value of new expected_votes was checked so newly computed
quorum value was in the interval <total_votes / 2, total_votes>. The
upper range prevented the cluster to become unquorate, but bottom check
was almost useless because it allowed to change expected_votes so it is
smaller than total_votes.

Solution is to check if expected_votes is bigger or equal to total_votes
and for quorate cluster only check if cluster doesn't become unquorate
(for unquorate cluster one can set upper range freely - as it is
perfectly possible when using config file)

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
4 years agocfgtool: Simplify output a bit for link status
Jan Friesse [Tue, 3 Mar 2020 14:07:55 +0000 (15:07 +0100)]
cfgtool: Simplify output a bit for link status

Display words connected/disconnected instead of 1/0 and show enabled
status only when link is not enabled (shouldn't happen).

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
4 years agoman: Enhance link_mode priority description
Jan Friesse [Tue, 25 Feb 2020 14:17:05 +0000 (15:17 +0100)]
man: Enhance link_mode priority description

Some users found description of priority for passive link_mode
confusing (probably because "priority" word is too
overloaded) so add some redundancy to make description
unambiguous.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
4 years agomain: Add schedmiss timestamp into message
Jan Friesse [Mon, 24 Feb 2020 13:58:45 +0000 (14:58 +0100)]
main: Add schedmiss timestamp into message

This is useful for matching schedmiss event in stats map with logged
event.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
4 years agototemip: compare sin6_scope_id and interface_num
liangxin1300 [Thu, 20 Feb 2020 05:38:49 +0000 (13:38 +0800)]
totemip: compare sin6_scope_id and interface_num

When user configure a specific interface like vlan
with the same IPv6 link-local address, Corosync should
compare sin6_scope_id with interface_num, to make sure got
the right interface to bind

Signed-off-by: liangxin1300 <XLiang@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agototemip: Really remove totemip_copy_endian_convert
Jan Friesse [Mon, 17 Feb 2020 16:54:09 +0000 (17:54 +0100)]
totemip: Really remove totemip_copy_endian_convert

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
4 years agototemip: Remove unused totemip_copy_endian_convert
Jan Friesse [Fri, 14 Feb 2020 08:52:40 +0000 (09:52 +0100)]
totemip: Remove unused totemip_copy_endian_convert

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
4 years agototemip: Add support for sin6_scope_id
Jan Friesse [Fri, 14 Feb 2020 08:42:08 +0000 (09:42 +0100)]
totemip: Add support for sin6_scope_id

sin6_scope_id was not present in totemip structure making impossible to
use link-local ipv6 address.

Patch adds sin6_scope_id and changes convert/copy functions to use it
(formally also comparator functions should be changed, but it seems to
cause more harm and it is not really needed).

This makes corosync work with link-local addresses fine for both UDPU
and Knet transport as long as interface specification is used (so
fe80::xxxx:xxxx:xxxx:xxxx%eth0).

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
4 years agocfgtool: Improve link status display
Jan Friesse [Mon, 10 Feb 2020 15:13:42 +0000 (16:13 +0100)]
cfgtool: Improve link status display

Totemknet is enhanced to use 'n' character for localhost and not adding
status, because it is safe to expect that localhost link is always
connectd. corosync-cfgtool is enhanced to properly decode 'n', '?' and
'd' characters and display its meaning for extended status. Special
characters are also documented in man page.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
4 years agototemknet: Change the initial value of the status
Hideo Yamauchi [Fri, 7 Feb 2020 04:02:47 +0000 (13:02 +0900)]
totemknet: Change the initial value of the status

Signed-off-by: Hideo Yamauchi <renayama19661014@ybb.ne.jp>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agostats: Use nanoseconds from epoch for schedmiss
Jan Friesse [Thu, 23 Jan 2020 16:11:54 +0000 (17:11 +0100)]
stats: Use nanoseconds from epoch for schedmiss

Using monotonic time is not working because it doesn't have to match
time from epoch.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
4 years agostats: Add stats for scheduler misses
Christine Caulfield [Fri, 17 Jan 2020 14:22:16 +0000 (14:22 +0000)]
stats: Add stats for scheduler misses

This patch add a stats.schedmiss.* set of entries that
are a record of the last 10 times corosync was not scheduled
in time.

These entries are keypt in reverse order (so stats.schedmiss.0.* is
always the latest one kept) and the values, including the timestamp,
are in milliseconds.

It's also possible to use a cmap tracker to follow these events, which
might be useful.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agovotequorum: Reflect runtime change of 2Node to WFA
Jan Friesse [Thu, 16 Jan 2020 14:43:59 +0000 (15:43 +0100)]
votequorum: Reflect runtime change of 2Node to WFA

When 2Node mode is set, WFA is also set unless WFA is configured
explicitly. This behavior was not reflected on runtime change, so
restarted corosync behavior was different (WFA not set). Also when
cluster is reduced from 3 nodes to 2 nodes during runtime, WFA was not
set, what may result in two quorate partitions.

Solution is to set WFA depending on 2Node when WFA
is not explicitly configured.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
4 years agocpg: Change downlist log level
Hideo Yamauchi [Wed, 8 Jan 2020 23:39:55 +0000 (08:39 +0900)]
cpg: Change downlist log level

Signed-off-by: Hideo Yamauchi <renayama19661014@ybb.ne.jp>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agoman: move cmap_keys man page from section 8 to 7
Ferenc Wágner [Sat, 4 Jan 2020 12:38:08 +0000 (13:38 +0100)]
man: move cmap_keys man page from section 8 to 7

Section 8 is for "System administration commands", 7 is "Miscellaneous".

Signed-off-by: Ferenc Wágner <wferi@debian.org>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
4 years agostats: Check return code of stats_map_get
Jan Friesse [Tue, 26 Nov 2019 15:47:31 +0000 (16:47 +0100)]
stats: Check return code of stats_map_get

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
4 years agoquorumtool: Assert copied string length
Jan Friesse [Tue, 26 Nov 2019 14:05:46 +0000 (15:05 +0100)]
quorumtool: Assert copied string length

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
4 years agonotifyd: Check cmap_track_add result
Jan Friesse [Tue, 26 Nov 2019 13:17:53 +0000 (14:17 +0100)]
notifyd: Check cmap_track_add result

And assert length of key_name to strcpy.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
4 years agocmapctl: Free bin_value on error
Jan Friesse [Tue, 26 Nov 2019 13:09:14 +0000 (14:09 +0100)]
cmapctl: Free bin_value on error

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
4 years agocfgtool: Remove unused callbacks
Jan Friesse [Tue, 26 Nov 2019 12:59:23 +0000 (13:59 +0100)]
cfgtool: Remove unused callbacks

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
4 years agocpghum: Remove unused time variables and functions
Jan Friesse [Tue, 26 Nov 2019 12:56:07 +0000 (13:56 +0100)]
cpghum: Remove unused time variables and functions

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
4 years agovotequorum: Assert copied strings length
Jan Friesse [Tue, 26 Nov 2019 12:52:27 +0000 (13:52 +0100)]
votequorum: Assert copied strings length

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
4 years agototemknet: Assert strcpy length
Jan Friesse [Tue, 26 Nov 2019 12:13:53 +0000 (13:13 +0100)]
totemknet: Assert strcpy length

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
4 years agototemknet: Check result of fcntl O_NONBLOCK call
Jan Friesse [Tue, 26 Nov 2019 12:05:42 +0000 (13:05 +0100)]
totemknet: Check result of fcntl O_NONBLOCK call

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
4 years agototemconfig: Initialize warnings variable
Jan Friesse [Tue, 26 Nov 2019 12:02:04 +0000 (13:02 +0100)]
totemconfig: Initialize warnings variable

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
4 years agosync: Assert sync_callbacks.name length
Jan Friesse [Tue, 26 Nov 2019 12:01:16 +0000 (13:01 +0100)]
sync: Assert sync_callbacks.name length

Signed-off-by: Jan Friesse <jfriesse@redhat.com>