]> git.proxmox.com Git - lvm.git/commitdiff
backport: udev: do not overwrite ID_MODEL in rules
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 10 Jul 2019 09:24:28 +0000 (11:24 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 10 Jul 2019 09:24:28 +0000 (11:24 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
patchdir/series
patchdir/udev-do-not-overwrite-ID_MODEL-in-69-dm-lvm-metad.rules.patch [new file with mode: 0644]

index f462706e9133c74dfcb5fc844faca17ad315775d..cb43ddcabaebfd94bbdbfbc629f4d7c528420f47 100644 (file)
@@ -1,3 +1,4 @@
 0001-filter-zvols-and-PVE-VG-by-default.patch
 0002-enable-issue_discards-by-default.patch
 0006-disable-init-scripts.patch
+udev-do-not-overwrite-ID_MODEL-in-69-dm-lvm-metad.rules.patch
diff --git a/patchdir/udev-do-not-overwrite-ID_MODEL-in-69-dm-lvm-metad.rules.patch b/patchdir/udev-do-not-overwrite-ID_MODEL-in-69-dm-lvm-metad.rules.patch
new file mode 100644 (file)
index 0000000..685dcf6
--- /dev/null
@@ -0,0 +1,181 @@
+Return-Path: <lvm-devel-bounces@redhat.com>\r
+Delivered-To: t.lamprecht@proxmox.com\r
+Received: from ronja.mits.lan\r
+       by ronja.mits.lan (Dovecot) with LMTP id idy8JP7dHV0mKgAAxxbTJA\r
+       for <t.lamprecht@proxmox.com>; Thu, 04 Jul 2019 13:07:42 +0200\r
+Received: from proxmox-new.maurer-it.com (unknown [192.168.2.33])\r
+       by ronja.mits.lan (Postfix) with ESMTPS id 8FA58F62263\r
+       for <t.lamprecht@proxmox.com>; Thu,  4 Jul 2019 13:07:42 +0200 (CEST)\r
+Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])\r
+       by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 879AB44B52\r
+       for <t.lamprecht@proxmox.com>; Thu,  4 Jul 2019 13:07:42 +0200 (CEST)\r
+Received-SPF: pass (redhat.com: Sender is authorized to use 'lvm-devel-bounces@redhat.com' in 'mfrom' identity (mechanism 'include:_spf1.redhat.com' matched)) receiver=proxmox-new.maurer-it.com; identity=mailfrom; envelope-from="lvm-devel-bounces@redhat.com"; helo=mx1.redhat.com; client-ip=209.132.183.28\r
+Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\r
+       (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by proxmox-new.maurer-it.com (Proxmox) with ESMTPS id 0DE964243E\r
+       for <t.lamprecht@proxmox.com>; Thu,  4 Jul 2019 13:07:41 +0200 (CEST)\r
+Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])\r
+       (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by mx1.redhat.com (Postfix) with ESMTPS id F282130872C6;\r
+       Thu,  4 Jul 2019 11:07:25 +0000 (UTC)\r
+Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20])\r
+       by smtp.corp.redhat.com (Postfix) with ESMTPS id CE13C83788;\r
+       Thu,  4 Jul 2019 11:07:24 +0000 (UTC)\r
+Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33])\r
+       by colo-mx.corp.redhat.com (Postfix) with ESMTP id 760F81833001;\r
+       Thu,  4 Jul 2019 11:07:21 +0000 (UTC)\r
+Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com\r
+       [10.5.11.22])\r
+       by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP\r
+       id x64B7JaO007864 for <lvm-devel@listman.util.phx.redhat.com>;\r
+       Thu, 4 Jul 2019 07:07:19 -0400\r
+Date: Thu, 4 Jul 2019 07:07:19 -0400\r
+Message-Id: <201907041107.x64B7JaO007864@lists01.pubmisc.prod.ext.phx2.redhat.com>\r
+Received: by smtp.corp.redhat.com (Postfix)\r
+       id 6787E1001DC3; Thu,  4 Jul 2019 11:07:19 +0000 (UTC)\r
+Delivered-To: lvm-devel@redhat.com\r
+Received: from mx1.redhat.com (ext-mx20.extmail.prod.ext.phx2.redhat.com\r
+       [10.5.110.49])\r
+       by smtp.corp.redhat.com (Postfix) with ESMTPS id 62FF91001DC0\r
+       for <lvm-devel@redhat.com>; Thu,  4 Jul 2019 11:07:17 +0000 (UTC)\r
+Received: from sourceware.org (server1.sourceware.org [209.132.180.131])\r
+       (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\r
+       (No client certificate requested)\r
+       by mx1.redhat.com (Postfix) with ESMTPS id 33BB3308FEC0\r
+       for <lvm-devel@redhat.com>; Thu,  4 Jul 2019 11:07:05 +0000 (UTC)\r
+DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=subject:to\r
+       :from; q=dns; s=default; b=Sc71Q7IiZLxQnJ1lJ+EDKzypccEhFgjukumiU\r
+       qR7vFBcgSOqEBXtLS9NNKulP0cmOW90Xr/eudPuyIGnS/yPeZ4EnwiThI/7BgBds\r
+       WmKrE82xUGD6o6rG7rhP3X/j+kC6Q70Uun7wrVD5dbof1QVObCYQW4G5dha6N2cY\r
+       EdJz0g=\r
+DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=subject\r
+       :to:from; s=default; bh=HI7A6l3rgbOCCMvAwMHjU04NEDQ=; b=vp9N3gLm\r
+       3VBq2DLa+TZyMRco0x61PCCkxYQ1z8kLyB3jt4lSVvuYaENYGlUlmZqwPpMbrZ0a\r
+       V5tfOOg5o3XuaBAte2toIlp4FyBbib54/Mg9tKqb0MGNm1BGi0o10wzlOQ4jXLl1\r
+       agkm6lbXO4hBN3ZH0mQKpsdhEfXVw4QoF0w=\r
+Received: (qmail 44545 invoked by uid 89); 4 Jul 2019 11:07:04 -0000\r
+Authentication-Results: sourceware.org; auth=none\r
+X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org\r
+X-Virus-Found: No\r
+X-Spam-SWARE-Status: No, score=-25.8 required=5.0 tests=ALL_TRUSTED, AWL,\r
+       BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,\r
+       MISSING_DATE, MISSING_MID autolearn=ham version=3.3.1 spammy=\r
+X-Spam-Status: No, score=-25.8 required=5.0 tests=ALL_TRUSTED, AWL, BAYES_00,\r
+       GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, MISSING_DATE,\r
+       MISSING_MID autolearn=ham version=3.3.1\r
+X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org\r
+X-HELO: sourceware.org\r
+Received: from localhost (HELO sourceware.org) (127.0.0.1)\r
+       by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\r
+       Thu, 04 Jul 2019 11:07:03 +0000\r
+To: lvm-devel@redhat.com\r
+X-Project: LVM2 upstream repository (moved from fedorahosted in Feb 2017)\r
+X-Git-Module: lvm2.git\r
+X-Git-Refname: refs/heads/stable-2.02\r
+X-Git-Reftype: branch\r
+X-Git-Oldrev: b13ebfa4c289a5bc6eb4f8ba26126db8e6d78296\r
+X-Git-Newrev: 1650c104384b81acd5b2e30f507624f98309f2ff\r
+From: Peter Rajnoha <prajnoha@sourceware.org>\r
+X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 216\r
+       matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com\r
+       [10.5.110.49]); Thu, 04 Jul 2019 11:07:05 +0000 (UTC)\r
+X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]);\r
+       Thu, 04 Jul 2019 11:07:05 +0000 (UTC) for IP:'209.132.180.131'\r
+       DOMAIN:'server1.sourceware.org' HELO:'sourceware.org'\r
+       FROM:'prajnoha@sourceware.org' RCPT:''\r
+X-RedHat-NoId: 209.132.180.131 sent message with No ID\r
+X-RedHat-Spam-Score: -1.005  (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU,\r
+       MISSING_DATE, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_MED,\r
+       SPF_HELO_PASS,\r
+       SPF_PASS) 209.132.180.131 server1.sourceware.org 209.132.180.131\r
+       server1.sourceware.org <prajnoha@sourceware.org>\r
+X-Scanned-By: MIMEDefang 2.84 on 10.5.110.49\r
+X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22\r
+X-loop: lvm-devel@redhat.com\r
+Subject: [lvm-devel] stable-2.02 - udev: do not overwrite ID_MODEL in\r
+       69-dm-lvm-metad.rules\r
+X-BeenThere: lvm-devel@redhat.com\r
+X-Mailman-Version: 2.1.12\r
+Precedence: junk\r
+Reply-To: LVM2 development <lvm-devel@redhat.com>\r
+List-Id: LVM2 development <lvm-devel.redhat.com>\r
+List-Unsubscribe: <https://www.redhat.com/mailman/options/lvm-devel>,\r
+       <mailto:lvm-devel-request@redhat.com?subject=unsubscribe>\r
+List-Archive: <https://www.redhat.com/archives/lvm-devel>\r
+List-Post: <mailto:lvm-devel@redhat.com>\r
+List-Help: <mailto:lvm-devel-request@redhat.com?subject=help>\r
+List-Subscribe: <https://www.redhat.com/mailman/listinfo/lvm-devel>,\r
+       <mailto:lvm-devel-request@redhat.com?subject=subscribe>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset="us-ascii"\r
+Content-Transfer-Encoding: 7bit\r
+Sender: lvm-devel-bounces@redhat.com\r
+Errors-To: lvm-devel-bounces@redhat.com\r
+X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15\r
+X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Thu, 04 Jul 2019 11:07:38 +0000 (UTC)\r
+X-SPAM-LEVEL: Spam detection results:  0\r
+       DKIM_INVALID              0.1 DKIM or DK signature exists, but is not valid\r
+       DKIM_SIGNED               0.1 Message has a DKIM or DK signature, not necessarily valid\r
+       HEADER_FROM_DIFFERENT_DOMAINS  0.001 From and EnvelopeFrom 2nd level mail domains are different\r
+       MAILING_LIST_MULTI         -1 Multiple indicators imply a widely-seen list manager\r
+       MSGID_FROM_MTA_HEADER   0.001 Message-Id was added by a relay\r
+       RCVD_IN_DNSWL_HI           -5 Sender listed at https://www.dnswl.org/, high trust\r
+       SPF_HELO_PASS          -0.001 SPF: HELO matches SPF record\r
+       SPF_PASS               -0.001 SPF: sender matches SPF record\r
+\r
+Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1650c104384b81acd5b2e30f507624f98309f2ff\r
+Commit:        1650c104384b81acd5b2e30f507624f98309f2ff\r
+Parent:        b13ebfa4c289a5bc6eb4f8ba26126db8e6d78296\r
+Author:        Peter Rajnoha <prajnoha@redhat.com>\r
+AuthorDate:    Thu Jul 4 12:57:55 2019 +0200\r
+Committer:     Peter Rajnoha <prajnoha@redhat.com>\r
+CommitterDate: Thu Jul 4 13:06:44 2019 +0200\r
+\r
+udev: do not overwrite ID_MODEL in 69-dm-lvm-metad.rules\r
+\r
+We've been assigning this in 69-dm-lvm-metad.rules:\r
+\r
+  ENV{ID_MODEL}="LVM PV $env{ID_FS_UUID_ENC} on /dev/$name"\r
+\r
+This was for the description to appear for each systemd device\r
+unit representing this device, for example:\r
+\r
+  $systemctl -a | grep "LVM PV"\r
+  dev-block-252:2.device                                                                                         loaded    active   plugged   LVM PV JhxC7B-YTgk-3jIU-5GVo-c4gV-W8t3-UUz06p on /dev/vda2 2\r
+  dev-disk-by\x2did-lvm\x2dpv\x2duuid\x2dJhxC7B\x2dYTgk\x2d3jIU\x2d5GVo\x2dc4gV\x2dW8t3\x2dUUz06p.device         loaded    active   plugged   LVM PV JhxC7B-YTgk-3jIU-5GVo-c4gV-W8t3-UUz06p on /dev/vda2 2\r
+  ...\r
+\r
+However, there could be an actual ID_MODEL that people are interested in\r
+more than the fact that this is an LVM PV and so we shouldn't overwrite\r
+the value.\r
+\r
+Also, we already have a symlink /dev/disk/by-id/lvm-pv-uuid-<PV_UUID>\r
+created which is then reflected as device unit (all device's symlinks\r
+have systemd device unit representation) so we can still reach this\r
+information in systemd unit listings even without setting the ID_MODEL.\r
+\r
+Reported here: https://github.com/lvmteam/lvm2/issues/21\r
+---\r
+ udev/69-dm-lvm-metad.rules.in |    1 -\r
+ 1 files changed, 0 insertions(+), 1 deletions(-)\r
+\r
+diff --git a/udev/69-dm-lvm-metad.rules.in b/udev/69-dm-lvm-metad.rules.in\r
+index 2ff8ddc..d510064 100644\r
+--- a/udev/69-dm-lvm-metad.rules.in\r
++++ b/udev/69-dm-lvm-metad.rules.in\r
+@@ -110,7 +110,6 @@ LABEL="systemd_background"\r
+ #  other |    X     |      X      |       X        |                   |   X\r
+ ACTION!="remove", ENV{LVM_PV_GONE}=="1", RUN+="(BINDIR)/systemd-run (LVM_EXEC)/lvm pvscan --cache $major:$minor", GOTO="lvm_end"\r
+ ENV{SYSTEMD_ALIAS}="/dev/block/$major:$minor"\r
+-ENV{ID_MODEL}="LVM PV $env{ID_FS_UUID_ENC} on /dev/$name"\r
+ ENV{SYSTEMD_WANTS}+="lvm2-pvscan@$major:$minor.service"\r
+ GOTO="lvm_end"\r
\r
+\r
+--\r
+lvm-devel mailing list\r
+lvm-devel@redhat.com\r
+https://www.redhat.com/mailman/listinfo/lvm-devel\r
+\r