summaryrefslogtreecommitdiffstats
path: root/daemons
Commit message (Collapse)AuthorAgeFilesLines
* clvmd,lvmetad: check for fcntl resultZdenek Kabelac2012-08-231-1/+2
| | | | Report any problem of fcntl.
* cleanup: add error message and simplify creationZdenek Kabelac2012-08-231-7/+3
| | | | | Report error for malloc failure, and use zeroed allocation to initialize handler structure.
* cleanup: drop unneeded included header filesZdenek Kabelac2012-08-236-12/+0
| | | | | This headers were not resolving anything used for compiled .c files. Remove unused util.c file.
* cmirrord: check for result of chdirZdenek Kabelac2012-08-231-1/+5
| | | | Error exit if chdir fails.
* clvmd: release excl_uuid hashZdenek Kabelac2012-08-231-1/+2
| | | | Release allocated hash before exit.
* libdaemon: Draft logging infrastructure.Petr Rockai2012-08-081-46/+33
| | | | | | | | | | | - 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
* lvmetad: Fix an obscure error message.Petr Rockai2012-07-311-2/+1
|
* configure: run directory configuration cleanupPeter Rajnoha2012-06-272-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* cleanup: replace memset with struct initilizationZdenek Kabelac2012-06-227-41/+36
| | | | | Simplifies the code, properly detects too long socket paths, drops unused parameter.
* cmirrord: add missing checks for kernel_sendZdenek Kabelac2012-06-202-4/+9
| | | | Log errors if kernel_send fails.
* cmirrord: fix cut&pasteZdenek Kabelac2012-06-201-1/+1
|
* cmirrord: add test for closedir() and close()Zdenek Kabelac2012-06-202-8/+19
|
* dmeventd: Improve comment about repeated DIE msgsAlasdair G Kergon2012-06-081-1/+4
|
* Fix bug in cmirror that caused incorrect status info to print on some nodes.Jonathan Earl Brassow2012-04-262-3/+3
| | | | | | | | | | | | | | | | 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.
* Synchronize with self-destruction of dmeventdZdenek Kabelac2012-04-241-0/+7
| | | | | | | | 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.
* Update singlenode lockingZdenek Kabelac2012-04-241-64/+59
| | | | | | Support lock conversion Work also with LCK_READ TODO: do more validation.
* Commit ID 46a75dedb4f6aa815a804f27cafbd3fd16a62011 consolidated code from theJonathan Earl Brassow2012-04-101-0/+5
| | | | | | | | | | | 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.
* Avoid closing clvmd socket twice.Milan Broz2012-03-271-0/+2
|
* Add fixmesZdenek Kabelac2012-03-231-1/+3
| | | | There is missing some proper reaction when update fails ?
* Always free hash tableZdenek Kabelac2012-03-231-3/+6
| | | | also in error path
* Return mem fail if hash insert failsZdenek Kabelac2012-03-231-1/+2
|
* Make sure namelen fits into buffer allocated on stackZdenek Kabelac2012-03-231-0/+3
|
* Update debug messageZdenek Kabelac2012-03-231-1/+1
| | | | (compiled only with special debug define)
* Fix check for passed in path for dmeventd startupZdenek Kabelac2012-03-201-2/+2
| | | | | Check passed in executable path for dmeventd instead of predefined compiled in path which is not the thing to be executed.
* Remove dmeventd fifos on exit if they are not managed by systemd.Peter Rajnoha2012-03-151-2/+11
|
* Use SD_ACTIVATION env. var. in systemd units to better detect systemd in use.Peter Rajnoha2012-03-141-0/+6
| | | | | | | | 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.
* Do not run a new dmeventd instance on restart if there's no existing one.Peter Rajnoha2012-03-141-2/+2
|
* We need longer window for checking read from fifo.Zdenek Kabelac2012-03-121-1/+1
| | | | | Seems like some dmeventd startups are taking more time then expected, so make the time window longer here.
* Remove some whitespaces.Milan Broz2012-03-101-6/+6
| | | | (Test commit.)
* Remove some whitespaces.Milan Broz2012-03-106-16/+16
| | | | (test commit)
* Code refactoringZdenek Kabelac2012-03-021-14/+16
| | | | | | Properly test for dm_asprintf result. Keep unlocking of mutex in the same function and do not spread lock and unlock over functions.
* List _thread_registry missed mutexZdenek Kabelac2012-03-021-2/+4
| | | | | Operation on _thread_registry needs to be covered by mutex. Cosmetic move a die code after free for valgind short leak list.
* Pass struct device around internally rather than dev_t.Alasdair Kergon2012-03-021-6/+8
| | | | | | | 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.
* Add traceback for failpathZdenek Kabelac2012-03-011-1/+1
|
* Skip zero length messagesZdenek Kabelac2012-03-011-3/+4
| | | | | In case of zero length message, there would be a memory leak on return path from _do_process_request.
* Check allocated pointersZdenek Kabelac2012-03-011-63/+135
| | | | | | Test pointers from allocation against NULL. Error paths should be checked, some of them probably need some extesions.
* Improve loggingZdenek Kabelac2012-03-011-22/+21
| | | | | Use %m for strerror. Switch to use 0 for fail return code.
* Debug log for hold_lock failureZdenek Kabelac2012-03-011-1/+2
|
* Correct enum typeZdenek Kabelac2012-03-012-4/+4
| | | | Using debug_t and some forgetten alloc_policy_t, force_t from past commit.
* Few more close and dev_close traceZdenek Kabelac2012-03-012-8/+10
| | | | Adding (void) where we cannot really report an error.
* s/CPG_/CS_: Various CPG constants are going away, even though CPG itself staysJonathan Earl Brassow2012-03-011-8/+8
| | | | | | | | | | 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
* More useful debug messageZdenek Kabelac2012-03-011-1/+1
|
* Check for allocation errorZdenek Kabelac2012-03-011-4/+13
| | | | return ENOMEM when malloc fails.
* Log fail of pthread_joinZdenek Kabelac2012-03-011-1/+5
| | | | Syslog error outside of mutex section.
* Allow cluster mirrors to handle the absence of the checkpoint lib (libSaCkpt).Jonathan Earl Brassow2012-02-291-22/+115
| | | | | | | | | | | | 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.
* Reflect new file locations, include file updates etc.Alasdair Kergon2012-02-287-29/+43
|
* remove old makefileAlasdair Kergon2012-02-281-22/+0
|
* move daemon filesAlasdair Kergon2012-02-286-982/+0
|
* Check for failing dm_asprintfZdenek Kabelac2012-02-281-8/+14
|
* Add support for systemd socket handover for common daemon-server code and ↵Peter Rajnoha2012-02-281-19/+138
| | | | | | | 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.