Bug 489982 - cciss disk devices do not have storage capability in HAL
Summary: cciss disk devices do not have storage capability in HAL
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: hal
Version: 5.3
Hardware: All
OS: Linux
high
medium
Target Milestone: rc
: ---
Assignee: David Zeuthen
QA Contact: desktop-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 513070 515566
TreeView+ depends on / blocked
 
Reported: 2009-03-12 18:41 UTC by Alan Pevec
Modified: 2016-04-26 16:16 UTC (History)
21 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 489349
: 513070 515566 (view as bug list)
Environment:
Last Closed: 2009-09-02 11:24:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch to add /sys/bus/cciss/.... attribute (14.02 KB, patch)
2009-07-21 19:57 UTC, Mike Miller (OS Dev)
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1359 0 normal SHIPPED_LIVE hal bug fix and enhancement update 2009-09-01 10:53:48 UTC

Description Alan Pevec 2009-03-12 18:41:21 UTC
Description of problem:

hal-find-by-capability --capability storage

returns nothing on HP boxes with cciss

--- Additional comment from rhughes on 2009-03-10 04:50:01 EDT ---

> returns nothing on HP boxes with cciss, so HAL needs to be fixed.

HAL just reads capabilities from the kernel. I think the kernel driver just needs the appropriate bit set.

--- Additional comment from apevec on 2009-03-11 07:43:34 EDT ---

> HAL just reads capabilities from the kernel. I think the kernel driver just
> needs the appropriate bit set.  

What exactly do we need to ask cciss driver maintainer?

BTW, I see special-case for cciss in upstream HAL:
http://cgit.freedesktop.org/hal/tree/hald/linux/blockdev.c#n942
Don't we need to backport this?

Comment 1 Richard Hughes 2009-05-12 10:38:32 UTC
(In reply to comment #0)
> BTW, I see special-case for cciss in upstream HAL:
> http://cgit.freedesktop.org/hal/tree/hald/linux/blockdev.c#n942
> Don't we need to backport this?  

Yes.

Comment 12 Martin Jenner 2009-06-12 18:56:55 UTC
[root@hp-dl380g5-01 mj]# rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' hal
hal-0.5.8.1-49.el5.x86_64
hal-0.5.8.1-49.el5.i386
[root@hp-dl380g5-01 mj]# service haldaemon restartStopping HAL daemon: [  OK  ]
Starting HAL daemon: [  OK  ]
[root@hp-dl380g5-01 mj]# hal-find-by-capability --capability storage

- rebooted box

[root@hp-dl380g5-01 ~]# hal-find-by-capability --capability storage
[root@hp-dl380g5-01 ~]#

Comment 18 Rob Evers 2009-07-15 14:42:14 UTC
Investigating whether upstream scsi-misc commit id below will resolve hal issue for cciss.

7fe063268e73681cdca1a6496a25f93d3332f517

Comment 19 Rob Evers 2009-07-15 14:59:32 UTC
Adding Mike Miller to bugzilla.  I believe Mike maintains the cciss driver.

Comment 20 Rob Evers 2009-07-15 16:41:08 UTC
The patch I generated from the upstream commit 7fe063268e73681cdca1a6496a25f93d3332f517 did not apply cleanly to rhel5.4.

A backport will be required.

Adding Ron Pacheco to the bugzilla.

Comment 21 Karen Skweres 2009-07-17 19:40:47 UTC
Coping email from Mike Miller:

This patch should resolve the missing links in sysfs:
 
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=404443081ce5e6f68b5f7eda16c959835ff200c0
 
Sorry for any duplicates.
 
-- mikem

Comment 22 Rob Evers 2009-07-20 14:06:15 UTC
Applying the patch does result in /sys/block/cciss!cXdY/device/* being created.

The hal command gives the same number of devices on this host both before and after the patch is applied so it looks like the problem is not completely resolved by the patch in comment 21.

Comment 23 Mike Miller (OS Dev) 2009-07-20 15:02:11 UTC
I'm not sure I understand comment 22. Why would the number of devices change?

Comment 24 Rob Evers 2009-07-20 15:36:10 UTC
In comment 12, the hal command was run and no devices showed up.  The host that I was experimenting on has devices and adapters besides cciss.  I would have expected to see other devices after the driver update if I understand the hal command correctly.

Comment 28 Mike Miller (OS Dev) 2009-07-20 20:04:38 UTC
So the cciss devices still didn't show up after the patch? Sorry to ask so many questions, but I know nothing about hal. Does hal need modification to find cciss devices?

Comment 29 Rob Evers 2009-07-21 09:09:38 UTC
Richard,

Please update this bugzilla with your findings on dl585-03 and answer Mike Miller's question in comment 28.

Thanks, Rob

Comment 31 Richard Hughes 2009-07-21 10:16:52 UTC
Mike, the device also needs the cciss bus_type assigned, so the subsystem becomes cciss, and it also shows up in /sys/bus/cciss/devices/. This is why HAL cannot add the device. The bus type should have been added in the kernel driver backport -- See http://patchwork.kernel.org/patch/26781/ for the description. 

When /sys/bus/cciss is created there should be needed a 4 line trivial patch to hal to recognise the cciss bus, and label it correctly.

Comment 34 Mike Miller (OS Dev) 2009-07-21 19:57:17 UTC
Created attachment 354572 [details]
Patch to add /sys/bus/cciss/.... attribute

This patch adds new sysfs attributes for cciss including bus. The other patches mentioned rework the scan thread.

Comment 35 Tom Coughlan 2009-07-21 20:32:20 UTC
This BZ will be used for the change to hal that is required to special-case cciss. 

I have cloned this BZ to allow for the corresponding kernel change that is needed to make the cciss driver provide the necessary information in sysfs. The kernel BZ is 513070.

Comment 37 Rob Evers 2009-07-22 10:03:35 UTC
Richard,

The patch is applied and dl585-03 is booted w/ the updated driver loaded.

[root@dl585-03 devices]# ls /sys/bus/cciss/
devices/       drivers/       drivers_probe

Rob

Comment 38 Rob Evers 2009-07-22 11:11:09 UTC
Comment on attachment 354572 [details]
Patch to add /sys/bus/cciss/.... attribute

See 2nd attachment to bz513070, where this patch is slightly modified to remove a previous commit

Comment 39 Richard Hughes 2009-07-22 14:42:30 UTC
I've applied the trivial patch to hal and scratch built it here: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=1902446

With this build installed (and the fixed kernel build), the cciss bus is recognised, and the storage devices populated.

[root@dl585-03 packages]# hal-find-by-capability --capability storage
/org/freedesktop/Hal/devices/storage_serial_35000c5000020d907
/org/freedesktop/Hal/devices/storage_serial_35000c5000020d933
/org/freedesktop/Hal/devices/storage_serial_3600508b400105e210000900000490000_0
/org/freedesktop/Hal/devices/storage_serial_3600508b400105e210000900000490000
/org/freedesktop/Hal/devices/storage_serial_3600601601040190000c7da47f286dc11_0
/org/freedesktop/Hal/devices/storage_serial_36006016010401900be062253f286dc11_0
/org/freedesktop/Hal/devices/storage_serial_360060160104019008e275c5af286dc11_0
/org/freedesktop/Hal/devices/storage_serial_360060160104019000ad1c4510660dd11_0
/org/freedesktop/Hal/devices/storage_serial_3600601601040190002e7ff73e23bdd11_0
/org/freedesktop/Hal/devices/storage_serial_3600601601040190000c7da47f286dc11
/org/freedesktop/Hal/devices/storage_serial_36006016010401900be062253f286dc11
/org/freedesktop/Hal/devices/storage_serial_360060160104019008e275c5af286dc11
/org/freedesktop/Hal/devices/storage_serial_360060160104019000ad1c4510660dd11
/org/freedesktop/Hal/devices/storage_serial_3600601601040190002e7ff73e23bdd11
/org/freedesktop/Hal/devices/storage_model_TSSTcorpCD_ROM_TS_L162C
/org/freedesktop/Hal/devices/platform_floppy_0_storage

Comment 40 Richard Hughes 2009-07-22 15:06:08 UTC
Built as hal-0_5_8_1-51_el5 in http://brewweb.devel.redhat.com/brew/taskinfo?taskID=1902492

Comment 42 Richard Hughes 2009-07-22 15:22:59 UTC
Note for QA people: you need the fixed kernel in https://bugzilla.redhat.com/show_bug.cgi?id=513070 before this will work. Not having the fixed kernel means that the new code is not used, and so is harmless.

Comment 45 Vladimir Benes 2009-07-29 11:33:56 UTC
ok so it looks good cciss device is shown among other when listing by storage capability

Alan, Subhendu: any idea how to test together with RHEV? I do not know where should this device be shown/used .. I can create img on mounted cciss partition but I probably meant to install it directly to cciss partition..

Comment 46 Perry Myers 2009-07-29 15:07:21 UTC
(In reply to comment #45)
> ok so it looks good cciss device is shown among other when listing by storage
> capability
> 
> Alan, Subhendu: any idea how to test together with RHEV? I do not know where
> should this device be shown/used .. I can create img on mounted cciss partition
> but I probably meant to install it directly to cciss partition..  

We are doing a RHEVH build tomorrow and will tag the newer hal package to get picked up in that build.  Then we can have RHEVH qe team (llim) do the RHEVH verification steps if that is acceptable to you.

Comment 57 errata-xmlrpc 2009-09-02 11:24:52 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1359.html


Note You need to log in before you can comment on or make changes to this bug.