tigerblue77 / Dell_iDRAC_fan_controller_Docker

Docker image to control your Dell PowerEdge fans via IPMI
240 stars 58 forks source link

iDrac6 missing product info causing exit #86

Closed Spanqz closed 7 months ago

Spanqz commented 7 months ago

Recent update broke the tool on my PowerEdge R410 where IPMI does not return product info in LAN mode with command:

ipmitool -I lanplus -H <IP> -U <user> -P <pass> fru

Example output PowerEdge R410:

 FRU Device Description : Builtin FRU Device (ID 0)
  Board Mfg Date        : Sun Jan  3 06:18:00 2010 CET
  Board Mfg             : DELL
  Board Product         : PowerEdge R410                
  Board Serial          : XXXXX
  Board Part Number     : 0N051FA04

Example output PowerEdge R730:

 FRU Device Description : Builtin FRU Device (ID 0)
  Board Mfg Date        : Fri Aug 28 07:20:00 2015 CEST
  Board Mfg             : DELL
  Board Product         : PowerEdge R730                
  Board Serial          : XXXXX
  Board Part Number     : 0H21J3A10
  Product Manufacturer  : DELL
  Product Name          : PowerEdge R730
  Product Version       : 01
  Product Serial        : XXXXX

The container exits with message:

Your server isn't a Dell product. Exiting.

As I understand the script uses "Product Manufacturer" and "Product Name" to verify correct hardware, without this the tool exits.

Updated description to correct formatting.

tigerblue77 commented 7 months ago

Hello, Can you test the code in PR 86

Spanqz commented 7 months ago

Hello, Can you test the code in PR 86

I still get the same error message.

tigerblue77 commented 7 months ago

Hello @Spanqz, do you have a bit of time so we work on it ? I'd need you to realize some tests as I don't have hardware of thid generation

Spanqz commented 7 months ago

@tigerblue77 I think I found the problem. grep "Board Mfg" returns both "Board Mfg" and "Board Mfg Date".

echo "$IPMI_FRU_content" | grep "Board Mfg"

Board Mfg Date : Sun Jan 3 06:18:00 2010 CET Board Mfg : DELL

echo "SERVER_MANUFACTURER: $SERVER_MANUFACTURER"

SERVER_MANUFACTURER: Sun Jan 3 06:18:00 2010 CET DELL

tigerblue77 commented 7 months ago

@Spanqz, I think you're right. I edited the PR, can you test again please ?

Spanqz commented 7 months ago

The actual output of Board Mfg : DELL

Contains multiple spaces: Board Mfg : DELL

Which was trimmed in my original issue description.

Perhaps something similair to this could work? SERVER_MANUFACTURER=$(echo "$IPMI_FRU_content" | tr -s ' ' | grep "Board Mfg :" | awk -F ': ' '{print $2}')

By using | tr -s ' ' we trim any repeating space.

tigerblue77 commented 7 months ago

OMG this output is &*!qz" ! đŸ˜† Thanks for your suggestion. Can you test again please ?

Spanqz commented 7 months ago

Testet and confirmed working. Thank you.

tigerblue77 commented 7 months ago

No problem, thanks for your tests and help in resolving !

Spanqz commented 7 months ago

Accidentally closed the issue, re-open it if you want to close when changes are commited to master.