From bad8b5848fe8e83095983fc0f035ab5190b9426a Mon Sep 17 00:00:00 2001 From: Jonathan Earl Brassow Date: Tue, 10 Apr 2012 23:34:41 +0000 Subject: [PATCH] Commit ID 46a75dedb4f6aa815a804f27cafbd3fd16a62011 consolidated code from the various dmeventd plug-ins into a new function called 'dmeventd_lvm2_command', but the new function did not strip off the "_mlog" extentions that the mirror plug-in had been doing. This created bug 794904 - failure to replace devices in a redundant log. The test suite did catch this scenario because it performs repair tests (mainly) through the CLI and not dmeventd. It's also not easy to test because the test itself will hang if the bug is encountered. --- WHATS_NEW | 1 + daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/WHATS_NEW b/WHATS_NEW index 4f374cee4..54860e8c7 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.96 - ================================ + Fix ability to handle failures in mirrored log (regression intro 2.02.89). Fix unlocking volume group in vgreduce in error path. Exit immediately if LISTEN_PID env var incorrect during systemd handover. Detect VG name being part of the LV name in lvconvert --splitmirrors -n. diff --git a/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c b/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c index 6d49c44f4..1bde50ea6 100644 --- a/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c +++ b/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c @@ -160,6 +160,11 @@ int dmeventd_lvm2_command(struct dm_pool *mem, char *buffer, size_t size, return 0; } + /* strip off the mirror component designations */ + layer = strstr(lv, "_mlog"); + if (layer) + *layer = '\0'; + r = dm_snprintf(buffer, size, "%s %s/%s", cmd, vg, lv); dm_pool_free(mem, vg); -- 2.43.5