New upstream release v2.03.06

This commit is contained in:
Marian Csontos 2019-10-23 11:28:43 +02:00
parent d50e806fd5
commit 81bc268451
11 changed files with 35 additions and 369 deletions

1
.gitignore vendored
View File

@ -90,3 +90,4 @@
/LVM2.2.02.184.tgz /LVM2.2.02.184.tgz
/LVM2.2.02.185.tgz /LVM2.2.02.185.tgz
/LVM2.2.03.05.tgz /LVM2.2.03.05.tgz
/LVM2.2.03.06.tgz

View File

@ -1,17 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABAgAGBQJdBJ/2AAoJELkRJDHlCQOfLpcP/3eY1mo/MlhPwxsz23a8v7sW
0NYZKqTC0N+xOc0lZ4kwDl1ru/b59T5gGwDinmXCqjP41fvT1PZlFklrsffyCI7i
jy1QO/a06r+w8xTmdwHL08tuhkO6gh8+BKsBChYsJhdGrgBibNRO9HvIlU8LpLFs
i96GXbjoZZ3irKxy+1OxCFer1Hd2ISbBBq/YHnGlA1h24awBsiL4YDNMxC+pIEiV
nqlypDFqeNe29y/IRWrq8D3WxOm5YK40lzTi59blvl5OAIZLnhtRKm+roGTuoML5
V/ZKbTYxr/LTclUS5cIkSxQEiJxNq0TIP8zVspgAroQFKx5JX8C40bzWEDTVnrsx
3wfJWN0jPyBwPox8/QjqScE1MJ+5G8iUOxbf/SuIpp103eBJ4RR+HzaQeig7BgP/
cpk80CZwKzlKTMYedmuAE4WK5igqncrdoW2AbtVvVQLUk7cp3tdLvxMyH2z+jv5D
DCpWHqc5eB+sMmD4+Vjp6Mrg2ViSEMdAmorTX0TPrd5meos39Ged3SUZ5v0M7N0q
Lhj2jT2oqPGXKp6/7HLGd4do7zBqX4oaJ1DcfhsEi2kEBIUYdE5o9qlqn22QacpJ
N/waVKjEjmi1AiMiAaZAP/WuutH3UJmpdRZn1Qvd+Xlx1Iw0YbY/8S9NAtKazzFq
iF8g3kZyRIcBfvq94k5q
=NABD
-----END PGP SIGNATURE-----

17
LVM2.2.03.06.tgz.asc Normal file
View File

@ -0,0 +1,17 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABAgAGBQJdsAjsAAoJELkRJDHlCQOf/qsP/RZNfxUnT3reSu7qor6IaeTZ
S9k/OUqmgnR2xeFlH0AgNRqW/pHVlhtMHXsolWPNhtjeshJpnCcpOBPuW6LUDbXM
yBVFE5UfIo7hHzIBmusJhu/nwEFaiMtnI1SG2iTuSVep/sk9LFEs6WrvG/nqil0F
QQYMwcsGl5KHCEjcd1GsEsE2HGy6Djd2qWTZO1qYQ8nHk2lDO/lkFqMDERCyyUK2
SP8+xvbiO6+ml+cOA1XhcTKxMd+PLlUi+TTad4WZOu+e1hP881l901ummaonKDKB
HC299Y5s5wdXDjQGiYcLeCABtXff7ZWpQ7pPEtr4apE8fM4CQE+rcMAH+xpCtP1H
L/+2qQuA3lgZYzM/IG+tc+0DJXgsRSJ3dxG1NfYNSAC19reCQ5yaygoMGI4gKYC4
dn9ZaDHPK2I3LFPtrI0vntD4HQqASaQBDed3GL8SdvM/4GbK6EXvkr3uc0LaMz7b
BggyVLonW/KvQR8ykeG5G1g6w3ZAqe5B4PoybQWHf9VMdjW0/UWVJ1wqkTUQ1Zgw
a+spTP2coRnfpwP619LkS30KcAKm50g4PZ/AFgTsNVMNGNIOVfX07Df4WWhKUNFC
ton9Y++rwHIIJB3c3argB0np7B0D/Z/dEW9+93B+zLSEBPNJcwzQXrAyFpLCdCqv
CHFr1cja02YEQbP9HKgV
=wZe+
-----END PGP SIGNATURE-----

View File

@ -1,149 +0,0 @@
From 32a8865a272d31d5bc12332a4da0309ce3af9243 Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Mon, 26 Aug 2019 14:35:51 +0200
Subject: [PATCH] Fix converting dbus.UInt types to string
With Python 3.8 converting these directly to string using str()
no longer works, we need to convert these to integer first.
On Python 3.8:
>>> str(dbus.Int64(1))
'dbus.Int64(1)'
On Python 3.7 (and older):
>>> str(dbus.UInt64(1))
'1'
This is probably related to removing __str__ function from method
from int (dbus.UInt is subclass of int) which happened in 3.8, see
https://docs.python.org/3.8/whatsnew/3.8.html
Signed-off-by: Vojtech Trefny <vtrefny@redhat.com>
---
daemons/lvmdbusd/cmdhandler.py | 35 ++++++++++++++++++----------------
1 file changed, 19 insertions(+), 16 deletions(-)
diff --git a/daemons/lvmdbusd/cmdhandler.py b/daemons/lvmdbusd/cmdhandler.py
index df854eb84..f7f6acdf9 100644
--- a/daemons/lvmdbusd/cmdhandler.py
+++ b/daemons/lvmdbusd/cmdhandler.py
@@ -217,7 +217,10 @@ def options_to_cli_args(options):
else:
rc.append("--%s" % k)
if v != "":
- rc.append(str(v))
+ if isinstance(v, int):
+ rc.append(str(int(v)))
+ else:
+ rc.append(str(v))
return rc
@@ -280,7 +283,7 @@ def vg_remove(vg_name, remove_options):
def vg_lv_create(vg_name, create_options, name, size_bytes, pv_dests):
cmd = ['lvcreate']
cmd.extend(options_to_cli_args(create_options))
- cmd.extend(['--size', str(size_bytes) + 'B'])
+ cmd.extend(['--size', '%dB' % size_bytes])
cmd.extend(['--name', name, vg_name, '--yes'])
pv_dest_ranges(cmd, pv_dests)
return call(cmd)
@@ -292,7 +295,7 @@ def vg_lv_snapshot(vg_name, snapshot_options, name, size_bytes):
cmd.extend(["-s"])
if size_bytes != 0:
- cmd.extend(['--size', str(size_bytes) + 'B'])
+ cmd.extend(['--size', '%dB' % size_bytes])
cmd.extend(['--name', name, vg_name])
return call(cmd)
@@ -303,9 +306,9 @@ def _vg_lv_create_common_cmd(create_options, size_bytes, thin_pool):
cmd.extend(options_to_cli_args(create_options))
if not thin_pool:
- cmd.extend(['--size', str(size_bytes) + 'B'])
+ cmd.extend(['--size', '%dB' % size_bytes])
else:
- cmd.extend(['--thin', '--size', str(size_bytes) + 'B'])
+ cmd.extend(['--thin', '--size', '%dB' % size_bytes])
cmd.extend(['--yes'])
return cmd
@@ -320,10 +323,10 @@ def vg_lv_create_linear(vg_name, create_options, name, size_bytes, thin_pool):
def vg_lv_create_striped(vg_name, create_options, name, size_bytes,
num_stripes, stripe_size_kb, thin_pool):
cmd = _vg_lv_create_common_cmd(create_options, size_bytes, thin_pool)
- cmd.extend(['--stripes', str(num_stripes)])
+ cmd.extend(['--stripes', str(int(num_stripes))])
if stripe_size_kb != 0:
- cmd.extend(['--stripesize', str(stripe_size_kb)])
+ cmd.extend(['--stripesize', str(int(stripe_size_kb))])
cmd.extend(['--name', name, vg_name])
return call(cmd)
@@ -336,13 +339,13 @@ def _vg_lv_create_raid(vg_name, create_options, name, raid_type, size_bytes,
cmd.extend(options_to_cli_args(create_options))
cmd.extend(['--type', raid_type])
- cmd.extend(['--size', str(size_bytes) + 'B'])
+ cmd.extend(['--size', '%dB' % size_bytes])
if num_stripes != 0:
- cmd.extend(['--stripes', str(num_stripes)])
+ cmd.extend(['--stripes', str(int(num_stripes))])
if stripe_size_kb != 0:
- cmd.extend(['--stripesize', str(stripe_size_kb)])
+ cmd.extend(['--stripesize', str(int(stripe_size_kb))])
cmd.extend(['--name', name, vg_name, '--yes'])
return call(cmd)
@@ -363,8 +366,8 @@ def vg_lv_create_mirror(
cmd.extend(options_to_cli_args(create_options))
cmd.extend(['--type', 'mirror'])
- cmd.extend(['--mirrors', str(num_copies)])
- cmd.extend(['--size', str(size_bytes) + 'B'])
+ cmd.extend(['--mirrors', str(int(num_copies))])
+ cmd.extend(['--size', '%dB' % size_bytes])
cmd.extend(['--name', name, vg_name, '--yes'])
return call(cmd)
@@ -418,7 +421,7 @@ def lv_resize(lv_full_name, size_change, pv_dests,
def lv_lv_create(lv_full_name, create_options, name, size_bytes):
cmd = ['lvcreate']
cmd.extend(options_to_cli_args(create_options))
- cmd.extend(['--virtualsize', str(size_bytes) + 'B', '-T'])
+ cmd.extend(['--virtualsize', '%dB' % size_bytes, '-T'])
cmd.extend(['--name', name, lv_full_name, '--yes'])
return call(cmd)
@@ -556,7 +559,7 @@ def pv_resize(device, size_bytes, create_options):
cmd.extend(options_to_cli_args(create_options))
if size_bytes != 0:
- cmd.extend(['--yes', '--setphysicalvolumesize', str(size_bytes) + 'B'])
+ cmd.extend(['--yes', '--setphysicalvolumesize', '%dB' % size_bytes])
cmd.extend([device])
return call(cmd)
@@ -652,12 +655,12 @@ def vg_allocation_policy(vg_name, policy, policy_options):
def vg_max_pv(vg_name, number, max_options):
- return _vg_value_set(vg_name, ['--maxphysicalvolumes', str(number)],
+ return _vg_value_set(vg_name, ['--maxphysicalvolumes', str(int(number))],
max_options)
def vg_max_lv(vg_name, number, max_options):
- return _vg_value_set(vg_name, ['-l', str(number)], max_options)
+ return _vg_value_set(vg_name, ['-l', str(int(number))], max_options)
def vg_uuid_gen(vg_name, ignore, options):
--
2.23.0

View File

@ -1,22 +0,0 @@
tools/command-lines.in | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/command-lines.in b/tools/command-lines.in
index 73a1e64..f914650 100644
--- a/tools/command-lines.in
+++ b/tools/command-lines.in
@@ -343,13 +343,11 @@ DESC: Convert LV to striped.
RULE: all not lv_is_locked lv_is_pvmove
lvconvert --type mirror LV
-OO: --mirrors SNumber, --regionsize RegionSize, --interval Number, --mirrorlog MirrorLog, OO_LVCONVERT
+OO: --mirrors SNumber, --stripes_long Number, --stripesize SizeKB, --regionsize RegionSize, --interval Number, --mirrorlog MirrorLog, OO_LVCONVERT
OP: PV ...
ID: lvconvert_raid_types
DESC: Convert LV to type mirror (also see type raid1),
-DESC: (also see lvconvert --mirrors).
RULE: all not lv_is_locked lv_is_pvmove
-FLAGS: SECONDARY_SYNTAX
# When LV is already raid, this changes the raid layout
# (changing layout of raid0 and raid1 not allowed.)

View File

@ -1,51 +0,0 @@
lib/metadata/metadata.c | 26 ++++++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 039a7d6..8dc8ca5 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -3507,19 +3507,41 @@ static void _set_pv_device(struct format_instance *fid,
struct physical_volume *pv)
{
char buffer[64] __attribute__((aligned(8)));
+ struct cmd_context *cmd = fid->fmt->cmd;
+ struct device *dev;
uint64_t size;
- if (!(pv->dev = lvmcache_device_from_pvid(fid->fmt->cmd, &pv->id, &pv->label_sector))) {
+ if (!(dev = lvmcache_device_from_pvid(cmd, &pv->id, &pv->label_sector))) {
if (!id_write_format(&pv->id, buffer, sizeof(buffer)))
buffer[0] = '\0';
- if (fid->fmt->cmd && !fid->fmt->cmd->pvscan_cache_single)
+ if (cmd && !cmd->pvscan_cache_single)
log_warn("WARNING: Couldn't find device with uuid %s.", buffer);
else
log_debug_metadata("Couldn't find device with uuid %s.", buffer);
}
/*
+ * If the device and PV are not the size, it's a clue that we might
+ * be reading an MD component (but not necessarily). Skip this check:
+ * . if md component detection is disabled
+ * . if we are already doing full a md check in label scan
+ * . if md_component_checks is auto, not none (full means use_full_md_check is set)
+ */
+ if (dev && (pv->size != dev->size) && cmd &&
+ cmd->md_component_detection &&
+ !cmd->use_full_md_check &&
+ !strcmp(cmd->md_component_checks, "auto")) {
+ if (dev_is_md_component(dev, NULL, 1)) {
+ log_warn("WARNING: device %s is an md component, not setting device for PV.",
+ dev_name(dev));
+ dev = NULL;
+ }
+ }
+
+ pv->dev = dev;
+
+ /*
* A previous command wrote the VG while this dev was missing, so
* the MISSING flag was included in the PV.
*/

View File

@ -1,61 +0,0 @@
tools/pvscan.c | 40 ++++++++++------------------------------
1 file changed, 10 insertions(+), 30 deletions(-)
diff --git a/tools/pvscan.c b/tools/pvscan.c
index d41345f..db813ad 100644
--- a/tools/pvscan.c
+++ b/tools/pvscan.c
@@ -621,6 +621,16 @@ static int _online_pvscan_one(struct cmd_context *cmd, struct device *dev,
set_pv_devices(baton.fid, baton.vg);
}
+ /* This check repeated because set_pv_devices can do new md check. */
+ if (dev->flags & DEV_IS_MD_COMPONENT) {
+ log_print("pvscan[%d] PV %s ignore MD component, ignore metadata.", getpid(), dev_name(dev));
+ if (baton.vg)
+ release_vg(baton.vg);
+ else
+ fmt->ops->destroy_instance(baton.fid);
+ return 1;
+ }
+
if (baton.vg && vg_is_shared(baton.vg)) {
log_print("pvscan[%d] PV %s ignore shared VG.", getpid(), dev_name(dev));
release_vg(baton.vg);
@@ -638,36 +648,6 @@ static int _online_pvscan_one(struct cmd_context *cmd, struct device *dev,
return 1;
}
- /*
- * Do not consider a device online (for purposes of autoactivation)
- * if its size does not match the PV size recorded in the metadata.
- * It may mean that it's not the correct dev for the PV, e.g. it
- * could be an md component device that's not been filtered.
- */
- if (baton.vg && cmd->check_pv_dev_sizes) {
- struct pv_list *pvl;
- uint64_t dev_size = 0;
- uint64_t meta_pv_size = 0;
-
- dm_list_iterate_items(pvl, &baton.vg->pvs) {
- if (pvl->pv->dev != dev)
- continue;
-
- if (!dev_get_size(dev, &dev_size))
- stack;
- meta_pv_size = pv_size(pvl->pv);
- break;
- }
-
- if (dev_size != meta_pv_size) {
- log_print("pvscan[%d] PV %s ignore for size %llu not matching device %llu.",
- getpid(), dev_name(dev),
- (unsigned long long)meta_pv_size, (unsigned long long)dev_size);
- release_vg(baton.vg);
- return 1;
- }
- }
-
ret = _online_pv_found(cmd, dev, dev_args, baton.vg, found_vgnames);
/*

View File

@ -1,51 +0,0 @@
From 94405cd283e6b0f66256928d0a95e6782881dc9f Mon Sep 17 00:00:00 2001
From: Peter Rajnoha <prajnoha@redhat.com>
Date: Tue, 13 Aug 2019 15:18:30 +0200
Subject: [PATCH] udev: remove unsupported OPTIONS+="event_timeout" rule
The OPTIONS+="event_timeout" is Unsupported since systemd/udev version 216,
that is ~5 years ago.
Since systemd/udev version 243, there's a new message printed if unsupported
OPTIONS value is used:
Invalid value for OPTIONS key, ignoring: 'event_timeout=180'
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1740666
(cherry picked from commit 125f27ac37bc9b93cc96f64052b9681b3d479ee1)
Conflicts:
WHATS_NEW
---
WHATS_NEW | 4 ++++
udev/11-dm-lvm.rules.in | 2 --
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 3a58de5..2e1aa13 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,3 +1,7 @@
+Version 2.03.06 -
+================================
+ Remove unsupported OPTIONS+="event_timeout" udev rule from 11-dm-lvm.rules.
+
Version 2.03.05 - 15th June 2019
================================
Fix command definition for pvchange -a.
diff --git a/udev/11-dm-lvm.rules.in b/udev/11-dm-lvm.rules.in
index 91cb991..7c58994 100644
--- a/udev/11-dm-lvm.rules.in
+++ b/udev/11-dm-lvm.rules.in
@@ -37,8 +37,6 @@ ENV{DM_SUBSYSTEM_UDEV_FLAG0}!="1", ENV{DM_NOSCAN}=="1", ENV{DM_UDEV_DISABLE_OTHE
ENV{DM_UDEV_DISABLE_SUBSYSTEM_RULES_FLAG}=="1", GOTO="lvm_end"
-OPTIONS+="event_timeout=180"
-
# Do not create symlinks for inappropriate subdevices.
ENV{DM_LV_NAME}=="pvmove?*|?*_vorigin", GOTO="lvm_disable"
ENV{DM_LV_LAYER}=="?*", GOTO="lvm_disable"
--
1.8.3.1

View File

@ -1,4 +1,4 @@
%global device_mapper_version 1.02.163 %global device_mapper_version 1.02.165
%global enable_cache 1 %global enable_cache 1
%global enable_cluster 1 %global enable_cluster 1
@ -56,20 +56,13 @@ Name: lvm2
%if 0%{?rhel} %if 0%{?rhel}
Epoch: %{rhel} Epoch: %{rhel}
%endif %endif
Version: 2.03.05 Version: 2.03.06
Release: 4%{?dist} Release: 1%{?dist}
License: GPLv2 License: GPLv2
URL: http://sourceware.org/lvm2 URL: http://sourceware.org/lvm2
#Source0: ftp://sourceware.org/pub/lvm2/releases/LVM2.%%{version}.tgz #Source0: ftp://sourceware.org/pub/lvm2/releases/LVM2.%%{version}.tgz
Source0: ftp://sourceware.org/pub/lvm2/releases/LVM2.%{version}.tgz Source0: ftp://sourceware.org/pub/lvm2/releases/LVM2.%{version}.tgz
Patch0: lvm2-set-default-preferred_names.patch Patch0: lvm2-set-default-preferred_names.patch
Patch1: lvm2-2_03_06-md-component-detection-for-differing-PV-and-device-size.patch
Patch2: lvm2-2_03_06-pvscan-fix-PV-online-when-device-has-a-different-size.patch
Patch3: lvm2-2_03_06-lvconvert-allow-stripes-stripesize-in-mirror-conversions.patch
# Bug 1745597 - LVM DBus API doesn't work with Python 3.8:
Patch4: lvm2-2_03_06-Fix-converting-dbus.UInt-types-to-string.patch
# Bug 1749857 - 11-dm-lvm.rules:40 Invalid value:
Patch5: lvm2-2_03_06-udev-remove-unsupported-OPTIONS-event_timeout-rule.patch
BuildRequires: gcc BuildRequires: gcc
%if %{enable_testsuite} %if %{enable_testsuite}
@ -126,11 +119,6 @@ or more physical volumes and creating one or more logical volumes
%prep %prep
%setup -q -n LVM2.%{version} %setup -q -n LVM2.%{version}
%patch0 -p1 -b .preferred_names %patch0 -p1 -b .preferred_names
%patch1 -p1 -b .md_component_detection_diff_PV_and_dev_size
%patch2 -p1 -b .fix_PV_activation_diff_PV_and_dev_size
%patch3 -p1 -b .allow_mirror_conversion_with_stripes
%patch4 -p1 -b .fix_converting_dbus.UInt_types_to_string
%patch5 -p1 -b .udev_remove_unsupported_OPTIONS_event_timeout_rule
%build %build
%global _default_pid_dir /run %global _default_pid_dir /run
@ -151,7 +139,7 @@ or more physical volumes and creating one or more logical volumes
%endif %endif
%if %{enable_lockd_dlm} %if %{enable_lockd_dlm}
%global configure_lockd_dlm --enable-lvmlockd-dlm %global configure_lockd_dlm --enable-lvmlockd-dlm --enable-lvmlockd-dlmcontrol
%endif %endif
%if %{enable_lockd_sanlock} %if %{enable_lockd_sanlock}
%global configure_lockd_sanlock --enable-lvmlockd-sanlock %global configure_lockd_sanlock --enable-lvmlockd-sanlock
@ -736,6 +724,17 @@ An extensive functional testsuite for LVM2.
%endif %endif
%changelog %changelog
* Wed Oct 23 2019 Marian Csontos <mcsontos@redhat.com> - 2.03.06-1
- IMPORTANT: Prevent creating VGs with PVs with different logical block sizes.
- Fix metadata writes from corrupting with large physical block size.
- Correctly set read_ahead for LVs when pvmove is finished.
- Add support for DM_DEVICE_GET_TARGET_VERSION into device_mapper.
- Activate thin-pool layered volume as 'read-only' device.
- Ignore crypto devices with UUID signature CRYPT-SUBDEV.
- Synchronize with udev when dropping snapshot.
- Add missing device synchronization point before removing pvmove node.
- See WHATS_NEW for more.
* Wed Sep 18 2019 Marian Csontos <mcsontos@redhat.com> - 2.03.05-4 * Wed Sep 18 2019 Marian Csontos <mcsontos@redhat.com> - 2.03.05-4
- Remove unsupported OPTIONS+="event_timeout" from udev rule (#1749857) - Remove unsupported OPTIONS+="event_timeout" from udev rule (#1749857)

View File

@ -1 +1 @@
SHA512 (LVM2.2.03.05.tgz) = 3b00f53771e99faa6459ae73353bff06ae37c64bd2659586ec25d0bb43bc3ff8ba5f713c68617fd7662a5f6cb65bca1ad0aea554819048d79c1cce20bf67c50a SHA512 (LVM2.2.03.06.tgz) = 2a01d34fa58348b0fac3d40a9ce736aa499af18c7e9bf96a3eeefc6a2de6a73460c83b6c67be20e9bd440998cbf847bc3e7a028385f38d715e221a5a857d391f

View File

@ -1 +1 @@
LVM2.2.03.05.tgz LVM2.2.03.06.tgz