Milan Broz
756c6f8560
Fix clvmd if compiled with gulm support. (2.02.26)
2007-07-24 15:35:11 +00:00
Jim Meyering
6fa6ce35da
libdevmapper, dmeventd: be paranoid about detecting write failure
...
* dmeventd/dmeventd.c (_set_oom_adj): When writing to /proc/self/oom_adj,
detect failure even if it's hidden behind ferror. [Using dm_fclose's
extra ferror test here is probably not needed, since the amount written
is nowhere near BUFSIZ, but use it regardless, for consistency. ]
* lib/fs/libdevmapper.c (do_suspend): Detect fclose failure when
writing to suspend.
2007-07-24 14:16:48 +00:00
Jim Meyering
1ec0d47f10
Use gcc's printf attribute wherever possible.
...
* daemons/clvmd/clvmd.h (debuglog): Add __attribute__((printf)).
* lib/config/config.c (_line_append): Likewise.
* lib/misc/lvm-string.h (emit_to_buffer): Likewise.
2007-07-20 15:38:19 +00:00
Patrick Caulfield
49cae61254
Tidy bits of clvmd-openais and improve an error report.
2007-07-11 12:07:39 +00:00
Patrick Caulfield
fe16df2e6f
Use cpg_local_get() rather then Clm to get the local nodeid.
2007-06-25 09:02:37 +00:00
Patrick Caulfield
8da9ec3599
Remove system-lv.[ch]
2007-06-14 10:17:12 +00:00
Patrick Caulfield
01fdf84d69
Remove system LV code from clvmd. It's never been used and never should be
...
used! It's removal tidies a number of code paths inside clvmd.
2007-06-14 10:16:35 +00:00
Patrick Caulfield
bf97034485
Add *Experimental* OpenAIS support to clvmd.
2007-05-21 10:52:01 +00:00
Patrick Caulfield
52ada4853c
Misc clvmd cleanups from Jim Meyering
2007-05-02 12:22:40 +00:00
Patrick Caulfield
c2b27a8298
Add some more debuglogs to clvmd startup.
2007-05-02 08:23:36 +00:00
Alasdair Kergon
2294fdb496
Change some #include lines to search only standard system directories.
2007-04-27 17:46:16 +00:00
Patrick Caulfield
d6c8e1df61
Fix thread race in clvmd.
2007-04-24 15:13:13 +00:00
Petr Rockai
5ec7c8fece
Fix the regression introduced by dmeventd leak fixes.
2007-04-24 13:29:02 +00:00
Petr Rockai
228486a971
Fix some memory leaks in dmeventd.
2007-04-23 15:06:03 +00:00
Patrick Caulfield
88c0caab26
Make clvmd cope with quorum devices in RHEL5
...
bz#237386
2007-04-23 14:55:28 +00:00
Milan Broz
2e21519a10
Fix libdevmapper-event memory leaks
2007-04-19 19:10:19 +00:00
Patrick Caulfield
b9f7f30158
Add some extra error checking & robustness.
...
Thanks to the Crosswalk engineering team:
Leonard Maiorani
Henry Harris
Scott Cannata
2007-03-29 13:59:33 +00:00
Alasdair Kergon
bf83527b64
Remove unnecessary memset() return value checks. [Jim Meyering]
2007-03-16 14:36:14 +00:00
Alasdair Kergon
a223c3fea3
Improve dmeventd messaging protocol: drain pipe and tag messages.
2007-02-02 17:08:51 +00:00
Alasdair Kergon
cb120ddb15
dmeventd mirror sets ignore_suspended_devices and avoids scanning mirrors.
2007-01-25 23:32:29 +00:00
Alasdair Kergon
f813d41a76
Add some missing close() and fclose() return code checks.
...
Fix exit statuses of reporting tools (2.02.19).
2007-01-25 14:37:48 +00:00
Alasdair Kergon
d851289d8a
Add some missing close() and fclose() return value checks.
2007-01-25 14:16:20 +00:00
Alasdair Kergon
317e588efd
Add private variable to dmeventd shared library interface.
2007-01-23 17:40:40 +00:00
Alasdair Kergon
b1d32a03c7
add a dso-private variable to dmeventd interface
...
more inline docn
2007-01-23 17:38:39 +00:00
Alasdair Kergon
9d944d6cf9
Fix refresh_toolcontext() always to wipe persistent device filter cache.
...
Add is_long_lived to toolcontext.
2007-01-23 15:58:06 +00:00
Alasdair Kergon
63e4217271
Add dm_event_handler_[gs]et_timeout functions.
...
Streamline dm_report_field_* interface.
2007-01-22 15:03:57 +00:00
Alasdair Kergon
f4bd12e8e9
register->monitor etc.
2007-01-19 22:21:45 +00:00
Alasdair Kergon
df15f46900
var dev_name->device_name (lvm2 has dev_name())
2007-01-19 20:42:09 +00:00
Alasdair Kergon
fb3a732361
fix exit status; always print message on child failure
2007-01-19 18:08:36 +00:00
Alasdair Kergon
2d74110feb
Add cmdline debug & version options to dmeventd.
...
Fix oom_adj handling.
2007-01-19 17:22:17 +00:00
Alasdair Kergon
44c6c36c43
stat oom_adj and stay silent if it doesn't exist
...
dm_event_handler now keeps private copies of strings
2007-01-17 14:45:10 +00:00
Alasdair Kergon
af13ccddda
more fixes
2007-01-16 23:03:13 +00:00
Alasdair Kergon
392e1bc2e8
more little fixes
2007-01-16 21:13:07 +00:00
Alasdair Kergon
9268d92c70
clean up global mutex usage and fix a race in thread finalisation code
...
properly clean up thread status when thread terminates from within
2007-01-16 20:27:07 +00:00
Alasdair Kergon
bb3366c07d
dmeventd oom_adj + reduce thread stack size
2007-01-16 20:13:04 +00:00
Alasdair Kergon
954bd9257b
Add basic reporting functions to libdevmapper.
2007-01-16 18:04:15 +00:00
Alasdair Kergon
5d51a56c02
reduce some if/else complexity
2007-01-15 22:37:40 +00:00
Alasdair Kergon
f48648552e
Fix a malloc error path in dmsetup message.
2007-01-15 22:05:50 +00:00
Alasdair Kergon
01dc83b936
fix recent checkins
2007-01-15 19:47:49 +00:00
Alasdair Kergon
3a8dff3a62
fail registration if timeout thread cannot be started
2007-01-15 19:19:31 +00:00
Alasdair Kergon
13b234ccba
use DMEVENTD_PATH
2007-01-15 19:11:58 +00:00
Alasdair Kergon
e451e93664
static naming
2007-01-15 18:58:40 +00:00
Alasdair Kergon
b4f9531475
Some libdevmapper-event interface changes.
2007-01-15 18:22:02 +00:00
Alasdair Kergon
3184ff75c4
More libdevmapper-event interface changes and fixes.
...
Rename dm_saprintf() to dm_asprintf().
2007-01-15 18:21:01 +00:00
Alasdair Kergon
c975a100b1
Report dmeventd mirror monitoring status.
2007-01-12 20:38:30 +00:00
Alasdair Kergon
02bf389425
Reinstate dm_event_get_registered_device
2007-01-12 20:22:11 +00:00
Alasdair Kergon
2b48fad426
updated dmeventd interface
2007-01-11 22:24:32 +00:00
Alasdair Kergon
d554b2bc94
Lots of dmeventd-related changes.
2007-01-11 21:54:53 +00:00
Alasdair Kergon
f66943de43
fail if status args are missing
2007-01-11 20:11:19 +00:00
Alasdair Kergon
9d1e9bc2fb
Remove dmeventd mirror status line word limit
2007-01-11 19:52:06 +00:00
Alasdair Kergon
2d6a014920
Use CFLAGS when linking so mixed sparc builds can supply -m64
2007-01-11 17:12:27 +00:00
Alasdair Kergon
c1952bf257
Use CFLAGS when linking so mixed sparc builds can supply -m64.
2007-01-11 16:23:22 +00:00
Alasdair Kergon
7c9920d982
fix last checkin
2007-01-08 15:35:08 +00:00
Alasdair Kergon
cbdccf0a9c
Lots of dmevent changes.
...
Export dm_basename().
Cope with a trailing space when comparing tables prior to possible reload.
2007-01-08 15:18:52 +00:00
Alasdair Kergon
64fa83ec3f
Add dmeventd_mirror register_mutex, tidy initialisation & add memlock.
2007-01-08 14:24:20 +00:00
Alasdair Kergon
66e623fb2a
Fix dmeventd mirror to cope if monitored device disappears.
2006-12-20 14:35:02 +00:00
Patrick Caulfield
9dee30ff0e
Fix gulm operation of clvmd. including a hang when attempting to
...
exclusively lock an LV that is already locked no another node.
2006-12-11 14:00:26 +00:00
Patrick Caulfield
f91aadbea8
Fix hang in clvmd if a pre-command failed. The pre/post thread was getting
...
out of sync in this instance and would not quit.
2006-12-11 13:48:41 +00:00
Alasdair Kergon
b9ba9ffad2
clvmd ia64 alignment fixes etc. (pjc)
2006-12-01 23:10:26 +00:00
Alasdair Kergon
642be5d16c
Fix VG clustered read locks to use PR not CR.
...
VG metadata reads were not being locked out during metadata updates.
2006-12-01 22:48:47 +00:00
Patrick Caulfield
1cd8c849b8
Always compile debug logging into clvmd as it's too useful to
...
restrict to just developers.
-d will switch it on and run the daemon in the foreground
2006-11-30 13:19:42 +00:00
Patrick Caulfield
d2b7cfa2d1
Add -T (startup timeout) switch to clvmd
2006-11-30 09:44:07 +00:00
Jonathan Earl Brassow
94b2e29cb1
- likely cut and paste error. Fix wrong function name in debug
...
output.
2006-10-24 18:49:31 +00:00
Patrick Caulfield
4e2f240c98
Add clvmd call to return the cluster name.
2006-10-09 14:11:57 +00:00
Patrick Caulfield
cd95a0df7b
Use strncpy rather than strcpy
2006-10-06 10:06:37 +00:00
Patrick Caulfield
82fa497c16
Fix clvmd bug that could cause it to die when a node with a long name crashed.
2006-10-06 10:06:10 +00:00
Patrick Caulfield
8233cfd371
Vastly improve the errors returned to the user from clvmd.
...
It now captures the error messages that are generated and returns them
in the reply packet rather than just telling the user to check syslog.
2006-10-05 13:55:50 +00:00
Patrick Caulfield
f1604c3e69
Add -R switch to clvmd.
...
This option will instruct all the clvmd daemons in the cluster to reload their device cache
2006-10-04 08:22:16 +00:00
Patrick Caulfield
8c2e37381a
Stop clvmd complaining about nodes that have left the cluster
2006-08-24 12:45:05 +00:00
Patrick Caulfield
5824f992b7
Add needed new parameter to create_toolcontext().
2006-08-22 09:49:20 +00:00
Alasdair Kergon
a93fe79bc4
Add dm_split_words() and dm_split_lvm_name() to libdevmapper.
2006-08-21 12:07:03 +00:00
Alasdair Kergon
177bd565ac
Add mutex to dmeventd_mirror to avoid concurrent execution.
2006-07-04 18:57:27 +00:00
Alasdair Kergon
608eedf88d
Fix lvcreate corelog validation.
...
Add --config for overriding most config file settings from cmdline.
Quote arguments when printing command line.
Remove linefeed from 'initialising logging' message.
Add 'Completed' debug message.
Don't attempt library exit after reloading config files.
Always compile with libdevmapper, even if device-mapper is disabled.
2006-05-16 16:48:31 +00:00
Patrick Caulfield
c868b1fee2
Add needed include.
2006-05-15 12:32:08 +00:00
Alasdair Kergon
22374f718f
fix compile
2006-05-15 11:56:15 +00:00
Alasdair Kergon
445dd17db3
Add --monitor to vgcreate and lvcreate to control dmeventd registration.
...
Propagate --monitor around cluster.
Filter LCK_NONBLOCK in clvmd lock_vg.
2006-05-12 19:16:48 +00:00
Alasdair Kergon
2897eb3cb3
Add mirror log fault-handling policy.
2006-05-11 19:45:53 +00:00
Alasdair Kergon
bacfb913a0
Avoid a dmeventd compiler warning.
2006-05-11 19:08:02 +00:00
Alasdair Kergon
c99d0236a0
Propagate nosync flag around cluster.
2006-05-11 19:05:21 +00:00
Alasdair Kergon
654f5049eb
Move DEFS into configure.h.
...
Remove dmsetup line buffer limitation.
2006-05-10 19:38:25 +00:00
Alasdair Kergon
45dca55fc8
Make SIZE_SHORT the default for display_size().
...
Fix some memory leaks in error paths found by coverity.
Use C99 struct initialisers.
Move DEFS into configure.h.
Clean-ups to remove miscellaneous compiler warnings.
2006-05-09 21:23:51 +00:00
Alasdair Kergon
85877000a6
tweak .so loading messages; extra device_exists() sanity check
2006-04-28 14:08:04 +00:00
Alasdair Kergon
f95dbff71f
fix makefile
2006-04-19 17:32:05 +00:00
Alasdair Kergon
098f6830a6
fix makefile
2006-04-19 17:24:00 +00:00
Alasdair Kergon
590b654251
fix makefile
2006-04-19 17:15:08 +00:00
Alasdair Kergon
dcca7638e0
make pkgconfig installation step optional, and clean up generated files
2006-04-19 16:38:56 +00:00
Alasdair Kergon
70e45ad37b
Check for libsepol.
...
Add some cflow & scope support.
Separate out DEFS from CFLAGS.
Remove inlines and use unique function names.
2006-04-19 15:33:07 +00:00
Alasdair Kergon
db88210289
configure/makefile tidying + pkg-config support.
2006-04-19 15:23:10 +00:00
Patrick Caulfield
d648832a2d
allow new cman to shutdown on request.
2006-03-21 10:31:08 +00:00
Patrick Caulfield
f06833fbd2
Make sure it compiles if gulm is NOT selected AND using an old libcman.h
2006-03-15 08:36:11 +00:00
Patrick Caulfield
c561addc94
Get clvmd to use libcman rather than cman ioctl calls. This makes
...
it forward-compatible with the new userland CMAN in cluster head.
To build it you will need the libcman header & library installed.
2006-03-14 14:18:34 +00:00
Alasdair Kergon
1273f179e8
Propagate partial mode around cluster.
2006-03-09 22:34:13 +00:00
Alasdair Kergon
5d02f60bde
dmeventd thread/fifo fixes.
2006-03-09 21:33:59 +00:00
Alasdair Kergon
ea80ab2cae
post-release
...
fix dmeventd build
2006-02-08 23:23:19 +00:00
Alasdair Kergon
b0473bffcb
remove a dmeventd_mirror syslog message
2006-02-06 19:34:45 +00:00
Alasdair Kergon
49d3037e87
fix tabs
2006-02-03 21:34:11 +00:00
Alasdair Kergon
37ad2bd4e8
tweak clvmd makefile
2006-02-03 21:31:00 +00:00
Alasdair Kergon
7d7b332b02
Temporary device_exists() fixes.
2006-02-03 19:44:59 +00:00
Alasdair Kergon
ac033b8612
Use supplied full dso name.
2006-02-03 19:41:34 +00:00
Alasdair Kergon
7fb7c86c46
fix libdevmapper-event-mirror liblvm2cmd link search path
2006-02-03 14:48:38 +00:00
Alasdair Kergon
17e298ad2a
Only do lockfs filesystem sync when suspending snapshots.
...
Switchover library building to use LIB_SUFFIX.
2006-01-31 14:52:30 +00:00
Alasdair Kergon
d031a374f9
Rename _log to dm_log and export.
...
Fix misc compile-time warnings.
2006-01-31 14:50:38 +00:00
Alasdair Kergon
71f2e4306d
Tidy some comments/messages.
2006-01-27 20:52:21 +00:00
Alasdair Kergon
f8af23a025
Fix renamed dso.
2006-01-27 20:51:36 +00:00
Alasdair Kergon
4ef55a6cd3
dmeventd thread termination fix
2006-01-27 20:50:01 +00:00
Alasdair Kergon
312f866723
some init_client cleanup
2006-01-27 20:49:13 +00:00
Alasdair Kergon
0ebe1f6dec
More dmeventd mirror cleanups.
2006-01-27 20:48:19 +00:00
Alasdair Kergon
2ad92e0e6e
Remove avoidable dmeventd mirror forking.
2006-01-27 20:47:20 +00:00
Alasdair Kergon
ac8823cdcf
Fix libdevmapper event daemon_running status.
2006-01-27 20:46:06 +00:00
Alasdair Kergon
77565f7ee4
Replace deprecated signal functions.
2006-01-27 20:45:17 +00:00
Alasdair Kergon
d656d90fa8
Use split_dm_name in dmeventd mirror code.
2006-01-27 20:43:52 +00:00
Alasdair Kergon
cd6568db69
fix dmevent registration return codes
2006-01-27 20:01:45 +00:00
Alasdair Kergon
85c818a39e
read/write loop fixes
2005-12-19 22:56:47 +00:00
Alasdair Kergon
8825157fbb
Change dm_tree_node_add_mirror_target_log parm order
2005-12-19 21:03:17 +00:00
Alasdair Kergon
6a22ad0171
comments
2005-12-13 13:34:31 +00:00
Alasdair Kergon
cf703b0433
Fix dmeventd build.
2005-12-05 11:16:48 +00:00
Alasdair Kergon
c0197a72d3
fix exports
2005-12-02 21:00:33 +00:00
Alasdair Kergon
b8b029b7d3
Add mirror dmeventd library
2005-12-02 19:52:06 +00:00
Alasdair Kergon
ab931b177d
dmeventd updates
2005-12-02 15:39:16 +00:00
Patrick Caulfield
3c2a4370a5
Make it compile with debug enabled.
2005-11-10 08:49:29 +00:00
Patrick Caulfield
5ae2693241
Use hash functions in libdevmapper.
2005-11-09 09:24:10 +00:00
Alasdair Kergon
67eb7723d6
Use hash, bitset, malloc, pool from libdevmapper.
2005-10-16 23:03:59 +00:00
Patrick Caulfield
e52f022026
clvmd no longer takes out locks for non-clusteed LVs,
...
and non-clustered LVs are only activated on the local node.
2005-08-16 08:25:09 +00:00
Alasdair Kergon
a0aedf299a
Prepare tools to support clustered mirrors.
2005-08-14 23:18:28 +00:00
Patrick Caulfield
7a8ea2ac93
Don't send a signal to kill threads that are idling nicely as it upsets them.
...
This seems to cure bz#159727 on SMP systems.
Alasdair, can you include this patch in the lvm2-cluster package please ?
2005-08-09 10:39:57 +00:00
Benjamin Marzinski
b85f99c140
Fixing some makesfiles, so that the correct things link against pthreads.
...
Also changed dmevent so that in no longer links against pthreads, and
dynamically loads libdmevent.so. Everything seems to work just fine like this.
2005-06-14 19:06:26 +00:00
Patrick Caulfield
ca4e0c973a
Log an error if clvmd can't resolve a host name got from CCS
...
Fix potential spin loop in clvmd
2005-06-14 10:35:02 +00:00
Patrick Caulfield
8e526ba1bf
Don't defer closing of FDs in clvmd as it can cause trouble.
2005-06-13 10:16:21 +00:00
Patrick Caulfield
6c6165c9f5
Be a bit smarter about reading stuff from the sockets
2005-06-10 09:11:01 +00:00
Benjamin Marzinski
853460b20d
Timeout event implementation:
...
The daemon side of this is mostly the same as the patch I sent out. To select
a timeout period different than the default and to get the timeout period,
I added two library calls, dm_set_event_timeout() and dm_get_event_timeout().
If people are against them, the other option is to tack extra arguments onto
dm_regiser_for_event() and dm_get_registered_device(). I also added a
-t option to dmevent, so people can try out timeouts.
2005-06-09 18:40:49 +00:00
AJ Lewis
7bc04fbad3
Change the multilog code to toggle between async and sync writes for all
...
log types. This means the threaded_syslog type is no longer valid. A new
fxn multilog_async is available to toggle between the two modes. If an
app is compiled without pthreads and tries to use async logging, no logging
will occur while async is enabled.
dmeventd has been modified to use the new code
I'm not positive I like the way the async_logger code calls the log fxn,
but it works for now. Suggestions for other ways to do it would be helpful
2005-05-25 21:08:36 +00:00
Heinz Mauelshagen
f1060fc88e
Exit after last unregister_for_event()
2005-05-20 13:53:26 +00:00
AJ Lewis
88f9534685
o Changed the multilog API a bit (I warned you)
...
- multilog_add_type, multilog_del_type, multilog_custom, and
multilog_init_verbose all have different arguments.
- Primary change is that caller only passes in config info, and the
lib keeps track of state internally. No more exporting of
'struct log_data'.
- Custom callers now only get the custom data pointer passed into their
log fxn (that is set with multilog_custom)
- Added basic README that describes libmultilog
2005-05-09 18:44:35 +00:00
Benjamin Marzinski
45952cbdf2
oops. Those are char **'s not char *'s
2005-05-04 19:24:03 +00:00
Benjamin Marzinski
b355dd7b23
fixed dmevent so that it doesn't do a double free when you run
...
# dmevent -l
Also, changed the behaviour of dm_get_registered_device(), so that it doesn't
change the pointer you passed in without freeing the memory on a non-next call,
and doesn't free your pointer without setting it to NULL on a failed next call.
2005-05-04 18:53:28 +00:00
Heinz Mauelshagen
48a186f172
o libmultilog needs introducing of list locking in order to stand
...
multilog_add_type()/multilog_del_type cycles correctly.
o fixed segfault in multilog_add_type()
o fixed test-multilog.c
o cleaned up libmultilog (list macros, indentation, braces, comments)
2005-05-04 11:52:07 +00:00
Jonathan Earl Brassow
39dc7ec2ab
- make noop use multilog
...
- add event_nr to thread_status struct and set appropriately so that the
thread actually waits for an event
- essentially make error_detected return true. Let the DSOs determine
how to interpret the status info
2005-05-04 01:57:31 +00:00
AJ Lewis
2fedabd3b9
o stick multilog into the dm-event lib and dmeventd code again
...
o more tweaks to libmultilog calls - the api isn't set in stone yet, so
don't get too comfortable.
o not sure the dmeventd in device-mapper/dmeventd works - i've been using
the one in lib/event/
o currently both daemons are set to log only to syslog
2005-05-03 21:29:13 +00:00
Heinz Mauelshagen
40e896bc5b
working dm_get_registered_device(). dmevent.c update to use it.
2005-05-03 16:15:20 +00:00
Heinz Mauelshagen
3e940f80c7
more dm_get_registered_device() code
2005-05-03 13:50:42 +00:00
Benjamin Marzinski
dbf2888d43
dmeventd was looking for dsos with libdmeventd<name>.so
...
The Makefile turned noop.c into libdmeventnoop.so
The Makefile now turns noop.c into libdmeventdnoop.so
2005-05-02 19:34:25 +00:00
Benjamin Marzinski
d412355324
stopped printing a string after we erased the pointer to it.
2005-05-02 18:43:23 +00:00
Benjamin Marzinski
178732217f
removed the -lmultilog for now.
2005-05-02 18:42:07 +00:00
Benjamin Marzinski
de17b95c3d
get the makefile to clean up the .o's
2005-05-02 17:41:54 +00:00
Heinz Mauelshagen
d14e774525
Introduce exit() in main() and cleanup signal settings for parent/child
2005-05-02 11:02:19 +00:00
Benjamin Marzinski
ca5402a7fa
more variable initialization.
2005-04-29 22:12:09 +00:00
Heinz Mauelshagen
da36c286a6
o checking in instrumented code for AJ to follow up on comms and logging
...
o changed
int dm_get_next_registered_device(char **dso_name, char **device,
enum event_type *events);
to
int dm_get_registered_device(char **dso_name, char **device,
enum event_type *events, int next)
so that the daemon is able to retrive the next one of the list without
running into locking issues.
o changed dmevent.c to use dm_get_registered_device()
o couldn't test this yet because of the comms issues
(daemon exits in do_process_request())
2005-04-29 14:56:35 +00:00
Heinz Mauelshagen
d3901bcf2e
first changes to get comms back to work after flock changes
2005-04-29 13:41:25 +00:00
Heinz Mauelshagen
94c8d4fdfb
minor cleanup
2005-04-29 10:58:34 +00:00
AJ Lewis
ab8bdc18bb
o Build dmeventd against multilog
2005-04-28 22:47:52 +00:00