GNU bug report logs - #39905
Why does parted change ownerships of devices?

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: parted; Reported by: Guillaume Abrioux <gabrioux@HIDDEN>; dated Wed, 4 Mar 2020 15:04:02 UTC; Maintainer for parted is bug-parted@HIDDEN.

Message received at 39905 <at> debbugs.gnu.org:


Received: (at 39905) by debbugs.gnu.org; 4 Mar 2020 17:32:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 04 12:32:49 2020
Received: from localhost ([127.0.0.1]:41800 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1j9Xt2-00014Y-Px
	for submit <at> debbugs.gnu.org; Wed, 04 Mar 2020 12:32:49 -0500
Received: from us-smtp-1.mimecast.com ([205.139.110.61]:22465
 helo=us-smtp-delivery-1.mimecast.com)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <bcl@HIDDEN>) id 1j9Xt0-00014Q-Rf
 for 39905 <at> debbugs.gnu.org; Wed, 04 Mar 2020 12:32:47 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1583343166;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=LLNAZuqfm3pTSFnZGVGRNkkHGb6cxtl5lNH1/HRtbcI=;
 b=TFxYn+QrSC++nNQtPRvoB5SfuOFc53m6QYFxE1wMenAEr/0MkoDd7x7LKAaUCnnJDQ1aJo
 KgQTkHm/it40ICvw1GAF3u//OMH6XqgTHUi+kD3QHnvsnAEaX0jFbBfvJmkSPUYofBVLwt
 ADWyTEKiMHSJs0OMaqDHPd1m48TRU5I=
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
 [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-478-LLcyMvUjMoqqrpRQ-Lw8HA-1; Wed, 04 Mar 2020 12:32:42 -0500
X-MC-Unique: LLcyMvUjMoqqrpRQ-Lw8HA-1
Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com
 [10.5.11.13])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 76DF58014DD
 for <39905 <at> debbugs.gnu.org>; Wed,  4 Mar 2020 17:32:41 +0000 (UTC)
Received: from lister.brianlane.com (ovpn-112-32.phx2.redhat.com [10.3.112.32])
 by smtp.corp.redhat.com (Postfix) with ESMTPS id DC9B248;
 Wed,  4 Mar 2020 17:32:40 +0000 (UTC)
Date: Wed, 4 Mar 2020 09:32:38 -0800
From: "Brian C. Lane" <bcl@HIDDEN>
To: Guillaume Abrioux <gabrioux@HIDDEN>
Subject: Re: bug#39905: Why does parted change ownerships of devices?
Message-ID: <20200304173238.GE23744@HIDDEN>
References: <CANqTTH58TK4KZ8aZiATJG6nD1VE+LXcAiA9qfTsXoviZcdBXog@HIDDEN>
MIME-Version: 1.0
In-Reply-To: <CANqTTH58TK4KZ8aZiATJG6nD1VE+LXcAiA9qfTsXoviZcdBXog@HIDDEN>
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 39905
Cc: 39905 <at> debbugs.gnu.org
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: -1.0 (-)

On Wed, Mar 04, 2020 at 04:01:51PM +0100, Guillaume Abrioux wrote:
> Hello,
>=20
> We use parted in ceph-ansible playbook [1] to retrieve some devices
> information, the parted ansible module runs a parted/print command [2], b=
ut
> we are facing an issue where ownerships get modified after that.
>=20
> Doing the test manually without ansible context shows it's parted itself
> which apply this change:

No, parted doesn't do anything to ownership or permissions. My guess is
that udev is doing something when the device is opened/closed. How does
ceph set the ownership?

--=20
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart





Information forwarded to bug-parted@HIDDEN:
bug#39905; Package parted. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 4 Mar 2020 15:03:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 04 10:03:38 2020
Received: from localhost ([127.0.0.1]:41550 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1j9VYg-0001Zn-44
	for submit <at> debbugs.gnu.org; Wed, 04 Mar 2020 10:03:38 -0500
Received: from lists.gnu.org ([209.51.188.17]:40223)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gabrioux@HIDDEN>) id 1j9VYd-0001Zf-Pj
 for submit <at> debbugs.gnu.org; Wed, 04 Mar 2020 10:03:36 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:37001)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <gabrioux@HIDDEN>) id 1j9VYc-0006B1-F0
 for bug-parted@HIDDEN; Wed, 04 Mar 2020 10:03:35 -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,HTML_MESSAGE,
 RCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <gabrioux@HIDDEN>) id 1j9VYa-0003I2-Mm
 for bug-parted@HIDDEN; Wed, 04 Mar 2020 10:03:33 -0500
Received: from us-smtp-1.mimecast.com ([207.211.31.81]:32045
 helo=us-smtp-delivery-1.mimecast.com)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <gabrioux@HIDDEN>) id 1j9VYZ-0003Gu-Ho
 for bug-parted@HIDDEN; Wed, 04 Mar 2020 10:03:32 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1583334211;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type;
 bh=sJeKSYnuU28d8nn/4gkuXiACXJxzsVdvdeI/NeUX1pU=;
 b=IMYbxB1JVajGoPIQ59zwV5mXvtLCv8HGuAmey59dV63hZr7ulsxJOJk+Vsn0KetbALNuz6
 FgRvCBezsvkKsFgLUNiyul6zbdZTmMUm1St6k05AqMyf8JTGbgGn64vrnKa15WY7Efccrm
 TLsuS2j4P+EwNjVqCM4RhOhOawi6i+4=
Received: from mail-oi1-f198.google.com (mail-oi1-f198.google.com
 [209.85.167.198]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-225-scJR6hvhNNyZtIjHtcUmtw-1; Wed, 04 Mar 2020 10:02:07 -0500
X-MC-Unique: scJR6hvhNNyZtIjHtcUmtw-1
Received: by mail-oi1-f198.google.com with SMTP id 8so1026826oiq.2
 for <bug-parted@HIDDEN>; Wed, 04 Mar 2020 07:02:06 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=jLE595ILKcF/s46wqE6ULhc/3bX+t+xdKOfj1P5lgJA=;
 b=MOezWXxxpQnRio2eu7eUbZ6RFlbsUugJA35FAAHnLhtcygxMhBQm/sBsUlDO/xiyqw
 rDJ+BtZ4QpjlrFjvYJhtd3I+uxdMdr+Mb8DCkxPiOjO7AJYjxr1gXwHh9LkN8na4TUbZ
 JAh/UZSFj6SohN0glsWpgualz5u6V0+WyqaZ7yjvO1w8cBQ3NWs+7PRTYni8anFlGc9R
 thOUNUSBR5uoxMVztELWmKN0zFGD/WaBkDz09oqMP05TZK/UnMdAp9jbAYgyWb1g8qfX
 Lj37JIvogwxjhOjgTV+1O8MHclJFyhAy5rQHibNz2wLPJL9Ebc2/mfS1a/jRyMUZAVK7
 b8GQ==
X-Gm-Message-State: ANhLgQ1ZF2zf6BRDKcTMFhFZTrppyWmkW/pF5mkBJ5x90WjvWoYMx/5S
 M4+dQTEvQJAFmtPAVmpyF4okZ7lPokfFTD7oTsuBKKSrHez3Xl5v87iusFfvNDELHfLsCHZpkWF
 9ZmY+x/Nzyt+Cg1suBST14iuKcfA=
X-Received: by 2002:a9d:4d8f:: with SMTP id u15mr2724850otk.261.1583334124805; 
 Wed, 04 Mar 2020 07:02:04 -0800 (PST)
X-Google-Smtp-Source: ADFU+vsbQwM1N1W0EU7hBd2leMujmOo4GXhLAY83Nx/LIKmkhLxWlZvNeYRR1d/pb2e/RjtwX5l6U4EEZ3ZINvtrLqw=
X-Received: by 2002:a9d:4d8f:: with SMTP id u15mr2724740otk.261.1583334123669; 
 Wed, 04 Mar 2020 07:02:03 -0800 (PST)
MIME-Version: 1.0
From: Guillaume Abrioux <gabrioux@HIDDEN>
Date: Wed, 4 Mar 2020 16:01:51 +0100
Message-ID: <CANqTTH58TK4KZ8aZiATJG6nD1VE+LXcAiA9qfTsXoviZcdBXog@HIDDEN>
Subject: Why does parted change ownerships of devices?
To: bug-parted@HIDDEN
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: multipart/alternative; boundary="00000000000000b39505a008b4d1"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-Received-From: 207.211.31.81
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: submit
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.8 (/)

--00000000000000b39505a008b4d1
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hello,

We use parted in ceph-ansible playbook [1] to retrieve some devices
information, the parted ansible module runs a parted/print command [2], but
we are facing an issue where ownerships get modified after that.

Doing the test manually without ansible context shows it's parted itself
which apply this change:

Before running parted on /dev/sdc:
[root@osd0 ~]# ls -l /dev/sdc*
brw-rw----. 1 root disk 8, 32 Jun 11 08:53 /dev/sdc
brw-rw----. 1 ceph ceph 8, 33 Jun 11 08:53 /dev/sdc1
brw-rw----. 1 ceph ceph 8, 34 Jun 11 08:53 /dev/sdc2

Running a basic parted/print:
[root@osd0 ~]# parted -s /dev/sdc print
Model: ATA QEMU HARDDISK (scsi)
Disk /dev/sdc: 53.7GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name           Flags
 1      1049kB  1075MB  1074MB               ceph block.db
 2      1075MB  2149MB  1074MB               ceph block.db

We can see ownerships have changed from ceph:ceph to root:disk:
[root@osd0 ~]# ls -l /dev/sdc*
brw-rw----. 1 root disk 8, 32 Jun 11 08:57 /dev/sdc
brw-rw----. 1 root disk 8, 33 Jun 11 08:57 /dev/sdc1
brw-rw----. 1 root disk 8, 34 Jun 11 08:57 /dev/sdc2
[root@osd0 ~]#

I'm wondering whether there's a good reason for this or should it be
considered as a bug?


Thanks!


[1]
https://github.com/ceph/ceph-ansible/blob/master/roles/ceph-osd/tasks/main.=
yml#L39-L44
[2]
https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/system/pa=
rted.py#L418


*Guillaume Abrioux*
Senior Software Engineer

--00000000000000b39505a008b4d1
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr" class=3D"gmail_signature" data-smartmail=
=3D"gmail_signature"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><di=
v dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=
=3D"ltr"><div style=3D"background-color:rgb(253,253,253)"><span style=3D"co=
lor:rgb(102,102,102)"><span style=3D"font-size:8pt"></span></span><span sty=
le=3D"background-color:rgb(255,255,255)">Hello,</span><span style=3D"color:=
rgb(102,102,102)"><span style=3D"font-size:8pt"><br></span></span></div><br=
>We use parted in ceph-ansible playbook [1] to retrieve some devices inform=
ation, the parted ansible module runs a parted/print command [2], but we ar=
e facing an issue where ownerships get modified after that.<br><br>Doing th=
e test manually without ansible context shows it&#39;s parted itself which =
apply this change:<br><br>Before running parted on /dev/sdc:<br>[root@osd0 =
~]# ls -l /dev/sdc*<br>brw-rw----. 1 root disk 8, 32 Jun 11 08:53 /dev/sdc<=
br>brw-rw----. 1 ceph ceph 8, 33 Jun 11 08:53 /dev/sdc1<br>brw-rw----. 1 ce=
ph ceph 8, 34 Jun 11 08:53 /dev/sdc2<br><br>Running a basic parted/print:<b=
r>[root@osd0 ~]# parted -s /dev/sdc print =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0<br>Model: ATA QEMU HARDDISK (scsi)<br>Disk /dev/sdc: 53.7GB<br>S=
ector size (logical/physical): 512B/512B<br>Partition Table: gpt<br>Disk Fl=
ags:<br><br>Number =C2=A0Start =C2=A0 End =C2=A0 =C2=A0 Size =C2=A0 =C2=A0F=
ile system =C2=A0Name =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Flags<br>=C2=A01 =
=C2=A0 =C2=A0 =C2=A01049kB =C2=A01075MB =C2=A01074MB =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ceph block.db<br>=C2=A02 =C2=A0 =C2=A0 =C2=A010=
75MB =C2=A02149MB =C2=A01074MB =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 ceph block.db<br><br>We can see ownerships have changed from ceph:ce=
ph to root:disk:<br>[root@osd0 ~]# ls -l /dev/sdc* =C2=A0 =C2=A0 =C2=A0 =C2=
=A0<br>brw-rw----. 1 root disk 8, 32 Jun 11 08:57 /dev/sdc<br>brw-rw----. 1=
 root disk 8, 33 Jun 11 08:57 /dev/sdc1<br>brw-rw----. 1 root disk 8, 34 Ju=
n 11 08:57 /dev/sdc2<br>[root@osd0 ~]# <br><br>I&#39;m wondering whether th=
ere&#39;s a good reason for this or should it be considered as a bug?<br><b=
r><br>Thanks!<br><br><br>[1] <a href=3D"https://github.com/ceph/ceph-ansibl=
e/blob/master/roles/ceph-osd/tasks/main.yml#L39-L44">https://github.com/cep=
h/ceph-ansible/blob/master/roles/ceph-osd/tasks/main.yml#L39-L44</a><br>[2]=
 <a href=3D"https://github.com/ansible/ansible/blob/devel/lib/ansible/modul=
es/system/parted.py#L418">https://github.com/ansible/ansible/blob/devel/lib=
/ansible/modules/system/parted.py#L418</a><br><span style=3D"color:rgb(102,=
102,102)"><span style=3D"font-size:8pt"><span><span><span></span></span></s=
pan></span></span></div><div dir=3D"ltr"><br></div><div dir=3D"ltr"><div cl=
ass=3D"gmail_default" style=3D"font-family:tahoma,sans-serif"></div><div><d=
iv dir=3D"ltr" class=3D"gmail_signature"><div dir=3D"ltr"><div dir=3D"ltr">=
<div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div dir=3D"ltr"><div di=
r=3D"ltr"><div dir=3D"ltr"><div style=3D"background-color:rgb(253,253,253)"=
><span style=3D"color:rgb(102,102,102)"><span style=3D"font-size:x-large"><=
span style=3D"font-size:11pt"><b>Guillaume Abrioux<br></b></span></span></s=
pan></div></div></div></div></div></div></div></div></div></div></div><div =
class=3D"gmail_default" style=3D"font-family:tahoma,sans-serif"><span style=
=3D"font-size:8pt;color:rgb(102,102,102);background-color:rgb(253,253,253);=
font-family:Arial,Helvetica,sans-serif">Senior Software Engineer</span></di=
v><br><br></div></div></div></div></div></div></div></div></div></div>

--00000000000000b39505a008b4d1--





Acknowledgement sent to Guillaume Abrioux <gabrioux@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-parted@HIDDEN. Full text available.
Report forwarded to bug-parted@HIDDEN:
bug#39905; Package parted. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 4 Mar 2020 17:45:01 UTC

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