Bug 896302
Summary: | Replace hal-* commands in inventory gathering script | ||
---|---|---|---|
Product: | [Retired] Beaker | Reporter: | Amit Saha <asaha> |
Component: | inventory | Assignee: | Dan Callaghan <dcallagh> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Dan Callaghan <dcallagh> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 0.9 | CC: | aigao, dcallagh, ebaak, mjia, qwan, tools-bugs |
Target Milestone: | 21.0 | Keywords: | Patch |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | Inventory | ||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-08-26 06:17:51 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 727634 |
Description
Amit Saha
2013-01-17 01:03:36 UTC
The hal commands are being used to set the DISK_CONTROLLER key/value, but I do not see that in our DB. So..it seems like we can just remove those? (In reply to Amit Saha from comment #2) > The hal commands are being used to set the DISK_CONTROLLER key/value, but I > do not see that in our DB. > > So..it seems like we can just remove those? Oh, but I see it in our production DB .. (In reply to Amit Saha from comment #3) > (In reply to Amit Saha from comment #2) > > The hal commands are being used to set the DISK_CONTROLLER key/value, but I > > do not see that in our DB. > > > > So..it seems like we can just remove those? > > Oh, but I see it in our production DB .. Scratch that, i just learned that the admin can define key/value pairs. Okay, looking more closely at the old piece of code in beaker-system-scan for populating DISK_CONTROLLER I see what is going on now... The current algorithm for picking DISK_CONTROLLER is: * For each block device in /sys/block: * If the block device is not named sr* (SCSI CD-ROM) or fd* (floppy disk) and if the block device has a "device" symlink to the underlying hardware and if it's not "virtual" (device-mapper etc): 1. Find the device in HAL and get its driver 2. If the driver is not "sd" or "sr": * Found DISK_CONTROLLER 3. Find the device's parent in HAL and go back to 1 So clearly the intention here was to find the first real disk, and then work upwards to find the device it is connected to (typically a PCI SCSI card or RAID controller etc). However the algorithm does not seem to account for "ide-disk" which is the driver for IDE disks, only "sd" which is SCSI disks. So in the IDE case, it won't actually go up one to the storage controller which would be "VIA_IDE" in the example in comment 7. But it clearly should be. So we can grab the disk controller driver from lshw easily enough... the hardest part will probably be finding the correct (non-virtual, non-CDROM) disk. Beaker 21.0 has been released. |