| 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
(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)
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
In case of zero length message, there would be a memory leak on
return path from _do_process_request.
|
|
|
|
|
| |
Use %m for strerror.
Switch to use 0 for fail return code.
|
|
|
|
| |
Adding (void) where we cannot really report an error.
|
| |
|
|
|
|
| |
Syslog error outside of mutex section.
|
| |
|
| |
|
| |
|
|
|
|
| |
Using enum for bitmask is not proper solution here.
|
|
|
|
|
| |
Some 'defines' used in this specific code were already under an ifdef so this
patch just completes it.
|
|
|
|
| |
lvm.conf *and* lvmetad is running.
|
|
|
|
|
| |
If the fifo died because of dmeventd restart - do not wait for 20s
in select - it will not get better and return error immediately.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Check pointer from strchr for NULL instead of crash later.
Badly formated message would have crash dmeventd otherwise.
|
| |
|
|
|
|
| |
Variables have (or will have) those values set.
|
|
|
|
|
|
|
| |
As atoi may return negative value - test for both limits.
Test log_args for limits before calling alloca().
Code from dmeventd mirror plugin should probably share same code as
we have in mirrored.c.
|
|
|
|
| |
dmeventd plugins. Fixes RHBZ 771419.
|
|
|
|
| |
Since the code may go in error path, set to defined NULL.
|
|
|
|
|
| |
Do not shortcut to 'meta' and stay with 'metadata'
Also matches kernel doc for dm API then.
|
|
|
|
|
|
|
| |
For snapshot, prepare whole command in front into private buffer.
Add also some missing '\n' for syslog messages.
For raid and mirror only convert creation of command line string.
This should avoid any unbound growth of mempool for dm_split_names.
|
|
|
|
|
|
| |
Fix some minor outstading issue from thin plugin introduction -
Call dmeventd_lvm2_exit() in failpath for registration.
Add some missing '\n' in syslog messages.
|
|
|
|
| |
Since this code is in all plugins - create a common helper function.
|
|
|
|
|
|
| |
Update man page style.
Mention raid and thin plugins.
Update help text printed by command to match man page.
|
| |
|
|
|
|
|
| |
This is basic version with still few unresolved issue mainly in case,
when the pool resize is failing.
|
|
|
|
|
| |
For manipulation with thread list to avoid race with timeout thread,
take also _timeout_mutex.
|
|
|
|
|
|
|
|
| |
The RAID plug-in for dmeventd now calls 'lvconvert --repair' to address failures
of devices in a RAID logical volume. The action taken can be either to "warn"
or "allocate" a new device from any spares that may be available in the
volume group. The action is designated by setting 'raid_fault_policy' in
lvm.conf - the default being "warn".
|
|
|
|
| |
would grow with subsequent snapshot extensions (RHBZ 754198).
|
|
|
|
|
|
|
|
| |
udev may also need to be disabled if you didn't build it statically too.
dmeventd.static could be fixed with some more work but I don't really see the
point: without dlopen() it's useless, and if you have dlopen(), why not support
normal shared libraries too?
|
|
|
|
|
| |
extension, in the snapshot dmeventd plugin. The reporting is done as needed by
the LVM command nowadays.
|
|
|
|
|
|
|
|
|
| |
monitoring state of the logical volumes they are currently acting on.
Until now, every time a logical volume has been changed by a dmeventd plugin,
this plugin would have called back to dmeventd through the external FIFO
mechanism. I am fairly sure this was superfluous, inefficient and possibly even
dangerous.
|