1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
Commit Graph

74 Commits

Author SHA1 Message Date
Peter Rajnoha
03315d77f1 Add LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES environment variable to suppress error
and warning mesages while --ignorelockingfailure is used.
2010-02-15 16:46:56 +00:00
Alasdair Kergon
7ef5fbdbe6 Use _LOG_FATAL when aborting on an internal error. 2010-01-11 20:41:39 +00:00
Alasdair Kergon
b1482c52b7 Internal errors triggering abort cannot be suppressed. (kabi) 2010-01-11 20:30:32 +00:00
Petr Rockai
d6053080f8 #define an INTERNAL_ERROR macro and use it throughout LVM. 2009-12-16 19:22:11 +00:00
Petr Rockai
b7e19d2fe3 If aborting due to an internal error, always print the message causing this. 2009-12-01 13:54:27 +00:00
Petr Rockai
d8130a99b4 Optionally abort on internal errors (and leverage this option in the
testsuite). (This is showing a problem in the pvmove test for me, so I expect
the tests to start failing -- this needs to be fixed separately though.)
2009-11-30 17:17:11 +00:00
Alasdair Kergon
b88fe43808 Fix so only log_error and log_fatal set EUNCLASSIFIED. 2009-07-16 13:13:33 +00:00
Dave Wysochanski
e176789891 Change default errno value to 0 (no error) and add prototypes in lvm.h
Since we are using errno values, we should use '0' as a default value
which indicates a non-error, rather than defining some made-up default
value that is not defined in errno.  If we need to deviate from errno
values, this will most likely indicate a flaw in our design.

Add prototypes for lvm_errno and lvm_errmsg inside lvm.h and provide
a basic description of their function.  This fixes a couple compile
warnings.


Author: Dave Wysochanski <dwysocha@redhat.com>
2009-07-16 03:07:45 +00:00
Alasdair Kergon
5e3369aba3 Add log_errno to set a specific errno and replace log_error in due course. 2009-07-16 00:52:06 +00:00
Alasdair Kergon
7b0fcd79a0 Add lvm_errno and lvm_errmsg to liblvm to obtain failure information.
Change create_toolcontext to still return an object if it fails part-way.
Add EUNCLASSIFIED (-1) as the default LVM errno code.
2009-07-16 00:36:59 +00:00
Alasdair Kergon
0ed40c04c7 Store any errno and error messages issued while processing each command.
(Enabled by default while we test it, but in due course we'll only store
the error messages when we need to.)
2009-07-15 23:57:54 +00:00
Alasdair Kergon
7e7274b002 Add dm_log_with_errno and dm_log_with_errno_init, deprecating the old
Change plog to use dm_log_with_errno unless deprecated dm_log_init was used.
Rename plog macro to LOG_LINE and use in dm_dump_memory_debug.
2009-07-10 09:59:37 +00:00
Alasdair Kergon
05329c885a more tweaking to get things to compile - dmlib.h for log fns, list.h 2008-11-03 18:59:59 +00:00
Alasdair Kergon
759e49f025 Split out lvm-logging.h from log.h. 2008-10-30 17:27:28 +00:00
Alasdair Kergon
95d43e17b3 Improve the way VGs with PVs missing are handled so manual intervention
is required in fewer circumstances.  (mornfall)
2008-09-19 06:42:00 +00:00
Dave Wysochanski
c54a8a2e10 Fix identifier 'error_message_produced' used ambiguously.
Related compiler warning:
log/log.c:242: warning: declaration of 'error_message_produced' shadows a global declaration
../include/log.h:98: warning: shadowed declaration is here
2008-06-17 14:14:00 +00:00
Alasdair Kergon
6a336dfc69 post-release 2008-06-06 19:28:35 +00:00
Alasdair Kergon
af40fdb285 back out unnecessary changes for this release 2008-06-06 17:36:19 +00:00
Alasdair Kergon
b7fc2d1147 In script-processing mode, stop if any command fails.
Warn if command exits with non-zero status code without a prior log_error.
2008-05-30 15:27:44 +00:00
Milan Broz
6a987d46bf Fix output if overriding command_names on cmdline. 2008-04-07 13:53:26 +00:00
Alasdair Kergon
1ddd4509dc Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
Alasdair Kergon
3f507a26fb Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
Jim Meyering
5e84cb560d Detect stream write failure reliably; new fn: lvm_fclose; use dm_fclose
* lib/misc/lvm-file.c (lvm_fclose): New function.
* lib/misc/lvm-file.h (lvm_fclose): Declare it.
* lib/config/config.c (write_config_file): Use the new function to detect
and diagnose unlikely write failure.
* lib/filters/filter-persistent.c (persistent_filter_dump): Likewise.
* lib/format_text/archive.c (archive_vg): Likewise.
* lib/format_text/format-text.c (_vg_write_file): Likewise.
* lib/log/log.c (fin_log): Similar, but use dm_fclose directly.
Include "\n" at end of each fprintf format string.
2007-07-24 17:48:08 +00:00
Petr Rockai
764858fa12 Make warnings go to stderr. Change log_warn to that effect, log_print
continues to send messages to stdout.
2007-06-28 17:33:44 +00:00
Alasdair Kergon
dcdbbb3ecb Add devices/preferred_names config regex list for displayed device names.
Free a temporary dir string in fcntl_lock_file() after use.
Fix a dm_pool_destroy() in matcher_create().
Introduce goto_bad macro.
2007-04-26 16:44:59 +00:00
Alasdair Kergon
71f06d51ed Add devices/ignore_suspended_devices to ignore suspended dm devices. 2007-01-25 21:22:30 +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
d0f7067471 lvm.static no longer interacts with dmeventd unless explicitly asked to. 2007-01-24 23:43:27 +00:00
Alasdair Kergon
f4bd12e8e9 register->monitor etc. 2007-01-19 22:21:45 +00:00
Alasdair Kergon
b0b60fafd5 Move lvm_snprintf into libdevmapper. 2006-08-21 12:54:53 +00:00
Alasdair Kergon
df0a5561a1 Add --trustcache option to reporting commands in preparation for supporting
event-driven model.  Without changes to the way the cache gets updated, the
option is currently unreliable without a global lock to prevent any lvm2
commands from running concurrently.
2006-08-01 14:56:33 +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
28ab560907 Create a log header for replacement in-sync mirror log.
Use set_lv() and dev_set() to wipe sections of devices.
Add mirror_in_sync() flag to avoid unnecessary resync on activation.
2006-05-11 18:39:24 +00:00
Alasdair Kergon
86e757a6ad When choosing between identically-named VGs, also consider creation_host. 2006-04-13 17:32:24 +00:00
Alasdair Kergon
41c86b0d19 Replacement activation code. [Don't use this yet!] 2005-11-08 22:52:26 +00:00
Alasdair Kergon
67eb7723d6 Use hash, bitset, malloc, pool from libdevmapper. 2005-10-16 23:03:59 +00:00
Alasdair Kergon
87dbf462cb Reinstate full PV size when removing from VG.
Support loopfiles for testing.
Complete the pv_segment support.
2005-05-03 17:28:23 +00:00
Alasdair Kergon
cdd0d3351a Add clustered attribute so vgchange can identify clustered VGs w/o locking. 2005-03-21 22:55:12 +00:00
Alasdair Kergon
8b6d584529 Improve detection of external changes affecting internal cache. 2005-03-21 22:40:35 +00:00
Alasdair Kergon
7e44dcc5bf Additional device-handling debug messages.
Additional verbosity level -vvvv includes line numbers and backtraces.
Verbose messages now go to stderr not stdout.
Close any stray file descriptors before starting.
Refine partitionable checks for certain device types.
Allow devices/types to override built-ins.
2004-12-10 16:01:35 +00:00
Alasdair Kergon
99249cff04 pvcreate wipes md superblocks. (With --uuid or --restorefile it prompts.) 2004-11-19 19:25:07 +00:00
Alasdair Kergon
e90e1f577d vgcfgbackup -f accepts template with %s for VG name. 2004-06-19 18:55:29 +00:00
Alasdair Kergon
66ed5f82c4 Update copyright notices. 2004-03-30 19:35:44 +00:00
Alasdair Kergon
bd3e0f5248 cmdlib logging function 2004-03-26 14:47:14 +00:00
Alasdair Kergon
35cf1b3b5b Rebaseline internal verbose level. 2004-03-26 11:45:01 +00:00
Alasdair Kergon
286253a73f host tags 2004-03-08 18:13:22 +00:00
Alasdair Kergon
f93434a8ce Basic internationalisation support. 2004-02-13 22:56:45 +00:00
Alasdair Kergon
8449314da2 Another sync point - numerous fixes & clean ups. 2003-07-04 22:34:56 +00:00
Alasdair Kergon
fcb81147cb pvmove flag 2003-04-30 15:22:52 +00:00
Alasdair Kergon
e8c4bf56fe Tidy various pre-processing incl. making libdl optional. 2003-03-24 18:08:53 +00:00