]> sourceware.org Git - lvm2.git/log
lvm2.git
4 months agocommand: correct lvresize 1275919999
Zdenek Kabelac [Thu, 2 May 2024 11:18:08 +0000 (13:18 +0200)]
command: correct lvresize

Code for supporting size reduction of pool metadata is not yet present
so don't pretend the option can work as pushed in previous commit.

4 months agoWHATS_NEW: update 1275823809
Zdenek Kabelac [Thu, 2 May 2024 10:07:47 +0000 (12:07 +0200)]
WHATS_NEW: update

4 months agomake: generate
Zdenek Kabelac [Wed, 1 May 2024 21:24:20 +0000 (23:24 +0200)]
make: generate

Update lvresize options with +/-.

4 months agocommand-lines: improve spec for thin snapshot
Zdenek Kabelac [Thu, 2 May 2024 09:11:53 +0000 (11:11 +0200)]
command-lines: improve spec for thin snapshot

man-generate --check actually noticed 2 same definitions
for snapshot create  with 'lvreate -T [--snapshot]'
and 'lvcreate --snapshot [-T]'.
So drop the '-T' from second alternative variant as
thin type is already implied here.

4 months agouse LVM_COMMAND_COUNT
Zdenek Kabelac [Wed, 1 May 2024 23:31:51 +0000 (01:31 +0200)]
use LVM_COMMAND_COUNT

4 months agoman-generator: code reformating
Zdenek Kabelac [Wed, 1 May 2024 20:55:23 +0000 (22:55 +0200)]
man-generator: code reformating

4 months agocommand: refactor to use const command structure
Zdenek Kabelac [Wed, 1 May 2024 12:36:28 +0000 (14:36 +0200)]
command: refactor to use const command structure

Refactor code so the definitions may become 'static const'
and with configure_command_option_values() we update options
val_enum for actually running command option when used.

Also update _update_relative_opt() which is used for
generating man pages and command help.

Introduce enumeration for lvm2 commands - so we may
use enum cmd_COMMAND instead of string checking.

So running command now does not modified opt_names.

4 months agocommand: embedding strings to structs
Zdenek Kabelac [Wed, 1 May 2024 10:45:10 +0000 (12:45 +0200)]
command: embedding strings to structs

Since we will make these struct const, we can also
embedding string content into them to avoid unnecessary
pointer relocations.

4 months agocleanup: tab indent and typo
Zdenek Kabelac [Tue, 30 Apr 2024 11:49:45 +0000 (13:49 +0200)]
cleanup: tab indent and typo

4 months agocleanup: unlink passes with ENOENT
Zdenek Kabelac [Tue, 30 Apr 2024 11:48:01 +0000 (13:48 +0200)]
cleanup: unlink passes with ENOENT

4 months agocleanup: remove unused code
Zdenek Kabelac [Tue, 30 Apr 2024 11:43:32 +0000 (13:43 +0200)]
cleanup: remove unused code

4 months agowritecache: reuse some API
Zdenek Kabelac [Wed, 1 May 2024 08:41:18 +0000 (10:41 +0200)]
writecache: reuse some API

Tiny code updates, reuse dm_pool_strdup().

4 months agomemory: compile with VALGRIND_POOL
Zdenek Kabelac [Tue, 30 Apr 2024 18:55:16 +0000 (20:55 +0200)]
memory: compile with VALGRIND_POOL

Function to _allocate_memory() was not compiled-in when lvm2 was
build with support for better tracking memory pool with valgrind.
Instead now correctly avoid this function only when running
withing valgrind environment.

4 months agomemory: convert log_error
Zdenek Kabelac [Tue, 30 Apr 2024 18:24:02 +0000 (20:24 +0200)]
memory: convert log_error

As the memory locking is not causing command's error - convert
error messages to warnings and debugs.

4 months agotoolcontext: introduce var for run in valgrind
Zdenek Kabelac [Tue, 30 Apr 2024 18:22:09 +0000 (20:22 +0200)]
toolcontext: introduce var for run in valgrind

4 months agoactivation: interruptible sleep when talking to dmeventd
Zdenek Kabelac [Tue, 30 Apr 2024 18:21:05 +0000 (20:21 +0200)]
activation: interruptible sleep when talking to dmeventd

4 months agocleanup: drop double _ 1270996609
Zdenek Kabelac [Sun, 28 Apr 2024 18:15:10 +0000 (20:15 +0200)]
cleanup: drop double _

4 months agolvmcmdline: code update
Zdenek Kabelac [Sun, 28 Apr 2024 20:09:05 +0000 (22:09 +0200)]
lvmcmdline: code update

4 months agocommand: more arrays keep static
Zdenek Kabelac [Sun, 28 Apr 2024 18:14:42 +0000 (20:14 +0200)]
command: more arrays keep static

4 months agocommand: more static const declaration
Zdenek Kabelac [Sun, 28 Apr 2024 17:52:26 +0000 (19:52 +0200)]
command: more static const declaration

Use static const for declared arrays.
Access to arrays through get_ functions().

4 months agocommand: use const declaration for arrays
Zdenek Kabelac [Sun, 28 Apr 2024 16:14:27 +0000 (18:14 +0200)]
command: use const declaration for arrays

4 months agocommand: refactor common code to command_enum.h
Zdenek Kabelac [Sun, 28 Apr 2024 15:59:42 +0000 (17:59 +0200)]
command: refactor common code to command_enum.h

Move shared code to command_enum.h and avoid duplicating code.

4 months agolvchange: constify option array
Zdenek Kabelac [Sat, 27 Apr 2024 18:25:30 +0000 (20:25 +0200)]
lvchange: constify option array

4 months agocommand: using single printf call
Zdenek Kabelac [Sat, 27 Apr 2024 11:39:33 +0000 (13:39 +0200)]
command: using single printf call

Use single string for 1 printf() call with \t tabs.

4 months agocommand: refactor loop test for end of string
Zdenek Kabelac [Sat, 27 Apr 2024 11:04:25 +0000 (13:04 +0200)]
command: refactor loop test for end of string

4 months agocommand: refactor test for relative opt
Zdenek Kabelac [Sat, 27 Apr 2024 17:26:32 +0000 (19:26 +0200)]
command: refactor test for relative opt

Use _update_relative_opt to check for relative option and
update val_enum accordingly.

4 months agoman-generator: some switch case refactoring
Zdenek Kabelac [Sat, 27 Apr 2024 18:15:36 +0000 (20:15 +0200)]
man-generator: some switch case refactoring

4 months agocommand: split man-generator code
Zdenek Kabelac [Sat, 27 Apr 2024 09:36:55 +0000 (11:36 +0200)]
command: split man-generator code

Move code for generating man pages to man-generator.c
which is no longer a symlink to command.c and just
includes this file for the common code.

4 months agocommand: refactor if condition
Zdenek Kabelac [Sat, 27 Apr 2024 09:36:42 +0000 (11:36 +0200)]
command: refactor if condition

4 months agolvconvert: use cmd_context variable
Zdenek Kabelac [Sun, 28 Apr 2024 16:01:33 +0000 (18:01 +0200)]
lvconvert: use cmd_context variable

Do not modify flags field from 'strcut command_name' and
instead control this via cmd_context  get_vgname_from_options.

Flag GET_VGNAME_FROM_OPTIONS is currently used only by lvconvert.

4 months agolvmdbusd: its fine if dir already exists
Zdenek Kabelac [Sun, 28 Apr 2024 21:32:00 +0000 (23:32 +0200)]
lvmdbusd: its fine if dir already exists

With previous patch, we now need to handle the case
when dir already exists.

4 months agodmeventd: use standard reopening mechanism 1269915451
Zdenek Kabelac [Fri, 26 Apr 2024 21:53:29 +0000 (23:53 +0200)]
dmeventd: use standard reopening mechanism

Apply same code for reopening /dev/null for 0,1,2 when daemonizing.

4 months agodaemon-stray: correct size limitation for filename
Zdenek Kabelac [Fri, 26 Apr 2024 21:51:38 +0000 (23:51 +0200)]
daemon-stray: correct size limitation for filename

Correct the buffer size for filename printing.

4 months agolvmdbusd: create dirs for lock file
Kai Kang [Tue, 5 Dec 2023 07:50:21 +0000 (15:50 +0800)]
lvmdbusd: create dirs for lock file

Create leading dirs for lvmdbusd lock file, otherwise it fails to start:

| systemd[1]: Starting LVM2 D-Bus service...
| lvmdbusd[1602]: [1602]: Error during creation of lock file(/var/lock/lvm/lvmdbusd): errno(2), exiting!

Signed-off-by: Kai Kang <kai.kang@windriver.com>
4 months agoWHATS_NEW: update 1269808816
Zdenek Kabelac [Fri, 26 Apr 2024 14:44:07 +0000 (16:44 +0200)]
WHATS_NEW: update

4 months agomake: generate
Zdenek Kabelac [Fri, 26 Apr 2024 18:54:57 +0000 (20:54 +0200)]
make: generate

4 months agocmdlines: use OO_LVCREATE_RAID
Zdenek Kabelac [Fri, 26 Apr 2024 18:54:09 +0000 (20:54 +0200)]
cmdlines: use OO_LVCREATE_RAID

Common options in one OO_

4 months agocmdlines: simplify OO_LVCONVER/LVCREATE_THINPOOL
Zdenek Kabelac [Fri, 26 Apr 2024 18:16:23 +0000 (20:16 +0200)]
cmdlines: simplify OO_LVCONVER/LVCREATE_THINPOOL

OO_LVCONVERT_THINPOOL always constains OO_LVCONVERT_POOL
OO_LVCREATE_THINPOOL always contains OO_LVCREATE_POOL

More readable description.

4 months agotests: resize thin-pool with vdo data
Zdenek Kabelac [Fri, 26 Apr 2024 17:56:58 +0000 (19:56 +0200)]
tests: resize thin-pool with vdo data

4 months agotests: correcting test for invalid commnad
Zdenek Kabelac [Fri, 26 Apr 2024 17:55:47 +0000 (19:55 +0200)]
tests: correcting test for invalid commnad

Correting typo in specification of create --typo.
Also removing some unnecessary parts...

4 months agomakefile: avoid creating shared lib for static only build
Zdenek Kabelac [Fri, 26 Apr 2024 14:20:59 +0000 (16:20 +0200)]
makefile: avoid creating shared lib for static only build

4 months agovdo: fix setting VDO size when stacked
Zdenek Kabelac [Fri, 26 Apr 2024 17:10:04 +0000 (19:10 +0200)]
vdo: fix setting VDO size when stacked

When VDO is used as data LV for thin-pool, we need
to use correct function to propagate this through
the stack of volumes.

4 months agolvmcache: stop saving duplicate pvs info between scans 1269774418
David Teigland [Fri, 26 Apr 2024 19:13:46 +0000 (14:13 -0500)]
lvmcache: stop saving duplicate pvs info between scans

In the past it was common for a single command to run
multiple lvmcache_label_scan, and this code was a way
to make each call select the same duplicate pvs.  Now
commands run a single lvmcache_label_scan, so this is
not needed.

4 months agotests: wait for raid being in sync 1269290100
Zdenek Kabelac [Fri, 26 Apr 2024 10:43:03 +0000 (12:43 +0200)]
tests: wait for raid being in sync

4 months agocov: unused headers
Zdenek Kabelac [Thu, 25 Apr 2024 21:53:46 +0000 (23:53 +0200)]
cov: unused headers

4 months agocov: validation
Zdenek Kabelac [Thu, 25 Apr 2024 21:51:58 +0000 (23:51 +0200)]
cov: validation

Add internal error for missing vg.

4 months agotoolcontext: check runtime valgrind 1268304140
Zdenek Kabelac [Thu, 25 Apr 2024 19:20:36 +0000 (21:20 +0200)]
toolcontext: check runtime valgrind

When reseting stream buffer - check for being run within valgrind
and only in this case skip this code.
Define VALGRIND_POOL was incorrectly used for this logic.

4 months agodaemon-stray: compile also with VALGRIND_POOL
Zdenek Kabelac [Thu, 25 Apr 2024 19:07:36 +0000 (21:07 +0200)]
daemon-stray: compile also with VALGRIND_POOL

We can run and build this code just fine with VALGRIND_POOL
and just rely on runtime detection - so we do not close
descriptors also within running valgrind session.

4 months agospec: require ncurses only for readline
Zdenek Kabelac [Wed, 24 Apr 2024 18:53:04 +0000 (20:53 +0200)]
spec: require ncurses only for readline

Hopefully editline can go without ncurses dependency.

4 months agomakefiles: change condition
Zdenek Kabelac [Wed, 24 Apr 2024 18:48:27 +0000 (20:48 +0200)]
makefiles: change condition

Old system do not work well with -l% in findstring,
so use a different strategy to recognize whether -lreadline needs
another library (-ltinfo, -lncourses...)
(So we don't need to solve this via 'configure')

Also for now comment out -Wl,-z,pack-relative-relocs and leave it
for the package maintainer whether they want to use.
Possibly add some 'configure' autodetection for usable switch,
as it's relatively new feature..

4 months agotests: avoid race check 1265976751
Zdenek Kabelac [Wed, 24 Apr 2024 11:54:05 +0000 (13:54 +0200)]
tests: avoid race check

4 months agotests: accept also closing status
Zdenek Kabelac [Wed, 24 Apr 2024 11:44:58 +0000 (13:44 +0200)]
tests: accept also closing status

4 months agomakefiles: comman escape needs this trick
Zdenek Kabelac [Wed, 24 Apr 2024 11:42:05 +0000 (13:42 +0200)]
makefiles: comman escape needs this trick

4 months agomakefiles: add as-needed only for newer systems 1265751608
Zdenek Kabelac [Wed, 24 Apr 2024 09:35:05 +0000 (11:35 +0200)]
makefiles: add as-needed only for newer systems

Add some -Wl flags separatly and avoid their duplication.
Also add --as-needed only when system is using 'newer' readline
library - on these older system the usage of '--as-needed'
seems to be causing some hard to solve problem - so avoid it.

4 months agotests: correct linking order for RT_LIBS
Zdenek Kabelac [Wed, 24 Apr 2024 09:34:35 +0000 (11:34 +0200)]
tests: correct linking order for RT_LIBS

4 months agoconfigure: autoreconf 1265175919
Zdenek Kabelac [Tue, 23 Apr 2024 21:08:39 +0000 (23:08 +0200)]
configure: autoreconf

4 months agoconfigure.ac: update ldflags args
Zdenek Kabelac [Tue, 23 Apr 2024 21:30:35 +0000 (23:30 +0200)]
configure.ac: update ldflags args

Attach -Wl,-z,relro,-z,now,-z,pack-relative-relocs,--as-needed
to LDFLAGS, but only if LDFLAGS already doesn't contain 'relro'
(so it's not given repeatedly).

Also start to use -z,now linkage also when building libraries
with default compilation - this avoid calling symbol resolver
while library function are using function needing resolving.

Note: Fedora or RHEL rpm building is using:
CFLAGS=$(rpm --eval %{build_cflags})
LDFLAGS=$(rpm --eval %{build_ldflags})

Also split -DUSE_SD_NOTIFY into DEFS from CFLAGS.

4 months agoconfigure.ac: leave LDFLAGS resolving on make time
Zdenek Kabelac [Tue, 23 Apr 2024 21:09:48 +0000 (23:09 +0200)]
configure.ac: leave LDFLAGS resolving on make time

Use LDFLAGS separately with every use of CLDFLAGS and leave
this flag only for handling versioning.

This will reflect any LDFLAGS setting use during make.

4 months agotests: update dmsecuretest
Zdenek Kabelac [Tue, 23 Apr 2024 14:07:36 +0000 (16:07 +0200)]
tests: update dmsecuretest

Look not only for whole 64byte sequence,
but seek also 32byte, 16byte and 8byte parts of the
key.

Currently to pass memcpy ZMM problems add possible
workaround in the form of GLIBC_TUNABLES setting.

4 months agomake: generate 1260798582
Zdenek Kabelac [Fri, 19 Apr 2024 21:57:07 +0000 (23:57 +0200)]
make: generate

4 months agotests: look also for 16byte sequences
Zdenek Kabelac [Fri, 19 Apr 2024 21:46:40 +0000 (23:46 +0200)]
tests: look also for 16byte sequences

4 months agotests: add explicit call to lvs
Zdenek Kabelac [Fri, 19 Apr 2024 21:08:11 +0000 (23:08 +0200)]
tests: add explicit call to lvs

Avoid using 'lvs' from  'get' shell - as that would wait until
whole group of processes is finished.

TODO: rethink what would be the point of starting 'dmeventd' with lvs.
It seems to break some rules.

4 months agospec: define rhel_version_file for rhel only
Zdenek Kabelac [Fri, 19 Apr 2024 18:45:15 +0000 (20:45 +0200)]
spec: define rhel_version_file for rhel only

Do not define rhel_minor_version on non-rhel systems.

4 months agolibdevmapper: _do_event waits for working dmeventd
Zdenek Kabelac [Fri, 19 Apr 2024 18:45:00 +0000 (20:45 +0200)]
libdevmapper: _do_event waits for working dmeventd

Refactor _start_daemon and add synchronization delay waiting
untill new forked dmeventd actually open fifos and is ready
to process messages.

This closes some race window in testing.

4 months agolvmlockd: check for multiple lock managers running 1260457301
David Teigland [Fri, 19 Apr 2024 15:48:19 +0000 (10:48 -0500)]
lvmlockd: check for multiple lock managers running

When no lock manager for the global lock had been set yet,
and the first global lock request was received, and both
dlm and sanlock were running, lvmlockd would assume it
should use the dlm for the global lock, and would start
the "lvm_global" dlm lockspace automatically.  That's
not always correct, so don't assume the dlm should be used,
fail the lock request, and wait until a VG with a specific
lock type is started to determine the lock manager to use.

4 months agolvcreate: allow raidintegrity option with implicit raid type 1257538904
David Teigland [Wed, 17 Apr 2024 18:40:33 +0000 (13:40 -0500)]
lvcreate: allow raidintegrity option with implicit raid type

Allow "lvcreate -m1 --raidintegrity y" when raid1 is used, but
not explicit on the command line.

4 months agospec: correct condition 1255716133
Zdenek Kabelac [Tue, 16 Apr 2024 19:08:22 +0000 (21:08 +0200)]
spec: correct condition

Test needs to make sure that it's either <RHX or <FXX.
However they are set to 0 when on different system.
So use '&&'.

4 months agotests: add extra dmsetup table
Zdenek Kabelac [Tue, 16 Apr 2024 19:14:26 +0000 (21:14 +0200)]
tests: add extra dmsetup table

Strange race seems to be occuring here from time to time...

4 months agotests: add another explicit barrier
Zdenek Kabelac [Tue, 16 Apr 2024 19:13:53 +0000 (21:13 +0200)]
tests: add another explicit barrier

Just to be sure compiler cannot optimize this out.

4 months agotests: update aux for vdo checking
Zdenek Kabelac [Tue, 16 Apr 2024 19:10:46 +0000 (21:10 +0200)]
tests: update aux for vdo checking

Detect also presence of  'vdoformat' tool.
Fallback to 'kvdo' modprobe only when dm-vdo fails
(removed ugly error message from log)

Also add extra check for scsi model being present
so the test can wait a bit if 'scsi_debug' takes longer time.

No need for 'aux' within aux.

4 months agotests: ensure sscan buffer is nul terminated 1254111845
Zdenek Kabelac [Mon, 15 Apr 2024 16:14:50 +0000 (18:14 +0200)]
tests: ensure sscan buffer is nul terminated

Avoid reading past the read buffer when sscanf is used.

4 months agospec: sanlock 3.7 with version >fc27 and >rh7.4
Zdenek Kabelac [Mon, 15 Apr 2024 14:43:44 +0000 (16:43 +0200)]
spec: sanlock 3.7 with version >fc27 and >rh7.4

Decode minor version for rhel.

4 months agoclang: implicit conversion from 'long' to 'double'
Zdenek Kabelac [Mon, 15 Apr 2024 16:12:54 +0000 (18:12 +0200)]
clang: implicit conversion from 'long' to 'double'

implicit conversion from 'long' to 'double' changes value
from 9223372036854775807 to 9223372036854775808.

So rather compare same integer types.

4 months agoWHATS_NEW: update 1253324563
Zdenek Kabelac [Mon, 15 Apr 2024 11:43:13 +0000 (13:43 +0200)]
WHATS_NEW: update

4 months agoconfigure: autoreconf
Zdenek Kabelac [Mon, 15 Apr 2024 11:36:26 +0000 (13:36 +0200)]
configure: autoreconf

4 months agoconfigure.ac: 3.7.0 is new minimal sanlock versioh
Zdenek Kabelac [Mon, 15 Apr 2024 11:37:16 +0000 (13:37 +0200)]
configure.ac: 3.7.0 is new minimal sanlock versioh

Require this minimal version of sanlock for usage with lvmlockd.

4 months agodmeventd: use daemon_close_stray_fds
Zdenek Kabelac [Sat, 13 Apr 2024 19:20:18 +0000 (21:20 +0200)]
dmeventd: use daemon_close_stray_fds

Use common code for close stray descriptors.

4 months agolibdaemon: implement daemon_close_stray_fds
Zdenek Kabelac [Fri, 12 Apr 2024 22:39:43 +0000 (00:39 +0200)]
libdaemon: implement daemon_close_stray_fds

Refactor existing code from tools/lvmcmdline.c to
libdaemon/server/daemon-stray.h daemon_close_stray_fds()
used to close stray descriptors above some specified Fd.

This is code parses content of /proc dir to minimize 'blind' closing
of all possible descriptors within rlimits range.

As we have the same code in few other places in it's more 'trivial'
version - these were actually sensitive to high amount of descriptors,
which might be configured on some system.

With this patch we effectively resolve this reported gitlab issue:
https://gitlab.com/lvmteam/lvm2/-/issues/5

TODO: Current placement might not be ideal - however considering
existing code base constrains it's not so simple.
ATM it uses lib/misc/lvm-file.h  for custom_fds declaration
and rest of functinality is included in daemon header file.

4 months agolvm: use configure proc dir in lvm.conf
Zdenek Kabelac [Sun, 14 Apr 2024 22:31:30 +0000 (00:31 +0200)]
lvm: use configure proc dir in lvm.conf

Update some code parts to use configurer /proc from lvm.conf
(so i.e. our testing can use some fake values)

4 months agoconfigure.ac: define DEFAULT_PROC_DIR in one place
Zdenek Kabelac [Mon, 15 Apr 2024 11:36:35 +0000 (13:36 +0200)]
configure.ac: define DEFAULT_PROC_DIR in one place

Let's move proc into include/configure.h so this define can
be easily used across the source base.

Configure defines it - but ATM we do not provide any configure
option to change it - there should be no need to ever change it.

4 months agodmeventd: typo fix
Zdenek Kabelac [Fri, 12 Apr 2024 19:30:30 +0000 (21:30 +0200)]
dmeventd: typo fix

Fix typo and minor reorder of struct member for better alignment.

4 months agolvmcache: fix memleaks on list removal
David Teigland [Wed, 3 Apr 2024 22:54:48 +0000 (17:54 -0500)]
lvmcache: fix memleaks on list removal

Free members released from the list.

5 months agospec: disable LTO 1249940300
Zdenek Kabelac [Thu, 11 Apr 2024 21:27:07 +0000 (23:27 +0200)]
spec: disable LTO

Currently there is not much gain in using LTO when building
testing rpms

5 months agospec: replace exists macro with plain shell test
Zdenek Kabelac [Thu, 11 Apr 2024 23:10:49 +0000 (01:10 +0200)]
spec: replace exists macro with plain shell test

seems this macro works only with recent rpm.

5 months agotests: better handling for dmeventd restart
Zdenek Kabelac [Thu, 11 Apr 2024 21:43:27 +0000 (23:43 +0200)]
tests: better handling for dmeventd restart

Handle the case, where we  'kill -9' running dmeventd,
and restarting 'dmeventd -R' manages to still contact this
'zombie' damone and manages to get list of monitored devices
out of this and eventually 'run' new and in this case
unexpected instance of dmeventd.

5 months agotests: fallback to normal hostname on older machines
Zdenek Kabelac [Thu, 11 Apr 2024 14:28:52 +0000 (16:28 +0200)]
tests: fallback to normal hostname on older machines

hostname -I  is newer option, add some fallback

5 months agotests: explicitely use event_activation=1
Zdenek Kabelac [Thu, 11 Apr 2024 14:21:11 +0000 (16:21 +0200)]
tests: explicitely use event_activation=1

Some test do expect event_activation to be set.
So add explicit configuring of this setting in tests,
but also add new default which kind of does it globally
as it's expected default  (yet our testing rpms might
be create with disabled event_activation)
By adding this to each test individually - it's now easy
to locate such tests...

5 months agodmeventd: reduce some static variable usage
Zdenek Kabelac [Thu, 11 Apr 2024 22:19:08 +0000 (00:19 +0200)]
dmeventd: reduce some static variable usage

Move static to main() local vars.

Initilize libdm logging also before starting _restart_dmeventd()
so function there can be also logged.

Move call of _info_dmevent() out of option processing - so some
options like -V are processed with higher priority.

5 months agodmeventd: no log when after unlink file is gone
Zdenek Kabelac [Thu, 11 Apr 2024 21:21:43 +0000 (23:21 +0200)]
dmeventd: no log when after unlink file is gone

Check for errno ENOENT.

TODO: there should be global wrapper for this...

5 months agodevmapper-event: add unlock into init_fifo error path
Zdenek Kabelac [Thu, 11 Apr 2024 21:19:20 +0000 (23:19 +0200)]
devmapper-event: add unlock into init_fifo error path

Unlock server path if there is open failure for client_path
and whole init_fifos() function is returning failure.

5 months agodmeventd: rework _restart_dmeventd
Zdenek Kabelac [Thu, 11 Apr 2024 21:26:46 +0000 (23:26 +0200)]
dmeventd: rework _restart_dmeventd

Use _restart_dmeventd() with return values 0,1,2.
Also let's use already created fifos struct.

Make sure the _systemd_activation variable is properly initialized
from _systemd_handover before calling _restart_dmeventd() as
this variable is used there to decide where   1 or 2 should
be returned - aka either letting systemd to initilize
or restart dmeventd itself.

5 months agolvmlockd: use sanlock.h for defines 1249509956
David Teigland [Thu, 11 Apr 2024 15:50:06 +0000 (10:50 -0500)]
lvmlockd: use sanlock.h for defines

5 months agospec: try with default dependency tracking 1247874539
Zdenek Kabelac [Wed, 10 Apr 2024 15:31:41 +0000 (17:31 +0200)]
spec: try with default dependency tracking

Check whether we have now all dependencies right.

5 months agospec: when building rpm on test machine disable event_activation
Zdenek Kabelac [Wed, 10 Apr 2024 15:29:21 +0000 (17:29 +0200)]
spec: when building rpm on test machine disable event_activation

This is initial test how to disable event_activation on
machines, where lvm2-testsuite packages are installed
with its lvm.conf file.

TODO: find more elegant mechanism

5 months agospec: update default values
Zdenek Kabelac [Wed, 10 Apr 2024 15:28:18 +0000 (17:28 +0200)]
spec: update default values

Reverse condition and downgrade setting for older versions.
Also define proper version strings

5 months agotests: aux extend lvmdbusd timeout for startup
Zdenek Kabelac [Wed, 10 Apr 2024 15:33:53 +0000 (17:33 +0200)]
tests: aux extend lvmdbusd timeout for startup

Unclear yet what's going on here - so try waiting up 10second
to see if our service will get there.
Print task list if not...

5 months agotests: use lvname with space
Zdenek Kabelac [Wed, 10 Apr 2024 13:46:24 +0000 (15:46 +0200)]
tests: use lvname with space

Occasionally this test fails as soemtimes UUID actually
may constain LV[d] string causing it to grep mismatch
UUID and LV name and eventually fail test for wrong reason.

As a simple workaround print the LV name first and
check the name is followed by a space character.

5 months agoWHATS_NEW: update 1246590506
Zdenek Kabelac [Tue, 9 Apr 2024 15:51:47 +0000 (17:51 +0200)]
WHATS_NEW: update

5 months agotests: update unit-tests
Zdenek Kabelac [Tue, 9 Apr 2024 21:04:25 +0000 (23:04 +0200)]
tests: update unit-tests

Fix some memleaks.
Drop call of bcache_clear_fd() when bache was not initialized.

5 months agotests: update for faster dmeventd
Zdenek Kabelac [Tue, 9 Apr 2024 21:29:15 +0000 (23:29 +0200)]
tests: update for faster dmeventd

We can drop sleep 6, since dmeventd will quit immediatelly
when no running dmeventd can be restarted.

Also restart itself check more conditions.

This page took 0.07059 seconds and 5 git commands to generate.