Commit Graph

178 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Thermi
7916f51d89 daemon_init: Removed PID check and update 2015-08-30 16:01:07 +02: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
Troy C
7c48feaddd Clarify debug message 2015-02-20 10:08:09 -06:00
Ryan McCabe
2694500ab1 fence-virtd: Allow multiple hypervisors for the libvirt backend
Allow users to specify multiple hypervisor URIs for the
libvirt backend.

.e.g,

backends {
	libvirt {
		uri = "qemu:///system";
		uri1 = "qemu:///system2";
		uri2 = "qemu:///system3";
	}
}

Resolves: rhbz#914144

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2014-06-27 00:07:46 -04:00
Ryan McCabe
97eb067edf fence-virt: Don't overrwrite saved errno
Fix a bug that caused the saved errno value to be overwritten
on an error path.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2014-06-23 15:56:09 -04:00
Ryan McCabe
b995766a04 fence-virt: Fix mismatched sizeof in memset call
Fix incorrect argument to sizeof used in a memset call.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2014-06-23 15:56:09 -04:00
Ryan McCabe
10f574f860 fence-virt: Send complete hostlist info
Send all known VM states when we receive a hostlist request.

Resolves: rhbz#1104740

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2014-06-23 15:56:09 -04:00
Ryan McCabe
61ab01bb5c fence-virt: Fix for missed libvirtd events
Fix a bug that caused some libvirtd events to be missed. This bug could
cause client requests to fail in cases where VMs were either started or live
migrated to a node after fence_virtd had already started.

Resolves: rhbz#903172

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2013-09-13 15:12:00 -04:00
Jan Pokorný
57ffe8bf9f Fix using bad struct item for auth algorithm
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2012-11-27 13:31:22 -05:00
Ryan McCabe
5e7e247f00 Revert "fence-virt: Fix possible descriptor leak"
This reverts commit d093fecd8e.
2012-10-26 18:15:31 -04:00
Ryan McCabe
0de5dd3ac9 fence_virtd: Return success if a domain exists but is already off.
Return success if a domain exists but is already off.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-10-26 18:14:45 -04:00
Ryan McCabe
10df3451a6 fence-virt: Fix free of uninitialized variable
Fix a possible free() of an uninitialized struct member in
the error path that's hit in an OOM situation.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-10-17 13:20:24 -04:00
Ryan McCabe
09c434dfe5 fence-virt: Fix memory leak
Fix memory leak that occurred when setting up
the multicast socket failed.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-10-17 13:20:16 -04:00
Ryan McCabe
d093fecd8e fence-virt: Fix possible descriptor leak
Add missing dlclose after loading plugins.

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-10-17 13:20:13 -04:00
Ryan McCabe
98e332e243 fence_virt: Return failure for nonexistent domains
Return failure instead of success if a user attempts an operation
on a domain that does not exist.

Resolves: rhbz#853927
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-10-08 10:53:13 -04:00
Ryan McCabe
f61626c108 Add a TCP listener plugin for use with viosproxy
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-06-01 15:22:02 -04:00
Lon Hohberger
2f87331c1a Stop linking against unnecessary QPid libs.
Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
2012-03-26 17:13:37 -04:00
Lon Hohberger
961cc3ed7f Update libvirt-qmf plugin and docs
Resolves: rhbz#753974

Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
2012-02-08 15:46:50 -05:00
Lon Hohberger
d72630b973 Fix crash when we fail to read key file.
If hashing is requested and we have no key data, immediately fail.

Resolves: rhbz#758392

Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
2012-02-08 14:51:01 -05:00
Lon Hohberger
2b01d8f887 Fix build
Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
2012-02-07 16:08:26 -05:00
Lon Hohberger
ccff09f2c7 Add old wait_for_backend directive handling & docs
Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
2012-02-07 16:06:40 -05:00
Lon Hohberger
3e2eb73b41 Return proper error if we can't set up our socket.
Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
2012-02-07 16:06:28 -05:00
Lon Hohberger
19674ab0bd Fix startup in systemd environments
Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
2012-02-07 16:03:05 -05:00
Lon Hohberger
a1b5a03c38 Don't override user's pick for backend server module
Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
2012-02-07 11:23:27 -05:00
Lon Hohberger
c8bb151bee Clean up compiler warnings
Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
2012-02-07 11:14:25 -05:00
Lon Hohberger
e96ef84b3e Fix serial domain handling 2012-02-07 11:04:53 -05:00
Lon Hohberger
5652c743a2 Fix monolithic build
Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
2012-02-07 10:59:23 -05:00
Lon Hohberger
71ee23d555 Clean up build and comments.
Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
2012-02-07 10:47:12 -05:00
Lon Hohberger
4a01ebe0f4 Add missing pm_fence source code
Signed-off-by: Lon Hohberger <lon@users.sourceforge.net>
2012-02-07 10:35:12 -05:00