Bug 489982 - cciss disk devices do not have storage capability in HAL
cciss disk devices do not have storage capability in HAL
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: hal (Show other bugs)
5.3
All Linux
high Severity medium
: rc
: ---
Assigned To: David Zeuthen
desktop-bugs@redhat.com
:
Depends On:
Blocks: 513070 515566
  Show dependency treegraph
 
Reported: 2009-03-12 14:41 EDT by Alan Pevec
Modified: 2016-04-26 12:16 EDT (History)
21 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 489349
: 513070 515566 (view as bug list)
Environment:
Last Closed: 2009-09-02 07:24:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Alan Pevec 2009-03-12 14:41:21 EDT
Description of problem:

hal-find-by-capability --capability storage

returns nothing on HP boxes with cciss

--- Additional comment from rhughes@redhat.com 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@redhat.com 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 06:38:32 EDT
(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 14:56:55 EDT
[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 10:42:14 EDT
Investigating whether upstream scsi-misc commit id below will resolve hal issue for cciss.

7fe063268e73681cdca1a6496a25f93d3332f517
Comment 19 Rob Evers 2009-07-15 10:59:32 EDT
Adding Mike Miller to bugzilla.  I believe Mike maintains the cciss driver.
Comment 20 Rob Evers 2009-07-15 12:41:08 EDT
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 15:40:47 EDT
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 10:06:15 EDT
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 11:02:11 EDT
I'm not sure I understand comment 22. Why would the number of devices change?
Comment 24 Rob Evers 2009-07-20 11:36:10 EDT
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 16:04:38 EDT
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 05:09:38 EDT
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 06:16:52 EDT
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 15:57:17 EDT
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 16:32:20 EDT
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 06:03:35 EDT
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 07:11:09 EDT
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 10:42:30 EDT
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 11:06:08 EDT
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 11:22:59 EDT
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 07:33:56 EDT
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 11:07:21 EDT
(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 07:24:52 EDT
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.