| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Report error for malloc failure, and use zeroed allocation
to initialize handler structure.
|
|
|
|
|
| |
This headers were not resolving anything used for compiled .c files.
Remove unused util.c file.
|
|
|
|
| |
Error exit if chdir fails.
|
|
|
|
| |
Release allocated hash before exit.
|
|
|
|
|
|
|
|
|
|
|
| |
- logging is not controlled by "levels" but by "types"; types are
independent of each other... implementation of the usual "log level"
user-level semantics can be simply done on top; the immediate
application is enabling/disabling wire traffic logging independently
of other debug data, since the former is rather bulky and can easily
obscure almost everything else
- all logs go to "outlets", of which we currently have 2: syslog and
stderr; which "types" go to which "outlets" is entirely configurable
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were several hard-coded values for run directory around the code.
Also, some tools are DM specific only, others are LVM specific and there
was no distinction made here before. With this patch applied, we have
this cleaned up a bit (subsystem in brackets, defaults in parentheses):
[common] configurable PID_DIR (/var/run)
lvm [lvm] configurable RUN_DIR (/var/run/lvm)
configurable locking dir (/var/lock/lvm)
clvmd [lvm] configurable pid file (PID_DIR/clvmd.pid)
socket (RUN_DIR/clvmd.sock)
lvmetad [lvm] configurable pid file (PID_DIR/lvmetad.pid)
socket (RUN_DIR/lvmetad.socket)
dm [dm] configurable DM_RUN_DIR (/var/run)
cmirrord [dm] configurable pid file (PID_DIR/cmirrord.pid)
dmeventd [dm] configurable pid file (PID_DIR/dmeventd.pid)
server fifo (DM_RUN_DIR/dmeventd-server)
client fifo (DM_RUN_DIR/dmeventd-client)
The changes briefly:
- added configure --with-default-pid-dir
- added configure --with-default-dm-run-dir
- added configure --with-lvmetad-pidfile
- by default, using one common pid directory for everything
(only lvmetad was not following this before)
|
|
|
|
|
| |
Simplifies the code, properly detects too long socket paths,
drops unused parameter.
|
|
|
|
| |
Log errors if kernel_send fails.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Looking at the code in cmirrord/local.c, we can see the various different
request types handled in different ways. Some information that is non-changing
does not need to go around the cluster and can be short-circuited. For
example, once the cluster mirror is in-sync, it is pointless to continue
sending that query around the cluster. We can save network bandwidth and reply
directly back to the kernel. When it comes to status information, there are
two types 'TABLE' and 'INFO'. The 'TABLE' information never changes and
belongs to the group of requests that can be safely short-circuited. The
'STATUS' information can change - and will change if a device fails. Thus it
cannot be short-circuited, but this is exactly what was found. The 'STATUS'
information request was being short-circuited and therefore never reporting the
failure condition to anyone other than the "server" that experienced it
directly.
|
|
|
|
|
|
|
|
| |
In some occasional case dmevent restart was experiencing problems
with obtaining pid lockfile. So this patch tries to send several more kill
message until daemon kills itself so there is would reponse.
With this small loop the restart seems to work reliable,
although the loopsize and usleep are just randomly picked for now.
|
|
|
|
|
|
| |
Support lock conversion
Work also with LCK_READ
TODO: do more validation.
|
|
|
|
|
|
|
|
|
|
|
| |
various dmeventd plug-ins into a new function called 'dmeventd_lvm2_command',
but the new function did not strip off the "_mlog" extentions that the
mirror plug-in had been doing. This created bug 794904 - failure to replace
devices in a redundant log.
The test suite did catch this scenario because it performs repair tests (mainly)
through the CLI and not dmeventd. It's also not easy to test because the test
itself will hang if the bug is encountered.
|
| |
|
|
|
|
| |
There is missing some proper reaction when update fails ?
|
|
|
|
| |
also in error path
|
| |
|
| |
|
|
|
|
| |
(compiled only with special debug define)
|
|
|
|
|
| |
Check passed in executable path for dmeventd instead of predefined
compiled in path which is not the thing to be executed.
|
| |
|
|
|
|
|
|
|
|
| |
LISTEN_PID and LISTEN_FDS environment variables are defined only during systemd
"start" action. But we still need to know whether we're activated during
"reload" action as well - we use the reload action to call "dmeventd -R"/"lvmetad -R"
for statefull daemon restart. We can't use normal "restart" as that is simply
composed of "stop" and "start" and we would lose any state the daemon has.
|
| |
|
|
|
|
|
| |
Seems like some dmeventd startups are taking more time then expected,
so make the time window longer here.
|
|
|
|
| |
(Test commit.)
|
|
|
|
| |
(test commit)
|
|
|
|
|
|
| |
Properly test for dm_asprintf result.
Keep unlocking of mutex in the same function and do not spread lock and
unlock over functions.
|
|
|
|
|
| |
Operation on _thread_registry needs to be covered by mutex.
Cosmetic move a die code after free for valgind short leak list.
|
|
|
|
|
|
|
| |
Add 3rd daemon return state "unknown" for lookups that are carried out
successfully but don't find the item requested.
Avoid issuing error messages when it's expected that a device that's
being looked up in lvmetad might not be there.
|
| |
|
|
|
|
|
| |
In case of zero length message, there would be a memory leak on
return path from _do_process_request.
|
|
|
|
|
|
| |
Test pointers from allocation against NULL.
Error paths should be checked, some of them probably need
some extesions.
|
|
|
|
|
| |
Use %m for strerror.
Switch to use 0 for fail return code.
|
| |
|
|
|
|
| |
Using debug_t and some forgetten alloc_policy_t, force_t from past commit.
|
|
|
|
| |
Adding (void) where we cannot really report an error.
|
|
|
|
|
|
|
|
|
|
| |
F17 is getting rid of OpenAIS libraries (and checkpointing). While the
CPG stuff is staying, some if its constants are being removed. So, we
must adjust and use the remaining constants which the CPG constants were based on.
[~]# egrep 'CPG_DISPATCH_ALL|CPG_OK' /usr/include/*/*
corosync/corotypes.h:#define CPG_DISPATCH_ALL CS_DISPATCH_ALL
corosync/corotypes.h:#define CPG_OK CS_OK
|
| |
|
|
|
|
| |
return ENOMEM when malloc fails.
|
|
|
|
| |
Syslog error outside of mutex section.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The OpenAIS checkpoint library is going away; therefore, cmirrord must
operate without it. The algorithms the handle the timing of when to send
a checkpoint, the determination of what to send, and which ongoing cluster
requests are relevent with respect to the checkpoints are unaffected. We
need only replace the functions that actually perform the storing/transmitting
and retrieving/receiving of the checkpoint data. Rather than store the
checkpoint data in an OpenAIS checkpoint file, we simply transmit it along
with the message that notifies the incoming node that the checkpoint is
ready.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
also add support for new OOM killer adjustment interface.
This code is already a part of dmeventd, but it's modified slightly to check
sockets instead of FIFOs.
|
|
|
|
|
|
| |
Drop whole buffer clearing (most messages at <100 bytes).
Just make sure we have always \0 terminated string for strlen() operations.
(before for PIPE_BUF sized messages this was not set).
|