Ryan McCabe
dbe52e9333
Merge pull request #3 from troxor/clarify-error
...
Clarify debug message
2015-02-20 11:13:50 -05:00
Troy C
7c48feaddd
Clarify debug message
2015-02-20 10:08:09 -06:00
Ryan McCabe
98b0e816ad
Merge pull request #2 from masatake/fix-wrong-perror
...
Fix wrong perror
2015-02-07 16:30:19 -05:00
Masatake YAMATO
99d6fa5746
fence-virtd: Use perror only if the last system call returns an error.
...
Fix wrong usage of perror. perror is called when data filled
by read system call is shorter than expected. It is not an error
of system call. In such case perror should not be used.
Similar code can be found in place where write system call is used.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2015-02-08 01:31:36 +09:00
Masatake YAMATO
59b49215ab
fence-virtd: Fix printing wrong system call in perror
...
perror("read") is called after write system call.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2015-02-08 01:31:03 +09: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
623f5cfd49
fence-virt: Fix small memory leak in the config module
...
Fix a small memory leak in the simpleconfig module.
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
1589647db4
fence-virt: Clarify the path option in serial mode
...
Add a clarification for the path option when in serial mode.
Clarified text from Chris Mackowski <cmackows@redhat.com>
Resolves: rhbz#1014238
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2014-06-23 15:56:09 -04:00
Ryan McCabe
224c823eb1
Bump version
2013-11-04 11:08:35 -05:00
Ryan McCabe
cc3f424895
fence-virt: Bump version
...
Bump version.
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2013-11-03 14:01:00 -05:00
Ryan McCabe
09488e9c03
fence_virtd: Fix broken systemd service file
...
Fix broken systemd service file caused by the inclusion of
network.target, which has been removed.
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2013-11-03 12:49:55 -05:00
Ryan McCabe
bf3a1ec00a
fence_virt/fence_xvm: Print status when invoked with -o status
...
Previously no status was printed to stdout when fence_virt and fence_xvm
were invoked with the -o status flag. The exit code of the program was
the only way to determine the result of the status operation. This
patch causes fence_virt and fence_xvm to additionally print
either "Status: ON" or "Status: OFF" when it is able to determine
the status.
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2013-11-03 12:44:49 -05: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
Ryan McCabe
04710b4079
fence-virt: Fail properly if unable to bind the listener socket
...
Bail out properly in multicast mode if we're unable to bind the TCP
listener socket.
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2013-07-10 17:31:21 -04:00
Ryan McCabe
3ee04afd41
Merge pull request #1 from jnpkrn/master
...
Echoes of recent commits
2012-12-06 11:32:14 -08:00
Jan Pokorný
5ac1d63528
client: dump all arguments structure in debug mode
...
In longer term, there should be a proper split of common/dedicated
arguments between modes (disjunct fields via union?) and also
args_print should dump the arguments as per mode.
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2012-12-04 23:04:25 +01:00
Jan Pokorný
60e14071b7
Drop executable flag for man pages (finally)
...
Accidentally, 8cda792ac510fe3d62bfe29e71004b643ade9e7e did only a part
of it.
Reported-by: Lon Hohberger <lhh@redhat.com>
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2012-12-04 22:37:20 +01:00
Jan Pokorný
dc9120ce24
Honor implicit "ip_family=auto" in fence_xvm w/IPv6 mult.addr.
...
Previously this wasn't the case:
$ ./fence_xvm -d -a ff05::3:1 -H asdfaf
-- args @ 0x7fffb9575340 --
args->domain = asdfaf
args->op = 2
args->net.key_file = /etc/cluster/fence_xvm.key
args->net.hash = 2
args->net.addr = ff05::3:1
args->net.auth = 2
args->net.port = 1229
args->net.ifindex = 0
args->net.family = 2
args->timeout = 30
args->retr_time = 20
args->flags = 0
args->debug = 1
-- end args --
[...]
args->net.family is being assigned value of PF_INET (2) instead of
PF_INET6 (10) as it ought to be with implicit "auto" value as declared, e.g.,
in metadata:
<parameter name="ip_family">
<getopt mixed="-i" />
<content type="string" default="auto" />
<shortdesc lang="en">IP Family ([auto], ipv4, ipv6)</shortdesc>
</parameter>
After the fix, we get the expected behavior when using IPv6 multicast
address:
$ ./fence_xvm -d -a ff05::3:1 -H asdfaf
-- args @ 0x7fffe4af7120 --
args->domain = asdfaf
args->op = 2
args->net.key_file = /etc/cluster/fence_xvm.key
args->net.hash = 2
args->net.addr = ff05::3:1
args->net.auth = 2
args->net.port = 1229
args->net.ifindex = 0
args->net.family = 10
args->timeout = 30
args->retr_time = 20
args->flags = 0
args->debug = 1
-- end args --
[...]
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2012-11-27 13:52:59 -05: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
Jan Pokorný
8cda792ac5
Drop executable flag for man pages
...
Reported-by: rpmlint <http://rpmlint.zarb.org/cgi-bin/trac.cgi >
Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
2012-11-27 13:31:20 -05:00
Dan Horák
c3d398645d
use bswap_X() instead of b_swapX()
...
byteswap.h defined interface is bswap_X() not b_swapX()
2012-11-16 13:07:41 -05:00
Ryan McCabe
7231adafcb
fence_virtd: Fix memcpy size params in the TCP plugin
...
Fix the size param of the memcpy calls in the TCP plugin.
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-10-26 18:15:53 -04:00
Ryan McCabe
5e7e247f00
Revert "fence-virt: Fix possible descriptor leak"
...
This reverts commit d093fecd8ecef0e94a9f6d1f3fa763525fd776a8.
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
fc7d6bf464
fence-virt: Add back missing tcp_listener.h file
...
Add back AWOL header file.
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-10-18 19:38:00 -04:00
Ryan McCabe
0004a70072
fence-virt: Fix a few fd leaks
...
Fix a few places where descriptors could leak in the client code.
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-10-17 13:32:16 -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
7774713dce
fence-virt: Fix possible null pointer dereference
...
Fix a possible null pointer dereference in the config parser.
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-10-17 13:20:22 -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
2a8ac0a166
fence-virt: Fix fd leak when finding local addresses
...
Close the netlink fd before returning if recvfrom fails.
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-10-17 13:20:15 -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
85ecac5cff
fence-virt: Fix possible fd leak
...
Fix a fd leak that could occur if reading /dev/urandom failed.
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-10-17 13:20:08 -04:00
Ryan McCabe
c48c06819f
fence-virt: Fix null pointer deref
...
Fix an unlikely null pointer dereference that could occur
subsequent to malloc failing.
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-10-17 13:20:02 -04:00
Ryan McCabe
0c502aad77
fence-virt: Explicitly set delay to 0
...
Explicitly set the delay argument to 0 when initializing the args
struct.
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-10-17 13:19:56 -04:00
Ryan McCabe
9b8bc5ba1c
fence-virt: Fix return with lock held
...
Release the parser mutex before returning if malloc
fails.
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-10-17 13:17:22 -04:00
Ryan McCabe
b35ac70bf2
fence_virt: Fix typo in fence_virt(8) man page
...
Fix the description of when serial/vmchannel parameters are accepted.
Resolves: rhbz#761228
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-10-08 10:54:25 -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
83d1c3f68e
Merge branch 'master' of github.com:ryan-mccabe/fence-virt
2012-07-27 11:22:23 -04:00
Ryan McCabe
30fb5cd5f1
Initial commit
2012-07-27 08:12:05 -07:00
Lon Hohberger
96ff88d44f
Improve fence_virt.conf man page description of 'hash'
...
Signed-off-by: Lon Hohberger <lhh@redhat.com>
Acked-by: Ryan McCabe <rmccabe@redhat.com>
Acked-by: Jaroslav Kortus <jkortus@redhat.com>
2012-07-25 11:11:26 -04:00
Ryan McCabe
fb992c7d0f
Add a delay (-w) option.
...
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-06-07 18:10:49 -04:00
Ryan McCabe
4c0038cb92
Remove duplicated port struct entry
...
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-06-01 16:03:59 -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
Ryan McCabe
52381ce2b7
In serial mode, return failure if the other end closes the connection
...
before we see SERIAL_MAGIC in the reply or timeout.
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
2012-05-16 09:15:42 -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