summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* test: Help, default and relative paths in runnerdev-mcsontos-testMarian Csontos2015-07-171-24/+114
| | | | | | Add help message. Handle relative paths first. Use `.` for OUTDIR instead of `/` if empty.
* test: Fix hardcoded /usr/share in testsuiteMarian Csontos2015-07-174-1/+29
|
* debug: Make the debug message less scary.Marian Csontos2015-07-171-1/+1
|
* test: Print stacks for all threadsMarian Csontos2015-07-171-0/+2
| | | | May be useful in case of deadlocks...
* log: Empty LVM_LOG_FILE_EPOCH handlingMarian Csontos2015-07-173-3/+4
| | | | | | | | When env.variable is set to empty getenv returns pointer to empty string. In tests it is expected this will produce undecorated debug.log instead of debug.log__*
* test: Ignore known concurrent VG clvmd failure.Alasdair G Kergon2015-07-171-0/+4
| | | | | Don't abort test when clvmd processes two VGs concurrently. CLVMD: ioctl/libdm-iface.c:1940 Internal error: Performing unsafe table load while 3 device(s) are known to be suspended: (253:19)
* lockd: fix error cases when built without lvmlockdDavid Teigland2015-07-163-4/+23
| | | | | | | | | | | When lvm is built without lvmlockd support, vgcreate using a shared lock type would succeed and create a local VG (the --shared option was effectively ignored). Make it fail. Fix the same issue when using vgchange to change a VG to a shared lock type. Make the error messages consistent.
* alloc: Fix lvextend failure when varying stripes.Alasdair G Kergon2015-07-152-32/+43
| | | | | | | | | | | | | | | | | | | A segfault was reported when extending an LV with a smaller number of stripes than originally used. Under unusual circumstances, the cling detection code could successfully find a match against the excess stripe positions and think it had finished prematurely leading to an allocation being pursued with a length of zero. Rename ix_offset to num_positional_areas and move it to struct alloc_state so that _is_condition() can obtain access to it. In _is_condition(), areas_size can no longer be assumed to match the number of positional slots being filled so check this newly-exposed num_positional_areas directly instead. If the slot is outside the range we are trying to fill, just ignore the match for now. (Also note that the code still only performs cling detection against the first segment of the LV.)
* vgimport: fix the all VGs caseDavid Teigland2015-07-151-1/+1
| | | | | The ALL_VGS_IS_DEFAULT flag was wrongly removed; it is needed for vgimport -a to work.
* vgexport: fix the all VGs caseDavid Teigland2015-07-151-1/+1
| | | | | The ALL_VGS_IS_DEFAULT flag was wrongly removed; it is needed for vgexport -a to work.
* config: make a difference between "not found" and "is empty" in log msg for ↵Peter Rajnoha2015-07-151-2/+4
| | | | | | | | | | | | | | devices/preferred_names Replace misleading "not found" in the log message when devices/preferred_names is set to empty array: Really not found: device/dev-cache.c:689 devices/preferred_names not found in config: using built-in preferences Found, but empty: config/config.c:1431 Setting devices/preferred_names to preferred_names = [ ] device/dev-cache.c:689 devices/preferred_names is empty: using built-in preferences
* config: also log the value used if defined in config, not just defaultsPeter Rajnoha2015-07-151-16/+37
| | | | | | | | | | | | | | | | | | Commit 7e728fe1a164cc5d4f64e46fcfcbb224c22b2457 added a log call directly in find_config_tree_array when defaults are used. This patch also adds the log for the value which is found in existing configuration and for which defaults are not used. For example: Defaults used: config/config.c:1428 devices/scan not found in config: defaulting to scan = [ "/dev" ] Value defined in configuration used: config/config.c:1431 Setting devices/scan to scan = [ "/dev", "/mydev", "/abc" ] This makes the logging consistent with the other find_config_tree_* functions.
* cleanup: drop unused header fileZdenek Kabelac2015-07-151-1/+0
|
* cleanup: avoid double assignZdenek Kabelac2015-07-151-3/+3
| | | | Variable n1 is assigned without using n1 before.
* cleanup: drop duplicated seg testZdenek Kabelac2015-07-152-3/+2
| | | | | Test is already in seg_is_pool() if branch. and one minor indent fix.
* makefiles: adding target for generating ctagsZdenek Kabelac2015-07-151-0/+10
| | | | make tags generates traditional tags ctags ref list.
* cache: enhance cache-pool validationZdenek Kabelac2015-07-152-10/+11
| | | | Capture cache-pool without cache policy name set.
* cache: capture missing policy nameZdenek Kabelac2015-07-151-4/+12
| | | | | | | | Policy name has to be always defined. Capture it as an internal error before write. When reading metadata without defined policy name, use default defined policy. TODO: Unsure, but it might have to be actually always 'mq' in this case.
* cache: handle policy_name separatelyZdenek Kabelac2015-07-159-56/+66
| | | | | | Keep policy name separate from policy settings and avoid to mangling and demangling this string from same config tree. Ensure policy_name is always defined.
* cache: move setting of cache policyZdenek Kabelac2015-07-152-7/+3
| | | | | Set policy before saving 1st. metadata and avoid unnecessary reload. Fixes problem when we stored cache-pool without cache-policy set.
* thin: fix warning for overprovisioningZdenek Kabelac2015-07-153-1/+5
| | | | | When lvm.conf is properly configure for auto resize of overprovisioned thin-pool volume, avoid showing any warning (2.02.124).
* config: use find_config_tree_array for all arraysPeter Rajnoha2015-07-152-9/+9
| | | | | | | | Use find_config_tree_array for all config arrays. Also, add INTERNAL_ERROR in case there should have been at least default value defined for a setting but it was not returned for some reason (either config_settings.h misconfiguration or other config tree error printed by functions called by find_config_tree_array).
* config: add "defaulting to" message in case we fall back to defaults in ↵Peter Rajnoha2015-07-151-2/+36
| | | | find_config_tree_array
* metadata: change function name to _allow_extra_system_idDavid Teigland2015-07-141-2/+2
| | | | | The previous name was misleading since this is not the primary system_id check, only the "extra" check.
* vgchange: fix lock-start filtering and waitingDavid Teigland2015-07-141-5/+12
| | | | | | | | | | | | | | | Both lock_start filters were being skipped when any lock-opt values were used. The "auto" lock-opt should cause the auto_lock_start_list to be used. The lock_start_list should always be used. The behavior of lock_start_list/auto_lock_start_list are tested and verified to behave like volume_list/auto_activation_volume_list. Since the default was changed to wait for lock-start to finish, the "wait" and "autowait" lock-opt values are not needed, but a new "autonowait" is added to the existing "nowait" avoid the default waiting.
* lockd: fix error message after a failing to get lockDavid Teigland2015-07-143-6/+17
| | | | | | | | There are two different failure conditions detected in access_vg_lock_type() that should have different error messages. This adds another failure flag so the two cases can be distinguished to avoid printing a misleading error message.
* config: {thin,cache}_{check,repair}_options are never undefinedPeter Rajnoha2015-07-145-14/+18
| | | | | | | | | | | | | | | | | | | Require global/{thin,cache}_{check,repair}_options to be always defined. If not defined directly by user in the configuration and if there's no concrete default option to use, make "" (empty string) the default one - it's then clearly visible in the "lvmconfig --type default" (and generated lvm.conf) and also it makes its handling in the code more straightforward so we don't need to handle undefined values. This means, if there are no default values for these settings defined, we end up with this generated now: {thin,cache}_{check,repair}_options = [ "" ] So the value is never undefined and if it is, it's an error. (The cache_repair_options is actually not used in the code at the moment, but once the code using this setting is in, it will follow the same logic as used for thin_repair_options.)
* man lvmlockd: update method for changing lock typeDavid Teigland2015-07-131-7/+30
| | | | The old description did not work.
* lockd: allow vgexport and vgimportDavid Teigland2015-07-134-13/+32
| | | | | | | | | | | The "exported" state of the VG can be useful with lockd VGs because the exported state keeps a VG from being used in general. It's a way to keep a VG protected and out of the way. Also fix the command flags: ALL_VGS_IS_DEFAULT is not true for vgimport/vgexport, since they both return errors immediately if no VG args are specified. LOCKD_VG_SH is not true for vgexport beause it must use an ex lock to write the VG.
* lockd: allow nolocking and readonly optionsDavid Teigland2015-07-132-1/+47
| | | | | | | | | | | | | | | | | | | | | | | When --nolocking is used (by vgs, lvs, pvs): . don't use lvmlockd at all (set use_lvmlockd to 0) . allow lockd VGs to be read When --readonly is used (by vgs, lvs, pvs, vgdisplay, lvdisplay, pvdisplay, lvmdiskscan, lvscan, pvscan, vgcfgbackup): . skip actual lvmlockd locking calls . allow lockd VGs to be read . check that only shared gl/vg locks are being requested (even though the actually locking is being skipped) . check that no LV locks are requested, because no LVs should be activated or used in readonly mode . disable using lvmetad so VGs are read from disk It is important to note the limited commands that accept the --nolocking and --readonly options, i.e. no commands that change/write a VG or change/activate LVs accept these options, only commands that read VGs.
* vgexport: do not allow lockd VG to be exportedDavid Teigland2015-07-101-0/+7
| | | | vgexport and vgimport have no use for a shared VG.
* lockd: note that external origins don't work in lockd VGsDavid Teigland2015-07-102-0/+12
| | | | | in a comment at the point where it fails, and in the lvmlockd man page.
* vgchange: allow changing to lockd type when mirrors existDavid Teigland2015-07-102-20/+1
| | | | | and update lvmlockd man page to reflect the fact that mirror LVs work correctly in lockd VGs.
* lvconvert: disallow splitting in lockd VGsDavid Teigland2015-07-101-0/+12
| | | | | | A new lockd lock needs to be created for the new LV created by split mirror and split snapshot. Disallow these options in lockd VGs until that is implemented.
* lockd: disable part of lock_args validationDavid Teigland2015-07-102-12/+83
| | | | | | | | There are at least a couple instances where the lock_args check does not work correctly, (listed in the comment), so disable the NULL check for lock_args until those are resolved.
* lvmpolld: Fix segfault on 32 bit architecturesMarian Csontos2015-07-103-4/+5
| | | | | Explicit conversions are needed to align writes and reads on the stack. int64_t is popped from stack while int was pushed.
* test: Fix syntax error in prepare_devsMarian Csontos2015-07-101-1/+1
|
* metadata: fix duplicated LV flagDavid Teigland2015-07-091-3/+2
| | | | LOCKD_SANLOCK_LV was using the WRITEMOSTLY flag instead of a new one.
* vgchange: fix disallowed LV types in lockd VGDavid Teigland2015-07-091-3/+3
| | | | | | cow snapshots work in lockd VG (they were wrongly disallowed), but mirror type LVs do not yet work in lockd VGs (they were wrongly allowed).
* pvcreate: remove recent warning messageDavid Teigland2015-07-091-6/+4
| | | | | | log_warn was added recently because no known code used the given condition, but running pvcreate on an existing PV uses this case, and should not produce a warning.
* metadata: add comments describing lock_args for lvmlockdDavid Teigland2015-07-091-0/+40
|
* metadata: vg_validate lock_argsDavid Teigland2015-07-091-7/+84
|
* coverity: cleanup related to lvmlockdDavid Teigland2015-07-094-31/+33
| | | | | A couple missing mutex unlock on error bugs. A bunch of buffer size/termination warnings.
* libdaemon: config_make_nodes_v needs fixingPeter Rajnoha2015-07-092-7/+6
| | | | | | Put the change from commit #10d27998b3d2f6100e9e29e83d1d99948c55875f back so we have working tree again for now. This code needs a bit of a cleanup to return proper return value to check...
* coverity: missing return value checksPeter Rajnoha2015-07-099-28/+64
|
* coverity: missing return value for dm_split_lvm_name pass proper DM name ↵Peter Rajnoha2015-07-091-1/+4
| | | | instead of NULL value
* coverity: fix possible invalid dereferencesPeter Rajnoha2015-07-094-8/+6
| | | | | | | lib/format1/import-export.c:167: var_deref_op: Dereferencing null pointer "vg->lvm1_system_id" lib/cache/lvmetad.c:1023: var_deref_op: Dereferencing null pointer "this" daemons/lvmlockd/lvmlockd-core.c:2659: check_after_deref: Null-checking "act" suggests that it may be null, but it has already been dereferenced on all paths leading to the check /daemons/lvmetad/lvmetad-core.c:1024: check_after_deref: Null-checking "pvmeta" suggests that it may be null, but it has already been dereferenced on all paths leading to the check
* lvmconf: fix ignored --startstopservices in lvmconf ... --mirrorservice on ↵Peter Rajnoha2015-07-092-2/+3
| | | | | | | | | | systemd If running lvmconf ... --startstopservice --mirrorservice in systemd environment, handle lvm2-cmirrord accordingly. A typo in the script caused the lvm2-cmirrord to not start/stop immediately, it was only enabled/disabled (so the --startstopservice was ignored in this case).
* vgchange: don't disable VG lock in lock_stopDavid Teigland2015-07-081-2/+0
| | | | | | It was an optimization to avoid a pointless unlock call. It affects all VGs, but was only intended to affect the VG being stopped.
* lvmlockd: remove log_error instances for normal conditionsDavid Teigland2015-07-081-10/+14
| | | | | There are a number of log_error instances that are replaced by log_debug because they are not errors.