master - dmeventd: base vdo plugin
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=80e6097ea6bc56548304185715f04e8eaca2da48 Commit: 80e6097ea6bc56548304185715f04e8eaca2da48 Parent: b98846998b7719360e9d41f83a24101c8389bc70 Author: Zdenek Kabelac <[email protected]> AuthorDate: Mon Jul 9 11:41:26 2018 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Mon Jul 9 15:28:32 2018 +0200
dmeventd: base vdo plugin
Introduce VDO plugin for monitoring VDO devices.
This plugin can be used also by other users, as plugin checks for UUID prefix 'LVM-' and run lvm actions only on those devices.
Non LVM- device are only monitored and log warnings when usage threshold reaches 80%.
--- WHATS_NEW_DM | 1 + configure | 3 +- configure.ac | 1 + daemons/dmeventd/libdevmapper-event.c | 1 + daemons/dmeventd/plugins/Makefile.in | 9 +- daemons/dmeventd/plugins/vdo/.exported_symbols | 3 + daemons/dmeventd/plugins/vdo/Makefile.in | 36 ++ daemons/dmeventd/plugins/vdo/dmeventd_vdo.c | 406 ++++++++++++++++++++++++ 8 files changed, 453 insertions(+), 7 deletions(-)
WHATS_NEW_DM +1 -0
@@ -1,5 +1,6 @@ Version 1.02.147 - ==================================== + Add vdo plugin for monitoring VDO devices. Version 1.02.147-rc1 - 24th May 2018 ====================================
configure +1 -1
@@ -13672,7 +13672,7 @@ _ACEOF ################################################################################ -ac_config_files="$ac_config_files Makefile make.tmpl libdm/make.tmpl daemons/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/lvmdbusd/Makefile daemons/lvmdbusd/lvmdbusd daemons/lvmdbusd/lvmdb.py daemons/lvmdbusd/lvm_shell_proxy.py daemons/lvmdbusd/path.py daemons/lvmetad/Makefile daemons/lvmpolld/Makefile daemons/lvmlockd/Makefile conf/Makefile conf/example.conf conf/lvmlocal.conf conf/command_profile_template.profile conf/metadata_profile_template.profile include/Makefile lib/Makefile include/lvm-version.h libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/dm-tools/Makefile libdm/libdevmapper.pc man/Makefile po/Makefile scripts/blkdeactivate.sh scripts /blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/cmirrord_init_red_hat scripts/com.redhat.lvmdbus1.service scripts/dm_event_systemd_red_hat.service scripts/dm_event_systemd_red_hat.socket scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmdbusd_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmpolld_init_red_hat scripts/lvm2_lvmpolld_systemd_red_hat.service scripts/lvm2_lvmpolld_systemd_red_hat.socket scripts/lvm2_lvmlockd_systemd_red_hat.service scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat at .service scripts/lvm2_tmpfiles_red_hat.conf scripts/lvmdump.sh scripts/Makefile test/Makefile tools/Makefile udev/Makefile" +ac_config_files="$ac_config_files Makefile make.tmpl libdm/make.tmpl daemons/Makefile daemons/cmirrord/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/dmeventd/plugins/vdo/Makefile daemons/lvmdbusd/Makefile daemons/lvmdbusd/lvmdbusd daemons/lvmdbusd/lvmdb.py daemons/lvmdbusd/lvm_shell_proxy.py daemons/lvmdbusd/path.py daemons/lvmetad/Makefile daemons/lvmpolld/Makefile daemons/lvmlockd/Makefile conf/Makefile conf/example.conf conf/lvmlocal.conf conf/command_profile_template.profile conf/metadata_profile_template.profile include/Makefile lib/Makefile include/lvm-version.h libdaemon/Makefile libdaemon/client/Makefile libdaemon/server/Makefile libdm/Makefile libdm/dm-tools/Makefile libdm/libdevmapper.pc man/Makefile po/Mak efile scripts/blkdeactivate.sh scripts/blk_availability_init_red_hat scripts/blk_availability_systemd_red_hat.service scripts/cmirrord_init_red_hat scripts/com.redhat.lvmdbus1.service scripts/dm_event_systemd_red_hat.service scripts/dm_event_systemd_red_hat.socket scripts/lvm2_cmirrord_systemd_red_hat.service scripts/lvm2_lvmdbusd_systemd_red_hat.service scripts/lvm2_lvmetad_init_red_hat scripts/lvm2_lvmetad_systemd_red_hat.service scripts/lvm2_lvmetad_systemd_red_hat.socket scripts/lvm2_lvmpolld_init_red_hat scripts/lvm2_lvmpolld_systemd_red_hat.service scripts/lvm2_lvmpolld_systemd_red_hat.socket scripts/lvm2_lvmlockd_systemd_red_hat.service scripts/lvm2_monitoring_init_red_hat scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_pvscan_systemd_red_hat at .service scripts/lvm2_tmpfiles_red_hat.conf scripts/lvmdump.sh scripts/Makefile test/Makefile tools/Makefile udev/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -14380,6 +14380,7 @@ do
"daemons/dmeventd/plugins/mirror/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/dmeventd/plugins/mirror/Makefile" ;;
"daemons/dmeventd/plugins/snapshot/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/dmeventd/plugins/snapshot/Makefile" ;;
"daemons/dmeventd/plugins/thin/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/dmeventd/plugins/thin/Makefile" ;;
+ "daemons/dmeventd/plugins/vdo/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/dmeventd/plugins/vdo/Makefile" ;;
"daemons/lvmdbusd/Makefile") CONFIG_FILES="$CONFIG_FILES daemons/lvmdbusd/Makefile" ;;
"daemons/lvmdbusd/lvmdbusd") CONFIG_FILES="$CONFIG_FILES daemons/lvmdbusd/lvmdbusd" ;;
"daemons/lvmdbusd/lvmdb.py") CONFIG_FILES="$CONFIG_FILES daemons/lvmdbusd/lvmdb.py" ;;configure.ac +1 -0
@@ -1775,6 +1775,7 @@ daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile +daemons/dmeventd/plugins/vdo/Makefile daemons/lvmdbusd/Makefile daemons/lvmdbusd/lvmdbusd daemons/lvmdbusd/lvmdb.py
daemons/dmeventd/libdevmapper-event.c +1 -0
@@ -648,6 +648,7 @@ int dm_event_register_handler(const struct dm_event_handler *dmevh) uuid =dm_task_get_uuid (dmt);if (!strstr (dmevh->dso,"libdevmapper-event-lvm2thin.so" ) && + !strstr (dmevh->dso,"libdevmapper-event-lvm2vdo.so" ) && !strstr (dmevh->dso,"libdevmapper-event-lvm2snapshot.so" ) && !strstr (dmevh->dso,"libdevmapper-event-lvm2mirror.so" ) && !strstr (dmevh->dso,"libdevmapper-event-lvm2raid.so" ))
daemons/dmeventd/plugins/Makefile.in +3 -6
@@ -1,6 +1,6 @@ # # Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. -# Copyright (C) 2004-2005, 2011 Red Hat, Inc. All rights reserved. +# Copyright (C) 2004-2018 Red Hat, Inc. All rights reserved. # # This file is part of LVM2. #
@@ -16,11 +16,7 @@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = @top_builddir@ -SUBDIRS += lvm2 snapshot raid thin mirror - -ifeq ($(MAKECMDGOALS),distclean) - SUBDIRS = lvm2 mirror snapshot raid thin -endif +SUBDIRS += lvm2 snapshot raid thin mirror vdo include $(top_builddir)/make.tmpl
@@ -28,3 +24,4 @@ snapshot: lvm2 mirror: lvm2 raid: lvm2 thin: lvm2 +vdo: lvm2
daemons/dmeventd/plugins/vdo/.exported_symbols new file +3 -0
@@ -0,0 +1,3 @@ +process_event +register_device +unregister_device
daemons/dmeventd/plugins/vdo/Makefile.in new file +36 -0
@@ -0,0 +1,36 @@ +# +# Copyright (C) 2018 Red Hat, Inc. All rights reserved. +# +# This file is part of LVM2. +# +# This copyrighted material is made available to anyone wishing to use, +# modify, copy, or redistribute it subject to the terms and conditions +# of the GNU General Public License v.2. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +top_builddir = @top_builddir@ + +INCLUDES += -I$(top_srcdir)/daemons/dmeventd/plugins/lvm2 +CLDFLAGS += -L$(top_builddir)/daemons/dmeventd/plugins/lvm2 + +SOURCES = dmeventd_vdo.c + +LIB_NAME = libdevmapper-event-lvm2vdo +LIB_SHARED = $(LIB_NAME).$(LIB_SUFFIX) +LIB_VERSION = $(LIB_VERSION_LVM) + +CFLOW_LIST = $(SOURCES) +CFLOW_LIST_TARGET = $(LIB_NAME).cflow + +include $(top_builddir)/make.tmpl + +LIBS += -ldevmapper-event-lvm2 $(INTERNAL_LIBS) + +install_lvm2: install_dm_plugin + +install: install_lvm2
daemons/dmeventd/plugins/vdo/dmeventd_vdo.c new file +406 -0
406 lines not on this page · raw message