GNU logs - #25756, boring messages


Message sent to bug-parted@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#25756: Problems using "parted ... print" on nvme devices
Resent-From: Douglas Miller <dougmill@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-parted@HIDDEN
Resent-Date: Thu, 16 Feb 2017 16:35:03 +0000
Resent-Message-ID: <handler.25756.B.148726288714909 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 25756
X-GNU-PR-Package: parted
X-GNU-PR-Keywords: 
To: 25756 <at> debbugs.gnu.org
Cc: Guilherme Piccoli <gpiccoli@HIDDEN>, chavez@HIDDEN, ruddk@HIDDEN
X-Debbugs-Original-To: bug-parted@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.148726288714909
          (code B ref -1); Thu, 16 Feb 2017 16:35:03 +0000
Received: (at submit) by debbugs.gnu.org; 16 Feb 2017 16:34:47 +0000
Received: from localhost ([127.0.0.1]:42406 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ceP14-0003sP-9F
	for submit <at> debbugs.gnu.org; Thu, 16 Feb 2017 11:34:47 -0500
Received: from eggs.gnu.org ([208.118.235.92]:42009)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dougmill@HIDDEN>) id 1ceNg8-0001rY-VF
 for submit <at> debbugs.gnu.org; Thu, 16 Feb 2017 10:09:05 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dougmill@HIDDEN>) id 1ceNg3-0006iE-3B
 for submit <at> debbugs.gnu.org; Thu, 16 Feb 2017 10:08:59 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:47989)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <dougmill@HIDDEN>)
 id 1ceNg2-0006iA-Vy
 for submit <at> debbugs.gnu.org; Thu, 16 Feb 2017 10:08:59 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:32967)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <dougmill@HIDDEN>) id 1ceNg1-0006jM-Nq
 for bug-parted@HIDDEN; Thu, 16 Feb 2017 10:08:58 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <dougmill@HIDDEN>) id 1ceNfy-0006gV-J4
 for bug-parted@HIDDEN; Thu, 16 Feb 2017 10:08:57 -0500
Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:36614)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <dougmill@HIDDEN>)
 id 1ceNfy-0006g6-9z
 for bug-parted@HIDDEN; Thu, 16 Feb 2017 10:08:54 -0500
Received: from pps.filterd (m0098409.ppops.net [127.0.0.1])
 by mx0a-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id
 v1GEwfa8031555
 for <bug-parted@HIDDEN>; Thu, 16 Feb 2017 10:08:51 -0500
Received: from e36.co.us.ibm.com (e36.co.us.ibm.com [32.97.110.154])
 by mx0a-001b2d01.pphosted.com with ESMTP id 28nanua5pv-1
 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT)
 for <bug-parted@HIDDEN>; Thu, 16 Feb 2017 10:08:51 -0500
Received: from localhost
 by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only!
 Violators will be prosecuted
 for <bug-parted@HIDDEN> from <dougmill@HIDDEN>;
 Thu, 16 Feb 2017 08:08:50 -0700
Received: from d03dlp03.boulder.ibm.com (9.17.202.179)
 by e36.co.us.ibm.com (192.168.1.136) with IBM ESMTP SMTP Gateway: Authorized
 Use Only! Violators will be prosecuted; 
 Thu, 16 Feb 2017 08:08:47 -0700
Received: from b01cxnp22034.gho.pok.ibm.com (b01cxnp22034.gho.pok.ibm.com
 [9.57.198.24])
 by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 9A70019D8048
 for <bug-parted@HIDDEN>; Thu, 16 Feb 2017 08:07:59 -0700 (MST)
Received: from b01ledav03.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com
 [9.57.199.108])
 by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id
 v1GF8f3o41550040; Thu, 16 Feb 2017 15:08:45 GMT
Received: from b01ledav03.gho.pok.ibm.com (unknown [127.0.0.1])
 by IMSVA (Postfix) with ESMTP id C6573B205D;
 Thu, 16 Feb 2017 10:08:44 -0500 (EST)
Received: from oc5780617838.ibm.com (unknown [9.80.104.105])
 by b01ledav03.gho.pok.ibm.com (Postfix) with ESMTP id 6D61FB2052;
 Thu, 16 Feb 2017 10:08:44 -0500 (EST)
From: Douglas Miller <dougmill@HIDDEN>
Date: Thu, 16 Feb 2017 09:08:44 -0600
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.7.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-TM-AS-GCONF: 00
X-Content-Scanned: Fidelis XPS MAILER
x-cbid: 17021615-0020-0000-0000-00000B654297
X-IBM-SpamModules-Scores: 
X-IBM-SpamModules-Versions: BY=3.00006627; HX=3.00000240; KW=3.00000007;
 PH=3.00000004; SC=3.00000203; SDB=6.00822811; UDB=6.00402573; IPR=6.00600257; 
 BA=6.00005146; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000;
 ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00014307; XFM=3.00000011;
 UTC=2017-02-16 15:08:48
X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused
x-cbparentid: 17021615-0021-0000-0000-00005A2B6BC6
Message-Id: <6d39b347-1b01-68d1-a3f3-91e6dcadf08f@HIDDEN>
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, ,
 definitions=2017-02-16_10:, , signatures=0
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
 spamscore=0 suspectscore=1
 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam
 adjust=0 reason=mlx scancount=1 engine=8.0.1-1612050000
 definitions=main-1702160144
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Mailman-Approved-At: Thu, 16 Feb 2017 11:34:45 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

We have seen a problem in some test infrastructure that uses "parted ... 
print" to query partition information and then configure test cases. The 
problem shows up when using parted on nvme drives because systemd.udevd 
is monitoring nvme devices for changes to the partition tables, and 
rebuilds the devices. This results in the devices disappearing for a few 
seconds after running "parted ... print" and causing failures to 
configure tests. The root cause is that parted opens the device "O_RDWR" 
regardless of whether it is actually modifying the partition table, and 
this notifies systemd-udevd causing the disruption in the block devices.

I have not worked up a patch yet, or even studied the code in-depth, but 
it seems to me that parted could be better about using open modes that 
reflect it's true intentions. Does that seem like a reasonable change?

I expect that our test infrastructure will have to be modified, probably 
to use fdisk or something other than parted, but it still seems like 
something to be fixed.


Thoughts?

Thanks,

Doug





Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Douglas Miller <dougmill@HIDDEN>
Subject: bug#25756: Acknowledgement (Problems using "parted ... print" on
 nvme devices)
Message-ID: <handler.25756.B.148726288714909.ack <at> debbugs.gnu.org>
References: <6d39b347-1b01-68d1-a3f3-91e6dcadf08f@HIDDEN>
X-Gnu-PR-Message: ack 25756
X-Gnu-PR-Package: parted
Reply-To: 25756 <at> debbugs.gnu.org
Date: Thu, 16 Feb 2017 16:35:04 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-parted@HIDDEN

If you wish to submit further information on this problem, please
send it to 25756 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
25756: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D25756
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-parted@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#25756: Problems using "parted ... print" on nvme devices
Resent-From: "Brian C. Lane" <bcl@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-parted@HIDDEN
Resent-Date: Thu, 16 Feb 2017 17:33:02 +0000
Resent-Message-ID: <handler.25756.B.148726635620463 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 25756
X-GNU-PR-Package: parted
X-GNU-PR-Keywords: 
To: 25756 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-parted@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.148726635620463
          (code B ref -1); Thu, 16 Feb 2017 17:33:02 +0000
Received: (at submit) by debbugs.gnu.org; 16 Feb 2017 17:32:36 +0000
Received: from localhost ([127.0.0.1]:42485 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cePv2-0005Jz-5W
	for submit <at> debbugs.gnu.org; Thu, 16 Feb 2017 12:32:36 -0500
Received: from eggs.gnu.org ([208.118.235.92]:57451)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bcl@HIDDEN>) id 1cePv0-0005Jm-I5
 for submit <at> debbugs.gnu.org; Thu, 16 Feb 2017 12:32:35 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <bcl@HIDDEN>) id 1cePuu-0006QV-Gy
 for submit <at> debbugs.gnu.org; Thu, 16 Feb 2017 12:32:29 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:37003)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <bcl@HIDDEN>) id 1cePuu-0006QK-Da
 for submit <at> debbugs.gnu.org; Thu, 16 Feb 2017 12:32:28 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48413)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <bcl@HIDDEN>) id 1cePut-00018l-8K
 for bug-parted@HIDDEN; Thu, 16 Feb 2017 12:32:28 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <bcl@HIDDEN>) id 1cePup-0006Om-Ua
 for bug-parted@HIDDEN; Thu, 16 Feb 2017 12:32:27 -0500
Received: from mx1.redhat.com ([209.132.183.28]:56002)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <bcl@HIDDEN>) id 1cePup-0006O7-PK
 for bug-parted@HIDDEN; Thu, 16 Feb 2017 12:32:23 -0500
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
 (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx1.redhat.com (Postfix) with ESMTPS id F3112C0567A1
 for <bug-parted@HIDDEN>; Thu, 16 Feb 2017 17:32:22 +0000 (UTC)
Received: from lister.brianlane.com (ovpn-112-16.phx2.redhat.com [10.3.112.16])
 by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 v1GHWKeo011765
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)
 for <bug-parted@HIDDEN>; Thu, 16 Feb 2017 12:32:22 -0500
Date: Thu, 16 Feb 2017 09:32:18 -0800
From: "Brian C. Lane" <bcl@HIDDEN>
Message-ID: <20170216173218.GQ2666@HIDDEN>
References: <6d39b347-1b01-68d1-a3f3-91e6dcadf08f@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <6d39b347-1b01-68d1-a3f3-91e6dcadf08f@HIDDEN>
User-Agent: Mutt/1.7.1 (2016-10-04)
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
 (mx1.redhat.com [10.5.110.32]); Thu, 16 Feb 2017 17:32:23 +0000 (UTC)
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.1 (----)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.1 (----)

On Thu, Feb 16, 2017 at 09:08:44AM -0600, Douglas Miller wrote:
> We have seen a problem in some test infrastructure that uses "parted ...
> print" to query partition information and then configure test cases. The
> problem shows up when using parted on nvme drives because systemd.udevd is
> monitoring nvme devices for changes to the partition tables, and rebuilds
> the devices. This results in the devices disappearing for a few seconds
> after running "parted ... print" and causing failures to configure tests.
> The root cause is that parted opens the device "O_RDWR" regardless of
> whether it is actually modifying the partition table, and this notifies
> systemd-udevd causing the disruption in the block devices.
> 
> I have not worked up a patch yet, or even studied the code in-depth, but it
> seems to me that parted could be better about using open modes that reflect
> it's true intentions. Does that seem like a reasonable change?
> 
> I expect that our test infrastructure will have to be modified, probably to
> use fdisk or something other than parted, but it still seems like something
> to be fixed.

I think the tricky part of that is going to be that when we open the
device we don't really know what commands are going to be issued so it
needs to be RDWR to allow for all the other possibilities.

There should be some way to lock out udev during your tests.

-- 
Brian C. Lane (PST8PDT)




Message sent to bug-parted@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#25756: systemd mucking with partition tables ( was: bug#25756: Problems using "parted ... print" on nvme devices )
Resent-From: Phil Susi <psusi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-parted@HIDDEN
Resent-Date: Wed, 19 Apr 2017 13:01:01 +0000
Resent-Message-ID: <handler.25756.B25756.149260682121443 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 25756
X-GNU-PR-Package: parted
X-GNU-PR-Keywords: 
To: "Brian C. Lane" <bcl@HIDDEN>, 25756 <at> debbugs.gnu.org
Cc: systemd-devel@HIDDEN
Received: via spool by 25756-submit <at> debbugs.gnu.org id=B25756.149260682121443
          (code B ref 25756); Wed, 19 Apr 2017 13:01:01 +0000
Received: (at 25756) by debbugs.gnu.org; 19 Apr 2017 13:00:21 +0000
Received: from localhost ([127.0.0.1]:55676 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d0pDY-0005Zm-Qd
	for submit <at> debbugs.gnu.org; Wed, 19 Apr 2017 09:00:21 -0400
Received: from mail-ua0-f196.google.com ([209.85.217.196]:35931)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <phillsusi@HIDDEN>) id 1d0pDW-0005ZU-Go
 for 25756 <at> debbugs.gnu.org; Wed, 19 Apr 2017 09:00:19 -0400
Received: by mail-ua0-f196.google.com with SMTP id q26so2100357uaa.3
 for <25756 <at> debbugs.gnu.org>; Wed, 19 Apr 2017 06:00:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:references:cc:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-transfer-encoding;
 bh=GvK5lD3d01XDYxfgbn68xXZssF31Pll2LWdMNtpv7FI=;
 b=h9yP9ZU8VMfVRTZr8+l17VSSibEFl7uK1OoVE7CAL/fApUvTXdIclRsyybVJ9CMmKU
 iZQZ24RSG4BrLHtWIwq+RJJuQvkiDQxVCE6LlVQM3Tp3DtDxg9jp8z5idC4nThyxpCX1
 qMHBrN2HeUDiQi2HxONf8V/cvJyjbhpgulsQZO+DZbFnbJF/F4okBHuxRNIB9zRNynrl
 K5fTvjMRjE1j6I63YV6vbHe+yfiz4lvLnWd/fc0b2lfGpQlLw+5Mb4wI/+SOmEPjkdJ3
 5qwdr57ExFFlpq26V/Kup2dvCRZjjA44dr/1dxZoy/Jjk3P9iY8CP/tzUUsVJQxc232i
 SBVA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:references:cc:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-transfer-encoding;
 bh=GvK5lD3d01XDYxfgbn68xXZssF31Pll2LWdMNtpv7FI=;
 b=qcacGiUsk3WAuHgRy4JUWqQVW4311wrdvMp70+9dS8OFwVD2TAbclKe1ogy81uem0L
 GtQ1xNK9SCOYh9a4Q3Fmi4D0rfcZoKKaIKgNULzqR+KBIo1f6X9NRWppNKhOcJxcSrmX
 GORkmy3pjW6LYBDYT1/uIxU6uH1uuAD5GSuZBlOEDIbzbVyjlTfF36V/ADluvHi0mv3K
 fs3K1uI2whg3/c7xX7fGywuKqCdJw97klPOnbfXURXDWsvThnvToeOj2uN5HxCIhbBk+
 X4TRkwaR22utaWFRDQERfJkgrb6jGiQxeXBhvJK6/Fi8j9YeDyHl0x3dNEMAG3NRiRXw
 NBAg==
X-Gm-Message-State: AN3rC/7ApUJCtPPnGZNeMz8hQxrhT8rfO3bW+6yXSrjrQ3KpB7gYAk5+
 +R9cwm/BTioLIQ==
X-Received: by 10.31.33.216 with SMTP id h207mr1077328vkh.26.1492606812634;
 Wed, 19 Apr 2017 06:00:12 -0700 (PDT)
Received: from [10.1.1.184] (fl-67-77-88-12.sta.embarqhsd.net. [67.77.88.12])
 by smtp.googlemail.com with ESMTPSA id
 i1sm589805uah.27.2017.04.19.06.00.11
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 19 Apr 2017 06:00:12 -0700 (PDT)
References: <6d39b347-1b01-68d1-a3f3-91e6dcadf08f@HIDDEN>
 <20170216173218.GQ2666@HIDDEN>
From: Phil Susi <psusi@HIDDEN>
Message-ID: <caa950c5-52f2-7f5a-3052-70758e9a53d3@HIDDEN>
Date: Wed, 19 Apr 2017 09:01:55 -0400
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <20170216173218.GQ2666@HIDDEN>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.7 (/)

On 2/16/2017 12:32 PM, Brian C. Lane wrote:
> I think the tricky part of that is going to be that when we open the
> device we don't really know what commands are going to be issued so it
> needs to be RDWR to allow for all the other possibilities.

I'm sure I have seen a patch floating around somewhere and been meaning
to merge it for some time that opens the device RO at first, then
switches to RW if and when it is required.  We should do that, but...

> There should be some way to lock out udev during your tests.

Why the hell has udev started mucking with the partition tables and dev
nodes every time someone opens the block device rw?  Parted and other
partitioning tools have always manipulated the in memory partition table
themselves after updating the disk, so why does systemd now think this
is its responsibility?

Parted takes care to only manipulate the individual partitions that have
changed, but I'm not sure that systemd doesn't just blow them all way
and recreate them all, causing significant system wide disruption.
There are some open bugs in Ubuntu for the unity desktop where drives
you have unlocked from your hotbar reappear due to them being "removed"
and reappearing due to this behavior.  systemd should stop this nonsense.





Message sent to bug-parted@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#25756: [systemd-devel] systemd mucking with partition tables ( was: bug#25756: Problems using "parted ... print" on nvme devices )
Resent-From: Lennart Poettering <lennart@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-parted@HIDDEN
Resent-Date: Wed, 19 Apr 2017 16:47:04 +0000
Resent-Message-ID: <handler.25756.B25756.149262042420238 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 25756
X-GNU-PR-Package: parted
X-GNU-PR-Keywords: 
To: Phil Susi <psusi@HIDDEN>
Cc: systemd-devel@HIDDEN, "Brian C. Lane" <bcl@HIDDEN>, 25756 <at> debbugs.gnu.org
Received: via spool by 25756-submit <at> debbugs.gnu.org id=B25756.149262042420238
          (code B ref 25756); Wed, 19 Apr 2017 16:47:04 +0000
Received: (at 25756) by debbugs.gnu.org; 19 Apr 2017 16:47:04 +0000
Received: from localhost ([127.0.0.1]:57215 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d0skx-0005GB-En
	for submit <at> debbugs.gnu.org; Wed, 19 Apr 2017 12:47:03 -0400
Received: from gardel.0pointer.net ([85.214.157.71]:45482)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <lennart@HIDDEN>) id 1d0sI8-0004Xy-2n
 for 25756 <at> debbugs.gnu.org; Wed, 19 Apr 2017 12:17:16 -0400
Received: from gardel-login.0pointer.net (gardel.0pointer.net [85.214.157.71])
 by gardel.0pointer.net (Postfix) with ESMTP id D3AC9E809C7;
 Wed, 19 Apr 2017 18:17:14 +0200 (CEST)
Received: by gardel-login.0pointer.net (Postfix, from userid 1000)
 id 858A716060A; Wed, 19 Apr 2017 18:17:14 +0200 (CEST)
Date: Wed, 19 Apr 2017 18:17:14 +0200
From: Lennart Poettering <lennart@HIDDEN>
Message-ID: <20170419161714.GA9720@gardel-login>
References: <6d39b347-1b01-68d1-a3f3-91e6dcadf08f@HIDDEN>
 <20170216173218.GQ2666@HIDDEN>
 <caa950c5-52f2-7f5a-3052-70758e9a53d3@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <caa950c5-52f2-7f5a-3052-70758e9a53d3@HIDDEN>
X-Spam-Score: 0.0 (/)
X-Mailman-Approved-At: Wed, 19 Apr 2017 12:47:01 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

On Wed, 19.04.17 09:01, Phil Susi (psusi@HIDDEN) wrote:

> On 2/16/2017 12:32 PM, Brian C. Lane wrote:
> > I think the tricky part of that is going to be that when we open the
> > device we don't really know what commands are going to be issued so it
> > needs to be RDWR to allow for all the other possibilities.
> 
> I'm sure I have seen a patch floating around somewhere and been meaning
> to merge it for some time that opens the device RO at first, then
> switches to RW if and when it is required.  We should do that, but...
> 
> > There should be some way to lock out udev during your tests.
> 
> Why the hell has udev started mucking with the partition tables and dev
> nodes every time someone opens the block device rw?  Parted and other
> partitioning tools have always manipulated the in memory partition table
> themselves after updating the disk, so why does systemd now think this
> is its responsibility?

This isn't precisely new functionality, it has been doing that since
years. It will synthesize "change" udev events when a process closes a block
device after writing, so that the changed superblock/partition
information is properly propagated to clients.

Also note that parted never was in the business of retriggering block
devices through sysfs/udev (i.e. echoing "change" into a "uevents"
file in sysfs), only udev ever did that so far, and I am pretty sure
that should stay that way.

As long as there's a BSD lock in effect on a block device, udev won't
synthesize such events. Hence: if you want to make a series of
changes, and want to close the block device fds in the process, then
make sure to keep at least one fd open with a BSD lock in effect, and
your changes won't be propagated into udev events until you release
it. 

> Parted takes care to only manipulate the individual partitions that have
> changed, but I'm not sure that systemd doesn't just blow them all way
> and recreate them all, causing significant system wide disruption.
> There are some open bugs in Ubuntu for the unity desktop where drives
> you have unlocked from your hotbar reappear due to them being "removed"
> and reappearing due to this behavior.  systemd should stop this nonsense.

My recommendation: instead of calling the stuff we do "nonsense",
first figure out what is actually implemented.

Lennart




Message sent to bug-parted@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#25756: [systemd-devel] systemd mucking with partition tables ( was: bug#25756: Problems using "parted ... print" on nvme devices )
Resent-From: Phil Susi <psusi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-parted@HIDDEN
Resent-Date: Wed, 19 Apr 2017 17:58:01 +0000
Resent-Message-ID: <handler.25756.B25756.149262465626781 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 25756
X-GNU-PR-Package: parted
X-GNU-PR-Keywords: 
To: Lennart Poettering <lennart@HIDDEN>
Cc: systemd-devel@HIDDEN, "Brian C. Lane" <bcl@HIDDEN>, 25756 <at> debbugs.gnu.org
Received: via spool by 25756-submit <at> debbugs.gnu.org id=B25756.149262465626781
          (code B ref 25756); Wed, 19 Apr 2017 17:58:01 +0000
Received: (at 25756) by debbugs.gnu.org; 19 Apr 2017 17:57:36 +0000
Received: from localhost ([127.0.0.1]:57298 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d0trE-0006xt-K2
	for submit <at> debbugs.gnu.org; Wed, 19 Apr 2017 13:57:36 -0400
Received: from mail-ua0-f193.google.com ([209.85.217.193]:33147)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <phillsusi@HIDDEN>) id 1d0trD-0006xh-7V
 for 25756 <at> debbugs.gnu.org; Wed, 19 Apr 2017 13:57:35 -0400
Received: by mail-ua0-f193.google.com with SMTP id f10so3334815uaa.0
 for <25756 <at> debbugs.gnu.org>; Wed, 19 Apr 2017 10:57:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:references:cc:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-transfer-encoding;
 bh=E41aZYboV/h6AtlkGcQTmeiVTAd+X1lFrqD+W7PXIbM=;
 b=CLlkLZ2A/Wwe/0S0vbGLqsQ8djgASEL7eLyPD4XXOh0ybhAGVFid3f2cpuyXyeL15b
 31wsIyyD9zAq1X3cmR5U86dek4myI+U4MYVevHea8xtTJOunaSE/IMvigOrdGh9+ow5o
 PrdG5yIEkTvpEKPLfJh6RdZN5n2rxTr7Z8x5lMo8L19Ra2ZTutdMbW980+ARBv5R+zKn
 JnsIhATQCGL5K17t3sWawxliYDhdSH8q/9zTNXrza5/fcUMFvtOSmRgUf/DgF2cXaYD/
 +fDIYNX9jsUYtKSgUJqq+lDGBA5OeGOI1cmZLKdsR7U25DOeBxUs2ScY7Dklrz74dmmK
 3pTA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:references:cc:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-transfer-encoding;
 bh=E41aZYboV/h6AtlkGcQTmeiVTAd+X1lFrqD+W7PXIbM=;
 b=aimJ0BXc037D02ljVEYBQJRrKEwMQGJyOyaNLzFqulY2UVopr01gI2LFSYWn6fdnUT
 Zs+s7S/XKM+0WJSzkuSqexTLAdsi2gNrsev49DQQtHPIiK6tsRmJ1pBk+K5wHvaTZbUh
 WVmUhcnh4myVuuWuYiW3ae+wO+y4z09XxNUzPHensPA9pNO+BoabB11nOM8HeEO/BwA3
 aIsYM1PQqhRWe6l79cysWGh4Fje06SMq9n6YmCVs07J00Hs0GicuFsnTVbKXRfcaDEqG
 OUorWbXpk/w/20JnObLr59wME9SpZg765RTrbb+45GcxXmzmsLNBaXRTmOBlAsaWimZO
 mAKg==
X-Gm-Message-State: AN3rC/4F9/ADn4FIg1uOkY1fvhV0qWNGrvfEDut9yXVtsIdRO/YVF8VT
 MzIJRK+0qOraSg==
X-Received: by 10.31.88.1 with SMTP id m1mr1733191vkb.140.1492624649498;
 Wed, 19 Apr 2017 10:57:29 -0700 (PDT)
Received: from [10.1.1.184] (fl-67-77-88-12.sta.embarqhsd.net. [67.77.88.12])
 by smtp.googlemail.com with ESMTPSA id
 l36sm802370uaf.25.2017.04.19.10.57.28
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Wed, 19 Apr 2017 10:57:28 -0700 (PDT)
References: <6d39b347-1b01-68d1-a3f3-91e6dcadf08f@HIDDEN>
 <20170216173218.GQ2666@HIDDEN>
 <caa950c5-52f2-7f5a-3052-70758e9a53d3@HIDDEN>
 <20170419161714.GA9720@gardel-login>
From: Phil Susi <psusi@HIDDEN>
Message-ID: <3ae47dc6-f185-3af8-d4c4-1ad3852408ec@HIDDEN>
Date: Wed, 19 Apr 2017 13:59:13 -0400
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <20170419161714.GA9720@gardel-login>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.7 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.7 (/)

On 4/19/2017 12:17 PM, Lennart Poettering wrote:
> This isn't precisely new functionality, it has been doing that since
> years. It will synthesize "change" udev events when a process closes a block
> device after writing, so that the changed superblock/partition
> information is properly propagated to clients.
> 
> Also note that parted never was in the business of retriggering block
> devices through sysfs/udev (i.e. echoing "change" into a "uevents"
> file in sysfs), only udev ever did that so far, and I am pretty sure
> that should stay that way.

What?  The kernel must generate the event as otherwise systemd has no
idea that a process on the system closed its handle to the device, and
so would not know when it should trigger them.  Or do you mean that the
kernel only triggers on the main device, and udev now synthesizes events
on the partitions?

That could explain why udevadm monitor is now showing me KERNEL change
events on the partitions as well, unless the kernel itself really is
generating those internally?  I'm fairly certain these events on the
partition devices did not used to happen, and they should not be
happening now.  Changing one partition should not cause a change event
on another partition that has not been changed in any way.

> As long as there's a BSD lock in effect on a block device, udev won't
> synthesize such events. Hence: if you want to make a series of
> changes, and want to close the block device fds in the process, then
> make sure to keep at least one fd open with a BSD lock in effect, and
> your changes won't be propagated into udev events until you release
> it. 

The timing isn't the issue, so using a lock to delay does not help.





Message sent to bug-parted@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#25756: [systemd-devel] systemd mucking with partition tables ( was: bug#25756: Problems using "parted ... print" on nvme devices )
Resent-From: Lennart Poettering <lennart@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-parted@HIDDEN
Resent-Date: Thu, 20 Apr 2017 09:58:02 +0000
Resent-Message-ID: <handler.25756.B25756.149268222614407 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 25756
X-GNU-PR-Package: parted
X-GNU-PR-Keywords: 
To: Phil Susi <psusi@HIDDEN>
Cc: systemd-devel@HIDDEN, "Brian C. Lane" <bcl@HIDDEN>, 25756 <at> debbugs.gnu.org
Received: via spool by 25756-submit <at> debbugs.gnu.org id=B25756.149268222614407
          (code B ref 25756); Thu, 20 Apr 2017 09:58:02 +0000
Received: (at 25756) by debbugs.gnu.org; 20 Apr 2017 09:57:06 +0000
Received: from localhost ([127.0.0.1]:57975 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1d18pl-0003kJ-Vw
	for submit <at> debbugs.gnu.org; Thu, 20 Apr 2017 05:57:06 -0400
Received: from gardel.0pointer.net ([85.214.157.71]:49578)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <lennart@HIDDEN>) id 1d18pj-0003k8-V9
 for 25756 <at> debbugs.gnu.org; Thu, 20 Apr 2017 05:57:04 -0400
Received: from gardel-login.0pointer.net (gardel.0pointer.net
 [IPv6:2a01:238:43ed:c300:10c3:bcf3:3266:da74])
 by gardel.0pointer.net (Postfix) with ESMTP id 6C614E809C7;
 Thu, 20 Apr 2017 11:57:02 +0200 (CEST)
Received: by gardel-login.0pointer.net (Postfix, from userid 1000)
 id 12AF116060A; Thu, 20 Apr 2017 11:57:01 +0200 (CEST)
Date: Thu, 20 Apr 2017 11:57:01 +0200
From: Lennart Poettering <lennart@HIDDEN>
Message-ID: <20170420095701.GB10580@gardel-login>
References: <6d39b347-1b01-68d1-a3f3-91e6dcadf08f@HIDDEN>
 <20170216173218.GQ2666@HIDDEN>
 <caa950c5-52f2-7f5a-3052-70758e9a53d3@HIDDEN>
 <20170419161714.GA9720@gardel-login>
 <3ae47dc6-f185-3af8-d4c4-1ad3852408ec@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <3ae47dc6-f185-3af8-d4c4-1ad3852408ec@HIDDEN>
X-Spam-Score: 0.0 (/)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 0.0 (/)

On Wed, 19.04.17 13:59, Phil Susi (psusi@HIDDEN) wrote:

> On 4/19/2017 12:17 PM, Lennart Poettering wrote:
> > This isn't precisely new functionality, it has been doing that since
> > years. It will synthesize "change" udev events when a process closes a block
> > device after writing, so that the changed superblock/partition
> > information is properly propagated to clients.
> > 
> > Also note that parted never was in the business of retriggering block
> > devices through sysfs/udev (i.e. echoing "change" into a "uevents"
> > file in sysfs), only udev ever did that so far, and I am pretty sure
> > that should stay that way.
> 
> What?  The kernel must generate the event as otherwise systemd has no
> idea that a process on the system closed its handle to the device, and
> so would not know when it should trigger them.  Or do you mean that the
> kernel only triggers on the main device, and udev now synthesizes events
> on the partitions?

The kernel generates inotify IN_CLOSED_WRITE events, and udev then
retriggers the device.

Lennart

-- 
Lennart Poettering, Red Hat





Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.