]> git.proxmox.com Git - lvm.git/blob - patchdir/udev-do-not-overwrite-ID_MODEL-in-69-dm-lvm-metad.rules.patch
backport: udev: do not overwrite ID_MODEL in rules
[lvm.git] / patchdir / udev-do-not-overwrite-ID_MODEL-in-69-dm-lvm-metad.rules.patch
1 Return-Path: <lvm-devel-bounces@redhat.com>
2 Delivered-To: t.lamprecht@proxmox.com
3 Received: from ronja.mits.lan
4 by ronja.mits.lan (Dovecot) with LMTP id idy8JP7dHV0mKgAAxxbTJA
5 for <t.lamprecht@proxmox.com>; Thu, 04 Jul 2019 13:07:42 +0200
6 Received: from proxmox-new.maurer-it.com (unknown [192.168.2.33])
7 by ronja.mits.lan (Postfix) with ESMTPS id 8FA58F62263
8 for <t.lamprecht@proxmox.com>; Thu, 4 Jul 2019 13:07:42 +0200 (CEST)
9 Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1])
10 by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 879AB44B52
11 for <t.lamprecht@proxmox.com>; Thu, 4 Jul 2019 13:07:42 +0200 (CEST)
12 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
13 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28])
14 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
15 (No client certificate requested)
16 by proxmox-new.maurer-it.com (Proxmox) with ESMTPS id 0DE964243E
17 for <t.lamprecht@proxmox.com>; Thu, 4 Jul 2019 13:07:41 +0200 (CEST)
18 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15])
19 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
20 (No client certificate requested)
21 by mx1.redhat.com (Postfix) with ESMTPS id F282130872C6;
22 Thu, 4 Jul 2019 11:07:25 +0000 (UTC)
23 Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20])
24 by smtp.corp.redhat.com (Postfix) with ESMTPS id CE13C83788;
25 Thu, 4 Jul 2019 11:07:24 +0000 (UTC)
26 Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33])
27 by colo-mx.corp.redhat.com (Postfix) with ESMTP id 760F81833001;
28 Thu, 4 Jul 2019 11:07:21 +0000 (UTC)
29 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com
30 [10.5.11.22])
31 by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
32 id x64B7JaO007864 for <lvm-devel@listman.util.phx.redhat.com>;
33 Thu, 4 Jul 2019 07:07:19 -0400
34 Date: Thu, 4 Jul 2019 07:07:19 -0400
35 Message-Id: <201907041107.x64B7JaO007864@lists01.pubmisc.prod.ext.phx2.redhat.com>
36 Received: by smtp.corp.redhat.com (Postfix)
37 id 6787E1001DC3; Thu, 4 Jul 2019 11:07:19 +0000 (UTC)
38 Delivered-To: lvm-devel@redhat.com
39 Received: from mx1.redhat.com (ext-mx20.extmail.prod.ext.phx2.redhat.com
40 [10.5.110.49])
41 by smtp.corp.redhat.com (Postfix) with ESMTPS id 62FF91001DC0
42 for <lvm-devel@redhat.com>; Thu, 4 Jul 2019 11:07:17 +0000 (UTC)
43 Received: from sourceware.org (server1.sourceware.org [209.132.180.131])
44 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
45 (No client certificate requested)
46 by mx1.redhat.com (Postfix) with ESMTPS id 33BB3308FEC0
47 for <lvm-devel@redhat.com>; Thu, 4 Jul 2019 11:07:05 +0000 (UTC)
48 DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=subject:to
49 :from; q=dns; s=default; b=Sc71Q7IiZLxQnJ1lJ+EDKzypccEhFgjukumiU
50 qR7vFBcgSOqEBXtLS9NNKulP0cmOW90Xr/eudPuyIGnS/yPeZ4EnwiThI/7BgBds
51 WmKrE82xUGD6o6rG7rhP3X/j+kC6Q70Uun7wrVD5dbof1QVObCYQW4G5dha6N2cY
52 EdJz0g=
53 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=subject
54 :to:from; s=default; bh=HI7A6l3rgbOCCMvAwMHjU04NEDQ=; b=vp9N3gLm
55 3VBq2DLa+TZyMRco0x61PCCkxYQ1z8kLyB3jt4lSVvuYaENYGlUlmZqwPpMbrZ0a
56 V5tfOOg5o3XuaBAte2toIlp4FyBbib54/Mg9tKqb0MGNm1BGi0o10wzlOQ4jXLl1
57 agkm6lbXO4hBN3ZH0mQKpsdhEfXVw4QoF0w=
58 Received: (qmail 44545 invoked by uid 89); 4 Jul 2019 11:07:04 -0000
59 Authentication-Results: sourceware.org; auth=none
60 X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org
61 X-Virus-Found: No
62 X-Spam-SWARE-Status: No, score=-25.8 required=5.0 tests=ALL_TRUSTED, AWL,
63 BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,
64 MISSING_DATE, MISSING_MID autolearn=ham version=3.3.1 spammy=
65 X-Spam-Status: No, score=-25.8 required=5.0 tests=ALL_TRUSTED, AWL, BAYES_00,
66 GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, MISSING_DATE,
67 MISSING_MID autolearn=ham version=3.3.1
68 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org
69 X-HELO: sourceware.org
70 Received: from localhost (HELO sourceware.org) (127.0.0.1)
71 by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;
72 Thu, 04 Jul 2019 11:07:03 +0000
73 To: lvm-devel@redhat.com
74 X-Project: LVM2 upstream repository (moved from fedorahosted in Feb 2017)
75 X-Git-Module: lvm2.git
76 X-Git-Refname: refs/heads/stable-2.02
77 X-Git-Reftype: branch
78 X-Git-Oldrev: b13ebfa4c289a5bc6eb4f8ba26126db8e6d78296
79 X-Git-Newrev: 1650c104384b81acd5b2e30f507624f98309f2ff
80 From: Peter Rajnoha <prajnoha@sourceware.org>
81 X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 216
82 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com
83 [10.5.110.49]); Thu, 04 Jul 2019 11:07:05 +0000 (UTC)
84 X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]);
85 Thu, 04 Jul 2019 11:07:05 +0000 (UTC) for IP:'209.132.180.131'
86 DOMAIN:'server1.sourceware.org' HELO:'sourceware.org'
87 FROM:'prajnoha@sourceware.org' RCPT:''
88 X-RedHat-NoId: 209.132.180.131 sent message with No ID
89 X-RedHat-Spam-Score: -1.005 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU,
90 MISSING_DATE, MSGID_FROM_MTA_HEADER, RCVD_IN_DNSWL_MED,
91 SPF_HELO_PASS,
92 SPF_PASS) 209.132.180.131 server1.sourceware.org 209.132.180.131
93 server1.sourceware.org <prajnoha@sourceware.org>
94 X-Scanned-By: MIMEDefang 2.84 on 10.5.110.49
95 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22
96 X-loop: lvm-devel@redhat.com
97 Subject: [lvm-devel] stable-2.02 - udev: do not overwrite ID_MODEL in
98 69-dm-lvm-metad.rules
99 X-BeenThere: lvm-devel@redhat.com
100 X-Mailman-Version: 2.1.12
101 Precedence: junk
102 Reply-To: LVM2 development <lvm-devel@redhat.com>
103 List-Id: LVM2 development <lvm-devel.redhat.com>
104 List-Unsubscribe: <https://www.redhat.com/mailman/options/lvm-devel>,
105 <mailto:lvm-devel-request@redhat.com?subject=unsubscribe>
106 List-Archive: <https://www.redhat.com/archives/lvm-devel>
107 List-Post: <mailto:lvm-devel@redhat.com>
108 List-Help: <mailto:lvm-devel-request@redhat.com?subject=help>
109 List-Subscribe: <https://www.redhat.com/mailman/listinfo/lvm-devel>,
110 <mailto:lvm-devel-request@redhat.com?subject=subscribe>
111 MIME-Version: 1.0
112 Content-Type: text/plain; charset="us-ascii"
113 Content-Transfer-Encoding: 7bit
114 Sender: lvm-devel-bounces@redhat.com
115 Errors-To: lvm-devel-bounces@redhat.com
116 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15
117 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)
118 X-SPAM-LEVEL: Spam detection results: 0
119 DKIM_INVALID 0.1 DKIM or DK signature exists, but is not valid
120 DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid
121 HEADER_FROM_DIFFERENT_DOMAINS 0.001 From and EnvelopeFrom 2nd level mail domains are different
122 MAILING_LIST_MULTI -1 Multiple indicators imply a widely-seen list manager
123 MSGID_FROM_MTA_HEADER 0.001 Message-Id was added by a relay
124 RCVD_IN_DNSWL_HI -5 Sender listed at https://www.dnswl.org/, high trust
125 SPF_HELO_PASS -0.001 SPF: HELO matches SPF record
126 SPF_PASS -0.001 SPF: sender matches SPF record
127
128 Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1650c104384b81acd5b2e30f507624f98309f2ff
129 Commit: 1650c104384b81acd5b2e30f507624f98309f2ff
130 Parent: b13ebfa4c289a5bc6eb4f8ba26126db8e6d78296
131 Author: Peter Rajnoha <prajnoha@redhat.com>
132 AuthorDate: Thu Jul 4 12:57:55 2019 +0200
133 Committer: Peter Rajnoha <prajnoha@redhat.com>
134 CommitterDate: Thu Jul 4 13:06:44 2019 +0200
135
136 udev: do not overwrite ID_MODEL in 69-dm-lvm-metad.rules
137
138 We've been assigning this in 69-dm-lvm-metad.rules:
139
140 ENV{ID_MODEL}="LVM PV $env{ID_FS_UUID_ENC} on /dev/$name"
141
142 This was for the description to appear for each systemd device
143 unit representing this device, for example:
144
145 $systemctl -a | grep "LVM PV"
146 dev-block-252:2.device loaded active plugged LVM PV JhxC7B-YTgk-3jIU-5GVo-c4gV-W8t3-UUz06p on /dev/vda2 2
147 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
148 ...
149
150 However, there could be an actual ID_MODEL that people are interested in
151 more than the fact that this is an LVM PV and so we shouldn't overwrite
152 the value.
153
154 Also, we already have a symlink /dev/disk/by-id/lvm-pv-uuid-<PV_UUID>
155 created which is then reflected as device unit (all device's symlinks
156 have systemd device unit representation) so we can still reach this
157 information in systemd unit listings even without setting the ID_MODEL.
158
159 Reported here: https://github.com/lvmteam/lvm2/issues/21
160 ---
161 udev/69-dm-lvm-metad.rules.in | 1 -
162 1 files changed, 0 insertions(+), 1 deletions(-)
163
164 diff --git a/udev/69-dm-lvm-metad.rules.in b/udev/69-dm-lvm-metad.rules.in
165 index 2ff8ddc..d510064 100644
166 --- a/udev/69-dm-lvm-metad.rules.in
167 +++ b/udev/69-dm-lvm-metad.rules.in
168 @@ -110,7 +110,6 @@ LABEL="systemd_background"
169 # other | X | X | X | | X
170 ACTION!="remove", ENV{LVM_PV_GONE}=="1", RUN+="(BINDIR)/systemd-run (LVM_EXEC)/lvm pvscan --cache $major:$minor", GOTO="lvm_end"
171 ENV{SYSTEMD_ALIAS}="/dev/block/$major:$minor"
172 -ENV{ID_MODEL}="LVM PV $env{ID_FS_UUID_ENC} on /dev/$name"
173 ENV{SYSTEMD_WANTS}+="lvm2-pvscan@$major:$minor.service"
174 GOTO="lvm_end"
175
176
177 --
178 lvm-devel mailing list
179 lvm-devel@redhat.com
180 https://www.redhat.com/mailman/listinfo/lvm-devel
181