Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect value reported for storage device vendor #6

Closed
priteau opened this issue Mar 16, 2016 · 8 comments
Closed

Incorrect value reported for storage device vendor #6

priteau opened this issue Mar 16, 2016 · 8 comments

Comments

@priteau
Copy link
Contributor

@priteau priteau commented Mar 16, 2016

On some hardware, the output of g5k-checks reports an incorrect value for the vendor of a storage device. The wrong value is also present in Ohai.

For example, on Chameleon hardware (this is Ohai output, not Reference API data):

"sda": {
  "size": "488397168",
  "removable": "0",
  "model": "ST9250610NS",
  "rev": "AA63",
  "state": "running",
  "timeout": "90",
  "vendor": "ATA"
}

I checked a couple of Grid'5000 clusters, same problem (this is Reference API data). This is a random node on parapluie (some values removed):

{
  "device": "sda",
  "driver": "ahci",
  "interface": "SATA",
  "storage": "HDD",
  "vendor": "ATA"
}

parapide shows "vendor": null.

The version of Ohai doesn't matter, since the problem actually comes from the value exported by the Linux kernel itself:

$ cat /sys/block/sda/device/vendor
ATA
@priteau

This comment has been minimized.

Copy link
Contributor Author

@priteau priteau commented Mar 17, 2016

This is the code we use in our reference-generator to set the correct vendor value:

case lookup('chameleon_generated', node_uid, 'block_devices', dev, 'model')
when /^HUA/
  storage_vendors[dev] = 'Hitachi'
when /^INTEL/
  storage_vendors[dev] = 'Intel'
when /^ST.*/
  storage_vendors[dev] = 'Seagate'
when /^WD.*/
  storage_vendors[dev] = 'Western Digital'
else
  storage_vendors[dev] = 'Unknown'
end
@deadlybore

This comment has been minimized.

Copy link
Member

@deadlybore deadlybore commented Mar 30, 2016

I face a similar problem regarding the rev firmware.

For example on chinqchint-33 :

On the reference-api we have :

storage_devices"=>[{"device"=>"sda",
      "driver"=>"ahci",
      "interface"=>"SATA II",
      "model"=>"ST3250620NS",
      "rev"=>"3.AEK",
      "size"=>250059350016,
      "storage"=>"HDD",
      "vendor"=>nil}]

On the node :

root@chinqchint-33:~# hdparm -I /dev/sda

/dev/sda:

ATA device, with non-removable media
    Model Number:       ST3250620NS
    Serial Number:      9QE6YWTY
    Firmware Revision:  3.AEK

what ohai retrieve from the node :

{"size"=>"488397168", "removable"=>"0", "model"=>"ST3250620NS", "rev"=>"K", "state"=>"running", "timeout"=>"30", "vendor"=>"ATA"}

Moreover g5k-checks retrieve nothing from the api thus leading to an exception
cat /var/lib/oar/checklogs/OAR_Disk_should_have_the_correct_revision_sda

{"started_at":"2016-03-30 14:49:27 +0200","exception":"K, 3.0, block_devices, sda, rev","status":"failed","finished_at":"2016-03-30 14:49:27 +0200","run_time":0.000228669}
@jgaida

This comment has been minimized.

Copy link

@jgaida jgaida commented Mar 30, 2016

There is a similar issue with bios versions

On the G5K Ref API:

chimint-1:
  bios:
    release_date: 10/22/2010
    vendor: Dell Inc.
    version: 1.5

With g5k-check:

chimint-1:
  bios:
    release_date: 10/22/2010
    vendor: Dell Inc.
    version: 1.5.3
@jgaida

This comment has been minimized.

Copy link

@jgaida jgaida commented Jun 23, 2016

I fixed the BIOS version problem in 5dbd55a

@jgaida

This comment has been minimized.

Copy link

@jgaida jgaida commented Jun 23, 2016

For the 'rev' problem encountered by @deadlybore, ohai gets the info from /sys/block/sda/device/rev (see ohai/lib/ohai/plugins/linux/block_device.rb) and the data is actually truncated on this file.

@jgaida

This comment has been minimized.

Copy link

@jgaida jgaida commented Jun 23, 2016

Concerning the initial problem reported by @priteau, it seems that lshw is capable of finding the hard-drive vendor:

$ sudo lshw -class disk -class storage -json
[...]
        "description" : "ATA Disk",
        "product" : "Hitachi HDT72502",
        "vendor" : "Hitachi",
        "physid" : "0.0.0",
        "businfo" : "scsi@0:0.0.0",
        "logicalname" : "/dev/sda",
        "dev" : "8:0",
        "version" : "A7EA",
        "serial" : "VFJ111R7C38UKU",
jgaida pushed a commit to grid5000/reference-repository that referenced this issue Sep 14, 2016
@jgaida

This comment has been minimized.

Copy link

@jgaida jgaida commented Sep 14, 2016

I updated g5k-checks to use hdparm for the rev/version string and lshw for the vendor when available. It still falls back to /sys/block/sda/device/rev and /sys/block/sda/device/vendor when the values cannot be retrieves with those tools.

jgaida pushed a commit that referenced this issue Sep 14, 2016
jgaida pushed a commit that referenced this issue Sep 14, 2016
@nmichon

This comment has been minimized.

Copy link
Contributor

@nmichon nmichon commented Feb 1, 2017

The latest version (0.7.8) should contain all the fixes regarding disk vendor and firmware revision.
Closing this issue as it seems those values are now correctly managed.

@nmichon nmichon closed this Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.