Add disk interface type verification, and fix the bad ones
- First commit to:
- add to disk list the interface type (SAS, SATA, …)
- check when generating the reference-api if the interface configured server side match the known interface for a specific disk model. If a RAID card is present, we don't check (some PERC can do both SATA and SAS so it's not possible to detect the disk interface)
- Second commit to fix the disks with wrong interfaces
Merge request reports
Activity
- Resolved by JONGLEZ Baptiste
- Resolved by JONGLEZ Baptiste
assigned to @bjonglez
added 1 commit
- 270e6feb - [all] [disks] fix some clusters disks' interfaces
Il faudra indiquer dans https://intranet.grid5000.fr/bugzilla/show_bug.cgi?id=12722 une fois mergé que l'action 1 et ok.
Si je comprends bien, quand un noeud a une carte RAID, on peut mettre ce qu'on veut comme propriété
storage_devices: sdX: interface
(RAID, SAS, SCSI) sur un noeud. La moulinette du refrepo ne vérifie pas la cohérence dans ce cas.On a un autre moyen de détecter des erreurs ? J'imagine que l'information sur le type d'interface a été récupérée manuellement à un moment ?
À part ça, le reste est OK pour moi !
On peut voir le disque à travers la carte RAID :
smartctl -a /dev/sda -d megaraid,0
Example sur nova :
Vendor: SEAGATE Product: ST300MP0005 Revision: VT33 Compliance: SPC-4 User Capacity: 300,000,000,000 bytes [300 GB] Logical block size: 512 bytes Formatted with type 2 protection LU is fully provisioned Rotation Rate: 15000 rpm Form Factor: 2.5 inches Logical Unit id: 0x5000c500986ca653 Serial number: S7K1GCQZ Device type: disk Transport protocol: SAS (SPL-3)
Par contre, pas 100% sûr qu'on puisse faire confiance au type d'interface qui est remonté.
Au final, ça ne concerne que les quelques clusters qui ne sont pas en JBOD (https://intranet.grid5000.fr/bugzilla/show_bug.cgi?id=12722), donc pas très grave.
@snoir ah si, est-ce que tu peux remettre le modèle de disque "unknown" ? J'avais ajouté ça pour faciliter l'installation initiale d'un cluster quand on ne connaît pas le modèle de disque et qu'on n'est pas encore en mesure de faire passer g5k-checks.
https://www.grid5000.fr/w/TechTeam:Add_new_cluster#Reference_Repository_minimal_configuration
Zut, du coup quand on met un disque "unknown" sur un noeud ça fait échouer la génération reference-api :
Model "unknown" specify in multiple interface: ["RAID", "SCSI", "SAS", "SATA", "NVME"] in input/grid5000/disks.yaml
À ignorer ?
Edited by JONGLEZ Baptiste
Par ailleurs, petit typo dans ce cas d'erreur :
--- a/lib/refrepo/gen/reference-api.rb +++ b/lib/refrepo/gen/reference-api.rb @@ -270,7 +270,7 @@ def generate_reference_api raise "Model \"#{hash["model"]}\" don't match any vendor in input/grid5000/disks.yaml" if matching_vendor.empty? raise "Model \"#{hash["model"]}\" specify in multiple vendors: #{matching_vendor.keys} in input/grid5000/disks.yaml" if matching_vendor.length > 1 - raise "Model \"#{hash["model"]}\" specify in multiple interface: #{interface} in input/grid5000/disks.yaml" if matching_interface.length > 1 + raise "Model \"#{hash["model"]}\" specify in multiple interface: #{matching_interface} in input/grid5000/disks.yaml" if matching_interface.length > 1 hash['vendor'] = matching_vendor.keys.first if matching_interface.first != 'RAID' && hash['interface'] != matching_interface.first
added 26 commits
-
f2c87953...97b03001 - 20 commits from branch
master
- aace9dd4 - [input] [disks] reorganize the known disks list with the interface type
- ed9cb562 - [all] [disks] fix some clusters disks' interfaces
- a1a93a80 - [input] Fix RAID info for clusters with 2 disks in one RAID-0 or RAID-1
- e9269eeb - [all] Update data
- e3d08b18 - [input][disks] Re add unknown disk model
- c2d14dfe - [nancy/grouille] fix sda disk interface
Toggle commit list-
f2c87953...97b03001 - 20 commits from branch
enabled an automatic merge when the pipeline for c2d14dfe succeeds