Improved code by enabling it to run in LAN mode and removing capability which was required by dmidecode
This commit is contained in:
parent
64929802f2
commit
b8372a76e6
2 changed files with 4 additions and 18 deletions
|
|
@ -90,21 +90,12 @@ function gracefull_exit () {
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Help debugging when people are posting their output
|
# Helps debugging when people are posting their output
|
||||||
# /!\ This function only works when started in local mode /!\
|
|
||||||
function get_Dell_server_model () {
|
function get_Dell_server_model () {
|
||||||
# Check that the Docker host IPMI device (the iDRAC) has been exposed to the Docker container
|
IPMI_FRU_content=$(ipmitool fru 2>/dev/null) # FRU stands for "Field Replaceable Unit"
|
||||||
if [ ! -e "/dev/mem" ]; then
|
|
||||||
echo "/!\ Could not open device at /dev/mem, check that you added the device to your Docker container or stop using local mode. Exiting." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
apt-get install dmidecode -qq > /dev/null 2>&1
|
|
||||||
|
|
||||||
SERVER_MANUFACTURER=$(dmidecode -s system-manufacturer)
|
SERVER_MANUFACTURER=$(echo "$IPMI_FRU_content" | grep "Product Manufacturer" | awk -F ': ' '{print $2}')
|
||||||
SERVER_MODEL=$(dmidecode -s system-product-name)
|
SERVER_MODEL=$(echo "$IPMI_FRU_content" | grep "Product Name" | awk -F ': ' '{print $2}')
|
||||||
|
|
||||||
apt-get remove --purge dmidecode -qq > /dev/null
|
|
||||||
apt-get clean -qq
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Trap the signals for container exit and run gracefull_exit function
|
# Trap the signals for container exit and run gracefull_exit function
|
||||||
|
|
|
||||||
|
|
@ -81,9 +81,7 @@ docker run -d \
|
||||||
-e CPU_TEMPERATURE_THRESHOLD=<decimal temperature threshold> \
|
-e CPU_TEMPERATURE_THRESHOLD=<decimal temperature threshold> \
|
||||||
-e CHECK_INTERVAL=<seconds between each check> \
|
-e CHECK_INTERVAL=<seconds between each check> \
|
||||||
-e DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE=<true or false> \
|
-e DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE=<true or false> \
|
||||||
--cap-add SYS_RAWIO \
|
|
||||||
--device=/dev/ipmi0:/dev/ipmi0:rw \
|
--device=/dev/ipmi0:/dev/ipmi0:rw \
|
||||||
--device=/dev/mem:/dev/mem:ro \
|
|
||||||
tigerblue77/dell_idrac_fan_controller:latest
|
tigerblue77/dell_idrac_fan_controller:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -114,8 +112,6 @@ services:
|
||||||
Dell_iDRAC_fan_controller:
|
Dell_iDRAC_fan_controller:
|
||||||
image: tigerblue77/dell_idrac_fan_controller:latest
|
image: tigerblue77/dell_idrac_fan_controller:latest
|
||||||
container_name: Dell_iDRAC_fan_controller
|
container_name: Dell_iDRAC_fan_controller
|
||||||
cap_add:
|
|
||||||
- SYS_RAWIO # Required for dmidecode to work
|
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- IDRAC_HOST=local
|
- IDRAC_HOST=local
|
||||||
|
|
@ -125,7 +121,6 @@ services:
|
||||||
- DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE=<true or false>
|
- DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE=<true or false>
|
||||||
devices:
|
devices:
|
||||||
- /dev/ipmi0:/dev/ipmi0:rw
|
- /dev/ipmi0:/dev/ipmi0:rw
|
||||||
- /dev/mem:/dev/mem:rw # Required for dmidecode to work
|
|
||||||
```
|
```
|
||||||
|
|
||||||
2. to use with LAN iDRAC:
|
2. to use with LAN iDRAC:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue