linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robby Workman <rw@rlworkman.net>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] HAL: Ignore internal DM devices with new DM udev rules
Date: Wed, 14 Jul 2010 09:12:15 +0000	[thread overview]
Message-ID: <20100714041215.01277d09@liberty.rlwhome.lan> (raw)
In-Reply-To: <1279022894-20089-1-git-send-email-mbroz@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1501 bytes --]

On Tue, 13 Jul 2010 14:08:14 +0200
Milan Broz <mbroz@redhat.com> wrote:

> With new device-mapper udev rules are /dev/mapper/* symlinks
> to basic device name /dev/dm-X.
> (Change requested by udev upstream.)
> 
> This change breaks temporary-cryptsetup workaround inside hal.
> 
> With new dm-udev rules (uncluded since device-mapper 1.02.39)
> there is DM_UDEV_DISABLE_OTHER_RULES_FLAG variable
> which controls that scan should be ignored for this device
> (it is set for all internal devices, including temporary cryptsetup,
> internal parts of lvm devices etc.)
> 
> Ignore device if this flag is set.
> 
> See bugs
> https://bugzilla.redhat.com/show_bug.cgi?id=613909
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=586286


Perhaps this is a problem with how Xfce's automount implementation
calls everything (although it worked fine prior to our move to
udev-enabled LVM2 and newer cryptsetup (1.1.x)), but I still don't
get an encrypted usb thumbdrive mounted when plugging it in after
applying this patch and rebuilding hal.  

I get two separate dialog windows to enter the passphrase
(the first appears, I enter the passphrase, and then the 
second appears), and after entering the passphrase for the 
second time, I get this:

  Failed to setup the encrypted volume.
  /dev/sdb is already setup?

Just for grins and giggles, I tested an old mmc card, and it
works as expected.

I'm attaching a debug log created by running hald in verbose
mode; any ideas on where to go from here?

-RW

[-- Attachment #2: debug --]
[-- Type: application/octet-stream, Size: 10163 bytes --]

[5822]: 04:04:08.000 [I] addon-storage.c:356: Checking whether device /dev/sdb is locked on HAL
[5822]: 04:04:08.000 [I] addon-storage.c:365: ... device /dev/sdb is not locked on HAL
[5822]: 04:04:08.001 [D] addon-storage.c:548: Media insertion detected on /dev/sdb
04:04:08.001 [D] hald_dbus.c:1659: udi=/org/freedesktop/Hal/devices/storage_serial_SanDisk_Cruzer_Micro_SNDK5D1BF51877607705_0_0, key=storage.removable.media_available
04:04:08.001 [I] hald_dbus.c:3115: entering, local_interface=1
04:04:08.002 [D] hald_dbus.c:3124: udi=/org/freedesktop/Hal/devices/storage_serial_SanDisk_Cruzer_Micro_SNDK5D1BF51877607705_0_0
04:04:08.002 [I] blockdev.c:1780: blockdev_rescan_device: udi=/org/freedesktop/Hal/devices/storage_serial_SanDisk_Cruzer_Micro_SNDK5D1BF51877607705_0_0
Run started hald-probe-storage (20000) (0) 
!  full path is '/usr/libexec/hald-probe-storage', program_dir is '/usr/libexec'
woohoo
[5825]: 04:04:08.009 [D] probe-storage.c:142: Doing probe-storage for /dev/sdb (bus usb) (drive_type disk) (udi=/org/freedesktop/Hal/devices/storage_serial_SanDisk_Cruzer_Micro_SNDK5D1BF51877607705_0_0) (--only-check-for-fs==1)
[5825]: 04:04:08.010 [D] probe-storage.c:440: Checking for file system on /dev/sdb
[5825]: 04:04:08.010 [D] probe-storage.c:446: Doing open ("/dev/sdb", O_RDONLY)
[5825]: 04:04:08.010 [D] probe-storage.c:454: Returned from open(2)
[5825]: 04:04:08.010 [D] probe-storage.c:470: look for existing partitions for sdb
04:04:08.023 [I] hald_dbus.c:1371: storage.removable.media_available -> True
04:04:08.023 [I] hald_dbus.c:1355: storage.removable.media_size -> 1024966656
04:04:08.023 [I] hald_dbus.c:1339: storage.partitioning_scheme -> none
pid 5825: rc=2 signaled=0: /usr/libexec/hald-probe-storage
04:04:08.024 [I] blockdev.c:1736: hald-probe-storage --only-check-for-media returned 2 (exit_type=0)
04:04:08.024 [D] hotplug.c:500: events queued = 0, events in progress = 0
04:04:08.024 [D] hotplug.c:505: Hotplug-queue empty now ... no hotplug events in progress
04:04:18.543 [I] hald_dbus.c:5198: OK for method 'Setup' with signature 's' on interface 'org.freedesktop.Hal.Device.Volume.Crypto' for UDI '/org/freedesktop/Hal/devices/volume_uuid_10660ad9_8d12_4c12_bd3e_c45f4960bd43' and execpath 'hal-luks-setup'
04:04:18.543 [I] hald_dbus.c:4082: no need to enqueue
Run started hal-luks-setup (0) (1) 
!  full path is '/usr/libexec/scripts/hal-luks-setup', program_dir is '/usr/libexec/scripts'
04:04:18.550 [I] access-check.c:72: uid for caller is 0
04:04:18.551 [I] ci-tracker.c:212: Removing CICallerInfo object for :1.200
04:04:18.551 [I] device.c:1894: Removing locks from ':1.200'
04:04:18.554 [I] access-check.c:72: uid for caller is 0
04:04:18.555 [I] ci-tracker.c:212: Removing CICallerInfo object for :1.201
04:04:18.555 [I] device.c:1894: Removing locks from ':1.201'
04:04:18.560 [I] device.c:1894: Removing locks from ':1.202'
04:04:19.530 [I] osspec.c:256: SEQNUM=2241, ACTION=add, SUBSYSTEM=bdi, DEVPATH=/sys/devices/virtual/bdi/253:6, DEVNAME=, IFINDEX=0
04:04:19.530 [D] hotplug.c:476: checking ADD event /sys/devices/virtual/bdi/253:6
04:04:19.530 [D] hotplug.c:397: event /sys/devices/virtual/bdi/253:6: skip ourselves and all later events
04:04:19.530 [I] hotplug.c:145: /sys/devices/virtual/bdi/253:6 is a device (subsystem)
04:04:19.530 [I] device.c:4997: add_dev: subsys=bdi sysfs_path=/sys/devices/virtual/bdi/253:6 dev= parent_dev=0x00000000
04:04:19.530 [D] hotplug.c:500: events queued = 0, events in progress = 0
04:04:19.530 [D] hotplug.c:505: Hotplug-queue empty now ... no hotplug events in progress
04:04:19.530 [I] osspec.c:220: ignoring device requested by DM udev rules
04:04:19.531 [I] osspec.c:220: ignoring device requested by DM udev rules
04:04:19.532 [I] osspec.c:220: ignoring device requested by DM udev rules
04:04:19.561 [I] osspec.c:220: ignoring device requested by DM udev rules
04:04:19.563 [I] osspec.c:256: SEQNUM=2245, ACTION=remove, SUBSYSTEM=bdi, DEVPATH=/sys/devices/virtual/bdi/253:6, DEVNAME=, IFINDEX=0
04:04:19.563 [D] hotplug.c:478: checking REMOVE event /sys/devices/virtual/bdi/253:6
04:04:19.563 [D] hotplug.c:397: event /sys/devices/virtual/bdi/253:6: skip ourselves and all later events
04:04:19.563 [I] device.c:5078: remove_dev: subsys=bdi sysfs_path=/sys/devices/virtual/bdi/253:6
04:04:19.563 [W] device.c:5082: Error removing device
04:04:19.563 [D] hotplug.c:500: events queued = 0, events in progress = 0
04:04:19.563 [D] hotplug.c:505: Hotplug-queue empty now ... no hotplug events in progress
04:04:19.564 [I] osspec.c:256: SEQNUM=2246, ACTION=remove, SUBSYSTEM=block, DEVPATH=/sys/devices/virtual/block/dm-6, DEVNAME=dm-6, IFINDEX=0
04:04:19.564 [D] hotplug.c:478: checking REMOVE event /sys/devices/virtual/block/dm-6
04:04:19.564 [D] hotplug.c:397: event /sys/devices/virtual/block/dm-6: skip ourselves and all later events
04:04:19.564 [I] blockdev.c:1663: block_rem: sysfs_path=/sys/devices/virtual/block/dm-6
04:04:19.564 [W] blockdev.c:1667: Device is not in the HAL database
04:04:19.564 [D] hotplug.c:500: events queued = 0, events in progress = 0
04:04:19.564 [D] hotplug.c:505: Hotplug-queue empty now ... no hotplug events in progress
04:04:19.700 [I] osspec.c:220: ignoring device requested by DM udev rules
04:04:19.701 [I] osspec.c:256: SEQNUM=2249, ACTION=add, SUBSYSTEM=bdi, DEVPATH=/sys/devices/virtual/bdi/253:6, DEVNAME=, IFINDEX=0
04:04:19.701 [D] hotplug.c:476: checking ADD event /sys/devices/virtual/bdi/253:6
04:04:19.701 [D] hotplug.c:397: event /sys/devices/virtual/bdi/253:6: skip ourselves and all later events
04:04:19.701 [I] hotplug.c:145: /sys/devices/virtual/bdi/253:6 is a device (subsystem)
04:04:19.701 [I] device.c:4997: add_dev: subsys=bdi sysfs_path=/sys/devices/virtual/bdi/253:6 dev= parent_dev=0x00000000
04:04:19.701 [D] hotplug.c:500: events queued = 0, events in progress = 0
04:04:19.701 [D] hotplug.c:505: Hotplug-queue empty now ... no hotplug events in progress
04:04:19.735 [I] osspec.c:256: SEQNUM=2247, ACTION=change, SUBSYSTEM=block, DEVPATH=/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1:1.0/host9/target9:0:0/9:0:0:0/block/sdb, DEVNAME=/dev/sdb, IFINDEX=0
04:04:19.735 [D] hotplug.c:480: checking event /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1:1.0/host9/target9:0:0/9:0:0:0/block/sdb, action: 4
04:04:19.735 [D] hotplug.c:397: event /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1:1.0/host9/target9:0:0/9:0:0:0/block/sdb: skip ourselves and all later events
04:04:19.735 [I] blockdev.c:1716: block_change: sysfs_path=/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1:1.0/host9/target9:0:0/9:0:0:0/block/sdb
04:04:19.735 [D] hotplug.c:500: events queued = 0, events in progress = 0
04:04:19.735 [D] hotplug.c:505: Hotplug-queue empty now ... no hotplug events in progress
04:04:20.064 [D] osspec.c:249: Found a dm-device (/dev/dm-6), mark it
04:04:20.064 [I] osspec.c:256: SEQNUM=2250, ACTION=change, SUBSYSTEM=block, DEVPATH=/sys/devices/virtual/block/dm-6, DEVNAME=/dev/dm-6, IFINDEX=0
04:04:20.064 [D] hotplug.c:480: checking event /sys/devices/virtual/block/dm-6, action: 4
04:04:20.064 [D] hotplug.c:397: event /sys/devices/virtual/block/dm-6: skip ourselves and all later events
04:04:20.065 [I] blockdev.c:904: block_add: sysfs_path=/sys/devices/virtual/block/dm-6 dev=/dev/dm-6 is_part=0, parent=0x00000000
04:04:20.065 [I] blockdev.c:958: Looking in /sys/devices/virtual/block/dm-6/slaves for Device Mapper
04:04:20.065 [I] blockdev.c:969:  /sys/devices/virtual/block/dm-6/slaves/. -> /sys/devices/virtual/block/dm-6/slaves
04:04:20.065 [I] blockdev.c:1003: Couldn't find slave volume in devices
04:04:20.065 [I] blockdev.c:969:  /sys/devices/virtual/block/dm-6/slaves/.. -> /sys/devices/virtual/block/dm-6
04:04:20.065 [I] blockdev.c:1003: Couldn't find slave volume in devices
04:04:20.065 [I] blockdev.c:969:  /sys/devices/virtual/block/dm-6/slaves/sdb -> /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1:1.0/host9/target9:0:0/9:0:0:0/block/sdb
04:04:20.065 [I] blockdev.c:1009: Done looking in /sys/devices/virtual/block/dm-6/slaves
04:04:20.065 [I] blockdev.c:1016: Ignoring hotplug event - no parent
04:04:20.065 [W] blockdev.c:1587: Not adding device object
04:04:20.065 [D] hotplug.c:500: events queued = 0, events in progress = 0
04:04:20.065 [D] hotplug.c:505: Hotplug-queue empty now ... no hotplug events in progress
04:04:20.087 [I] device.c:1894: Removing locks from ':1.203'
pid 5826: rc=0 signaled=0: /usr/libexec/scripts/hal-luks-setup
04:04:20.087 [I] hald_dbus.c:4106: No more methods in queue
04:04:20.087 [D] hotplug.c:500: events queued = 0, events in progress = 0
04:04:20.087 [D] hotplug.c:505: Hotplug-queue empty now ... no hotplug events in progress
04:04:59.627 [I] hald_dbus.c:5198: OK for method 'Setup' with signature 's' on interface 'org.freedesktop.Hal.Device.Volume.Crypto' for UDI '/org/freedesktop/Hal/devices/volume_uuid_10660ad9_8d12_4c12_bd3e_c45f4960bd43' and execpath 'hal-luks-setup'
04:04:59.627 [I] hald_dbus.c:4082: no need to enqueue
Run started hal-luks-setup (0) (1) 
!  full path is '/usr/libexec/scripts/hal-luks-setup', program_dir is '/usr/libexec/scripts'
04:04:59.632 [I] access-check.c:72: uid for caller is 0
04:04:59.633 [I] ci-tracker.c:212: Removing CICallerInfo object for :1.204
04:04:59.633 [I] device.c:1894: Removing locks from ':1.204'
04:04:59.637 [I] access-check.c:72: uid for caller is 0
04:04:59.638 [I] ci-tracker.c:212: Removing CICallerInfo object for :1.205
04:04:59.638 [I] device.c:1894: Removing locks from ':1.205'
04:04:59.642 [I] device.c:1894: Removing locks from ':1.206'
pid 5866: rc=1 signaled=0: /usr/libexec/scripts/hal-luks-setup
04:04:59.646 [I] hald_dbus.c:4106: No more methods in queue
04:04:59.646 [I] hald_dbus.c:4169: failed with 'org.freedesktop.Hal.Device.Volume.Crypto.SetupError' '/dev/sdb is already setup?'
04:04:59.646 [D] hotplug.c:500: events queued = 0, events in progress = 0
04:04:59.646 [D] hotplug.c:505: Hotplug-queue empty now ... no hotplug events in progress
04:05:18.890 [I] ci-tracker.c:212: Removing CICallerInfo object for :1.199
04:05:18.890 [I] device.c:1894: Removing locks from ':1.199'
04:05:18.970 [I] device.c:1894: Removing locks from ':1.207'


  reply	other threads:[~2010-07-14  9:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-13 12:08 [PATCH] HAL: Ignore internal DM devices with new DM udev rules Milan Broz
2010-07-14  9:12 ` Robby Workman [this message]
2010-07-14  9:43 ` Milan Broz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100714041215.01277d09@liberty.rlwhome.lan \
    --to=rw@rlworkman.net \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).