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

8338 Commits

Author SHA1 Message Date
Peter Rajnoha
877418b1a2 WHATS_NEW: commit 4c267c7286
See also https://bugzilla.redhat.com/show_bug.cgi?id=1026860
for more info, comment 76 for summary.
2013-12-11 16:50:52 +01:00
Peter Rajnoha
4c267c7286 udev: fix SYSTEMD_READY assignment for foreign devices in lvmetad rules
Some devices, similarly to us, are not prepared after ADD event, but
after an extra CHANGE event when the device is properly set up.
This includes MD and loop devices. This patch fixes the
SYSTEMD_READY assignment that is crucial for proper functionality
of SYSTEMD_WANTS that we use to instantiate a lvm2-pvscan@.service
systemd service to activate the VG/LVs (see also bug
info).

All that extra handling of foreign devices should eventually be moved
to rules which process those devices primarily (MD and loop)! We should
only check a dedicated variable whether the device is usable or not.
2013-12-11 13:46:15 +01:00
Zdenek Kabelac
c9fe05eee2 tests: count interrupted test as failed 2013-12-10 11:21:40 +01:00
Zdenek Kabelac
e3b7fa4b8d thin: thin metadata resize unsupported with 1.9
Thin kernel target 1.9 still does not support online resize of
thin pool metadata properly - so disable it with expectation
for much higher version - and reenable after fixing kernel.
2013-12-10 11:17:37 +01:00
Zdenek Kabelac
99d5b4b807 cleanup: share segtype macros
Write query macro just once.
2013-12-10 11:16:53 +01:00
Zdenek Kabelac
cf857ecabd cleanup: shorter raid initialization
Avoid multiple queries for raid library for each initialized raid
seg type and use shorter code.
2013-12-10 11:16:51 +01:00
Zdenek Kabelac
9f0e27a18c cleanup: tiny speedup of lib_dir checking
Instead of repeated lookup of global/library_dir - remember first
search in command context - saves couple lines in debug output...
2013-12-10 11:15:48 +01:00
Peter Rajnoha
0fcdc8a020 conf: clarify wipe_signatures_when_zeroing_new_lvs 2013-12-10 10:16:37 +01:00
Alasdair G Kergon
16eab3ec08 config: shorten new sig wiping option string
Rename wipe_signatures_on_new_logical_volumes_when_zeroing  to
wipe_signatures_when_zeroing_new_lvs.
2013-12-09 09:35:47 +00:00
Zdenek Kabelac
2b3adf4eea tests: more limits for python test
It will be most probably more problem with
incomplete initialization of lvm.conf settings
when lvm2app is in use.

Skip cluster & lvmetad test for now.
2013-12-06 10:37:49 +01:00
Zdenek Kabelac
f460d6d9b5 tests: python test needs dmeventd
Until lvm2app respects all lvm.conf setting,
this test require dmeventd.
2013-12-06 10:08:34 +01:00
Peter Rajnoha
73a109d434 lvmdump: follow symbolic links in /etc/lvm 2013-12-05 16:36:45 +01:00
Peter Rajnoha
a344466e26 compile/link: EXTRA_EXEC_CFLAGS must be applied for *.o 2013-12-05 14:19:10 +01:00
Peter Rajnoha
481edce41f compile/link: use RELRO/PIE compiler/linker options for executables 2013-12-05 14:03:10 +01:00
Zdenek Kabelac
b494881e68 tests: sysrq only when stuck with no output.
If we are stuck in user for too long without output,
grab kernel stack traces.
If we just produce too many lines of output, it's
not probably kernel related bug.
2013-12-05 12:40:47 +01:00
Zdenek Kabelac
c7b733cd6c tests: do not run lvmetad tests without lvmetad
Skip tests when lvmetad is not compiled.
2013-12-05 12:40:47 +01:00
Zdenek Kabelac
6f0300de96 lv_remove_single: update parameter name
Since we have already a meaning for 'silent'
replace its name with more explanator suppress_remove_message
(updates recent commit).
2013-12-05 12:40:47 +01:00
Zdenek Kabelac
aa75698a17 tests: harness prints debug.log
When the test is interrupted because debug.log has got to big,
and the test doesn't react on SIGINT - and needs to be only
killed with SIGKILL - it's still valuable to print at least
a portion of this debug.log (currently 4MB).

LVM_TEST_UNLIMITED  could be set to avoid this limitation
(i.e. when busy-looping lvm command needs to be running
for gdb attachment)
2013-12-05 11:18:15 +01:00
Zdenek Kabelac
7baf411c97 dev-cache: return success when ignoring dirs
When there is no failure from the insert operation itself,
just dirs and links are skipped - return success.
2013-12-05 11:17:37 +01:00
Zdenek Kabelac
74878bc2bc cleanup: gcc can't see the code path
This is a bit to hard for gcc to see the condition can't
be triggered, so make it easier and initialize to 0.
2013-12-05 09:42:50 +01:00
Alasdair G Kergon
ac6cd9baa7 lvmetad: remove unused override variables 2013-12-05 01:13:18 +00:00
Alasdair G Kergon
b6d3fd62fc libdm: prevent empty config file section names
Change c353949597 to use existing
_dup_string_tok().  alloca() doesn't fail cleanly (and needs
replacing.)
2013-12-05 01:09:03 +00:00
Zdenek Kabelac
76ca82df82 tests: drop RUN... already have this var elsewhere 2013-12-04 21:37:33 +01:00
Zdenek Kabelac
d9461ae89b tests: replace built-in popen
It seems some older bashes have problems to properly execute
both pipes - so replace this code with separate temporary files.
2013-12-04 19:50:53 +01:00
Zdenek Kabelac
e06cfd7437 tests: reuse timeout code for too long debug.log
Jump to the same code used for timeout when no output
is made for long time.

Increase the allowed debug.log size to 32MB.
2013-12-04 19:48:29 +01:00
Zdenek Kabelac
c144305d3e tests: update pvmove-test
Do not lock test when trying to grab cluster lock.
There seems to be still something weird in this test
so it still needs some inspection.
2013-12-04 17:10:31 +01:00
Zdenek Kabelac
7c6b14b74f tests: monitor debug.log size
Show testing directory from test and monitor it in
harness - so when it gets too big - kill test.
2013-12-04 17:10:31 +01:00
Zdenek Kabelac
598c82fc07 vgchange: move detection of remote exlusivness
Since activation takes only read-lock, there could be
multiple activation running in parallel.

So instead of checking before taking any real lock,
let the locking resolve the problem and just
detect if the reason for failure has been remote
exlusive activation.

It should be also faster, since each activation does
not need to do explicit lock query.
2013-12-04 17:09:51 +01:00
Peter Rajnoha
28939dba09 configure: also LDFLAGS, not LDLAGS for proper restore 2013-12-04 15:00:56 +01:00
Zdenek Kabelac
1592bb216e test: thin snapshot merge
Testing thin snapshot merge cases.
TODO: Probably still misses some cases.
2013-12-04 14:30:26 +01:00
Zdenek Kabelac
91496e0eda thin: enable thin snapshot merge 2013-12-04 14:30:26 +01:00
Zdenek Kabelac
971ab733b7 thin: activation of merging thin snapshot
For merging thin snapshot we have to do couple extra
checks before we allow this operation.

We pretend  thin-snapshot and thin-origin
are tied together and we have to properly
maintain locking.
2013-12-04 14:30:26 +01:00
Zdenek Kabelac
ff112eee18 thin: merge display 2013-12-04 14:30:26 +01:00
Zdenek Kabelac
1200b7e7c2 thin: deactivation of merging thin snapshot
Before trying to deactivate merging thin snapshot
(which is invisible) check if it's not in-use.
2013-12-04 14:30:26 +01:00
Zdenek Kabelac
5fc3352a15 thin: merge removal
When thin is merged - properly handly device removal.
2013-12-04 14:30:26 +01:00
Zdenek Kabelac
664a695561 thin: merge support for device tree
When thin snapshot merge is requested, tree must detect
if user tries to active such LV while origin or
snapshost is still active.
2013-12-04 14:30:25 +01:00
Zdenek Kabelac
e286904da6 thin: snapshot merge support 2013-12-04 14:30:25 +01:00
Zdenek Kabelac
572983d793 thin: read table line with thin device id
Add functions to parse thin table line to
obtain thin device id.
2013-12-04 14:30:25 +01:00
Zdenek Kabelac
cf7f451238 merge: test only for meging origin
It's enough to check only for merging origin.
This will be also used for thin volume merges which
do not need to be origins.
2013-12-04 14:30:25 +01:00
Zdenek Kabelac
993831bdb1 cleanup: size is already 64bit value
Cast is not needed.
2013-12-04 14:30:25 +01:00
Zdenek Kabelac
51783676fb cleanup: swap condition logic
Use easier to follow logic of code.
When checking for merging origin, do a merging.
2013-12-04 14:30:25 +01:00
Zdenek Kabelac
6d7a76ccbf cleanup: code move
Move _swap_lv_identifiers() above  _finish_lvconvert_merge()
so it could be used from this function.
2013-12-04 14:30:25 +01:00
Zdenek Kabelac
5a6794a2ce lv_remove_single: add silent arg
Support silence for removal message.
2013-12-04 14:30:25 +01:00
Zdenek Kabelac
84b3852ee5 snapshots: use lv_check_not_in_use
Switch from a simple 'open_count' test on opened snaphost
to a more 'skilled'  lv_check_not_in_use().
2013-12-04 14:30:24 +01:00
Zdenek Kabelac
778de22d51 refresh: print error message with failing lv name
If there is  suspend/resume error, print error message
with lv name.
Drop goto.
2013-12-04 14:30:24 +01:00
Peter Rajnoha
37853cc7a9 make: CFLAGS, not CLDFLAGS 2013-12-04 14:28:40 +01:00
Peter Rajnoha
a65ab773b4 daemons: use PIE and RELRO compiler/linker options
The PIE and RELRO compiler/linker options can be used to produce a code
some techniques applied that makes the code more immune to some attacks:

  - PIE (Position Independent Executable). It can make use of the ASLR
    (Address Space Layout Randomization) provided by kernel to avoid
    static locations for .text regions of executables (this is the 'pie'
    compiler and linker option)

  - RELRO (Relocation Read-Only). This prevents overwrite attacks of
    the GOT (Global Offset Table) and PLT (Procedure Lookup Table)
    used for relocations by making it read-only after all relocations
    are resolved (these are the 'relro' and 'now' linker options) -
    hence all symbols are resolved at the very start so there's no
    need for those tables to be writeable later.

These compiler/linker options are now used by default for daemons
if the compiler/linker supports it.
2013-12-04 13:30:08 +01:00
Zdenek Kabelac
fc37d4fb0d make: support per-object defines
In the case we have a dir with multiple objects and for
an individual object file we need special define -
allow to define it without adding extra rules.

To ensure dmeventd.o compilation will use EXTRA_FLAGS:
CFLAGS_dmeventd.o += $(EXTRA_FLAGS)

Then it's better to use:
dmeventd.o: CFLAGS += $(EXTRA_FLAGS)
2013-12-04 13:30:08 +01:00
Peter Rajnoha
6c6bcc00e4 configure: check compiler/linker support for RELRO and PIE options
Also, add AC_TRY_LDFLAGS m4 macro to help with checking ld flags.
2013-12-04 13:30:08 +01:00
Peter Rajnoha
163666e513 tests: one LV should be active and one inactive in covercmd test 2013-12-04 09:38:00 +01:00