GNU bug report logs -
#36169
Why does parted change ownerships of devices?
Previous Next
To reply to this bug, email your comments to 36169 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-parted <at> gnu.org
:
bug#36169
; Package
parted
.
(Tue, 11 Jun 2019 14:14:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Guillaume Abrioux <gabrioux <at> redhat.com>
:
New bug report received and forwarded. Copy sent to
bug-parted <at> gnu.org
.
(Tue, 11 Jun 2019 14:14:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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 <at> 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 <at> 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 <at> 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 <at> 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/parted.py#L418
*Guillaume Abrioux*Senior Software Engineer
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-parted <at> gnu.org
:
bug#36169
; Package
parted
.
(Wed, 12 Jun 2019 18:33:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 36169 <at> debbugs.gnu.org (full text, mbox):
On Tue, Jun 11, 2019 at 11:23:47AM +0200, Guillaume Abrioux wrote:
> 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 <at> 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 <at> 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 <at> 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 <at> osd0 ~]#
>
> I'm wondering whether there's a good reason for this or should it be
> considered as a bug?
How did you set the ownership of the partition devices in the first place?
You can't just manually set the ownership and permissions of device
nodes, you need to use udev (which is responsible for creating them) to
do that.
parted tells the kernel to rescan the partitions, so the device entries
are probably being recreated by udev, changing their ownership back to
whatever udev thinks they should be.
--
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted
This bug report was last modified 6 years and 7 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.