Commit Graph

316 Commits

Author SHA1 Message Date
Ryan McCabe
30baac19ab fence_virtd: Cleanup: remove unused configuration options
Remove unused configuration options.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-29 14:47:25 -04:00
Ryan McCabe
8453beedfc fence_virt: Remove remaining references to checkpoints
Remove all remaining references to the checkpoint backend plugin,
which has been removed.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-29 14:47:10 -04:00
Ryan McCabe
f075a5b45b fence_virt: Remove remaining references to checkpoints
Remove all remaining references to the checkpoint backend plugin,
which has been removed.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-29 14:45:59 -04:00
Ryan McCabe
b0aa3ad784 fence-virt: Format string cleanup
Warn on non-literal format strings and cleanup.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-29 13:54:51 -04:00
Ryan McCabe
bcfc5703d3 fence_virtd: Implment hostlist for the cpg backend
Implment hostlist for the cpg backend.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-28 22:23:28 -04:00
Ryan McCabe
0745f1c7ab fence_virt: Fix logic error in fence_xvm
Fix a logic error in fence_xvm that would cause fence_xvm to fail
to retry if binding the TCP port for authenticating requests
failed.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-28 22:22:50 -04:00
Ryan McCabe
4f81575661 fence_virtd: Cleanup config module
Clean up several logic errors in the 'fence_virtd -c' config
creation mode.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-28 22:18:37 -04:00
Ryan McCabe
4fb9efe4b2 fence_virtd: cpg: Fail initialization if no hypervisor connections
Report initialization failure for the cpg plugin if none of the
configured  hypervisor URIs can be connected to successfully.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-28 10:11:18 -04:00
Ryan McCabe
5e04644e31 fence_virtd: Make the libvirt backend survive libvirtd restarts
Allow the libvirt backend plugin to survive libvirtd restarts
and crashes. Without this fix, fence_virtd will crash if its
connections to hypervisors fail.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-28 10:07:54 -04:00
Ryan McCabe
2af059cc81 fence_virtd: Allow the cpg backend to survive libvirt failures
Make the cpg backend able to cope with libvirtd crashing or restarting
without crashing or hanging the fence_virtd server.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-28 01:39:58 -04:00
Ryan McCabe
0bc1f54961 fence_virtd: cpg: Fix typo
Fix a typo in the configuration parsing for the cpg plugin during
initialization.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-27 21:55:45 -04:00
Ryan McCabe
d216131344 fence-virtd: Add cpg-virt backend plugin
Add the cpg-virt backend plugin.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-27 21:26:11 -04:00
Ryan McCabe
7f6798916a fence_virtd: Remove checkpoint, replace it with a CPG only plugin
Remove the checkpoint backend plugin, as it used CMAN and openais
checkpoints. Given nobody is using CMAN or openais anymore, the plugin
was useless for clusters running the current stack.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-27 21:23:03 -04:00
Ryan McCabe
3bfe80d293 fence-virt: Bump version
Bump version.
2017-05-27 21:16:40 -04:00
Ryan McCabe
5dff3df564 fence_virtd: Add better debugging messages for the TCP listner
Improve some debugging messages for the TCP listener plugin.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-27 15:04:11 -04:00
Ryan McCabe
cf48854295 fence_virtd: Fix potential unlocked pthread_cond_timedwait()
Fix a potential call to pthread_cond_timedwait() with an unlocked
mutex in the non-blocking syslog wrapper code.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-26 14:39:38 -04:00
Ryan McCabe
853937d1bd fence-virtd: Cleanup small memory leak
Clean up a small memory leak in the TCP plugin on
an error path.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-25 13:57:40 -04:00
Ryan McCabe
2c909b78d8 fence_virtd: Fix select logic in listener plugins
Don't fail causing the daemon to exit when select() fails with errors
that indicate we should retry.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-25 13:34:05 -04:00
Ryan McCabe
60800fe973 Factor out common libvirt code so that it can be reused by multiple backends 2017-05-24 23:18:18 -04:00
Ryan McCabe
4d29ef93ea Document the fence_virtd -p command line flag
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-23 22:56:37 -04:00
Ryan McCabe
f7e2b9a0c0 fence_virtd: Log an error when startup fails
Log an error when startup fails due to pidfile creation failing.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-23 22:53:02 -04:00
Ryan McCabe
647c144d82 Retry writes in the TCP, mcast, and serial listener plugins while sending
a response to clients, if the write fails or is incomplete.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-23 15:37:42 -04:00
Ryan McCabe
95a10ca43e Make the packet authentication code more resilient in the face
of transient failures.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-23 15:36:23 -04:00
Ryan McCabe
dfa4ca523a Remove erroneous 'inline'
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-23 14:59:58 -04:00
Ryan McCabe
44fd94088e Disable the libvirt-qmf backend by default 2017-05-23 14:17:22 -04:00
Ryan McCabe
0bc561ca86 Bump the versions of the libvirt and checkpoint plugins 2017-05-22 14:16:06 -04:00
Ryan McCabe
fe112ac52d Merge pull request #7 from lanconnected/master
Add keepalive ability to virt-serial and resolve several problems in its event listener, fix several imperfections in checkpoint plugin.
2017-05-22 14:07:05 -04:00
Ryan McCabe
726fa21528 fence-virtd: Enable TCP listener plugin by default 2017-05-22 14:03:33 -04:00
Ryan McCabe
0015556ddf fence-virtd: Cleanup documentation of the TCP listener
Remove overly specific documentation of the TCP listener. vios-proxy appears to be dead,
so all references to that and its configuration have been removed.

Resolves: rhbz#1334170
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-17 13:21:33 -04:00
Ryan McCabe
286e0c61e4 fence_xvm/fence_virt: Add support for the validate-all status op
Add support for the validate-all status operation. In this mode,
the fence agent will validate the arguments given on either the
command line or standard input. If validation succeeds, it will
exit with code 0, otherwise it will exit with code 1.

Resolves: rhbz#1447700
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-03 23:22:34 -04:00
Ryan McCabe
53cb4ec362 fence-virt: Add list-status command to man page and metadata
Add the list-status command to the man page and the metadata output.

Resolves: rhbz#908455
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-05-03 23:03:23 -04:00
Ryan McCabe
b3ea4870c8 fence-virt: Cleanup numeric argument parsing
Cleanup the parsing of numeric command line arguments.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2017-03-13 17:43:17 -04:00
Ryan McCabe
85eb949759 fence-virt: Log message to syslog in addition to stdout/stderr
Log error and status messages to syslog in addition to stdout and
stderr.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2016-11-11 10:00:50 -05:00
Ryan McCabe
d4cd306cb4 fence-virt: Permit explicitly setting delay to 0
Permit explicitly setting the delay to 0. The fix in
commit 44deba6ee9 for a typo caused a change
in behavior that resulted in an explicitly specified delay of 0 causing an
error.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2016-11-11 09:52:18 -05:00
Ryan McCabe
edb5ee817a fence-virt: Add 'list-status' operation for compat with other agents
Add a list-status operation that behaves the same way as the list operation
for compatibility with the other fence agents.

Resolves: rhbz#908455
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2016-11-01 12:11:22 -04:00
Ryan McCabe
da1ef15db0 Merge pull request #8 from oalbrigt/remove-delay-from-status-monitor-list
Remove delay from the status, monitor and list functions
2016-05-09 10:53:10 -04:00
Andrew Beekhof
87b4eb3d8c Fix use of undefined #define 2016-05-09 15:01:35 +10:00
Andrew Beekhof
988c08442b Allow fence_virtd to run as non-root 2016-05-09 15:01:35 +10:00
Oyvind Albrigtsen
f1f1a2437c Remove delay from the status, monitor and list functions 2016-05-03 15:58:00 +02:00
Yevheniy Demchenko
dd16e370b4 Resolves serveral problems in checkpoint plugin, making it functional. 2016-04-25 20:12:53 +02:00
Yevheniy Demchenko
913e54c544 Current implementation of event listener in virt-serial does not support keepalive,
it does not generate nor capable to answer to keepalive requests, which
causes libvirt connection to disconnect every 30 seconds (interval*timeout
in libvirtd.conf). Furthermore, it does not clean up filehandlers and leaves
hanging sockets. Also, if other thread opens its own connection to libvirt
(i.e. checkpoint.c), event function in virt-serial.c just updates event listener
file handler with a wrong one, what causes checkpoint.c malfunctions, fence_virtd hangs
and so on. This patch uses default event listener implementation from libvirt and
resolves theese problems.
2016-04-25 20:03:05 +02:00
Ryan McCabe
6d79ea13dd Merge pull request #6 from Thermi/master
daemon_init: Removed PID check and update
2015-09-15 09:17:05 -04:00
Ryan McCabe
7421e1ab26 Merge pull request #5 from jnpkrn/drop-legacy-SysVStartPriority
fence_virtd: drop legacy SysVStartPriority from service unit
2015-08-30 11:25:56 -04:00
Thermi
7916f51d89 daemon_init: Removed PID check and update 2015-08-30 16:01:07 +02:00
Jan Pokorný
16503d909b
fence_virtd: drop legacy SysVStartPriority from service unit
Since systemd-218[1], systemd will emit following lines in the
journal upon (re)loading its configuration:

Support for option SysVStartPriority= has been removed and it is
ignored

As it allegedly had no importance for some time even before, simply
drop it.

[1] http://cgit.freedesktop.org/systemd/systemd/commit/?id=9e37c95

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2015-08-03 18:25:11 +02:00
Ryan McCabe
4a749e3f7d fence-virt: client: Do not truncate VM domains in list output
Don't truncate the domain string for VMs when listing their status
in the output of the list command.

Resolves: rhbz#1207422

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2015-07-17 10:52:01 -04:00
Ryan McCabe
44deba6ee9 Merge pull request #4 from jnpkrn/fix-delay-parameter-checking
client: fix "delay" parameter checking (copy-paste)
2015-03-23 12:36:18 -04:00
Jan Pokorný
f49a7d68d5
client: fix "delay" parameter checking (copy-paste)
Resolves: rhbz#1204873

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2015-03-23 17:33:26 +01:00
Ryan McCabe
630f390d94 fence-virt: Fix broken restrictions on the port ranges
Fix broken port range check.

Resolves: rhbz#1078197

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2015-03-03 13:40:46 -05:00
Ryan McCabe
dbe52e9333 Merge pull request #3 from troxor/clarify-error
Clarify debug message
2015-02-20 11:13:50 -05:00