Skip to content

Commit 8610b3b

Browse files
authored
Merge pull request #58 from rw15e/feature/third_party_pcie_default_flag
Feature/third party pcie default flag
2 parents f843679 + 96f6200 commit 8610b3b

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

Dell_iDRAC_fan_controller.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
source functions.sh
88

9-
# Trap the signals for container exit and run gracefull_exit function
10-
trap 'gracefull_exit' SIGQUIT SIGKILL SIGTERM
9+
# Trap the signals for container exit and run graceful_exit function
10+
trap 'graceful_exit' SIGQUIT SIGTERM
1111

1212
# Prepare, format and define initial variables
1313

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,6 @@ ENV FAN_SPEED 5
2525
ENV CPU_TEMPERATURE_THRESHOLD 50
2626
ENV CHECK_INTERVAL 60
2727
ENV DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE false
28+
ENV KEEP_THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE_STATE_ON_EXIT false
2829

2930
CMD ["./Dell_iDRAC_fan_controller.sh"]

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ docker run -d \
8181
-e CPU_TEMPERATURE_THRESHOLD=<decimal temperature threshold> \
8282
-e CHECK_INTERVAL=<seconds between each check> \
8383
-e DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE=<true or false> \
84+
-e KEEP_THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE_STATE_ON_EXIT=<true or false> \
8485
--device=/dev/ipmi0:/dev/ipmi0:rw \
8586
tigerblue77/dell_idrac_fan_controller:latest
8687
```
@@ -98,6 +99,7 @@ docker run -d \
9899
-e CPU_TEMPERATURE_THRESHOLD=<decimal temperature threshold> \
99100
-e CHECK_INTERVAL=<seconds between each check> \
100101
-e DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE=<true or false> \
102+
-e KEEP_THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE_STATE_ON_EXIT=<true or false> \
101103
tigerblue77/dell_idrac_fan_controller:latest
102104
```
103105

@@ -119,6 +121,7 @@ services:
119121
- CPU_TEMPERATURE_THRESHOLD=<decimal temperature threshold>
120122
- CHECK_INTERVAL=<seconds between each check>
121123
- DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE=<true or false>
124+
- KEEP_THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE_STATE_ON_EXIT=<true or false>
122125
devices:
123126
- /dev/ipmi0:/dev/ipmi0:rw
124127
```
@@ -141,6 +144,7 @@ services:
141144
- CPU_TEMPERATURE_THRESHOLD=<decimal temperature threshold>
142145
- CHECK_INTERVAL=<seconds between each check>
143146
- DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE=<true or false>
147+
- KEEP_THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE_STATE_ON_EXIT=<true or false>
144148
```
145149
146150
<p align="right">(<a href="#top">back to top</a>)</p>
@@ -157,6 +161,7 @@ All parameters are optional as they have default values (including default iDRAC
157161
- `CPU_TEMPERATURE_THRESHOLD` parameter is the T°junction (junction temperature) threshold beyond which the Dell fan mode defined in your BIOS will become active again (to protect the server hardware against overheat). **Default** value is 50(°C).
158162
- `CHECK_INTERVAL` parameter is the time (in seconds) between each temperature check and potential profile change. **Default** value is 60(s).
159163
- `DISABLE_THIRD_PARTY_PCIE_CARD_DELL_DEFAULT_COOLING_RESPONSE` parameter is a boolean that allows to disable third-party PCIe card Dell default cooling response. **Default** value is false.
164+
- `KEEP_THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE_STATE_ON_EXIT` parameter is a boolean that allows to keep the third-party PCIe card Dell default cooling response state upon exit. **Default** value is false, so that it resets the third-party PCIe card Dell default cooling response to Dell default.
160165

161166
<p align="right">(<a href="#top">back to top</a>)</p>
162167

functions.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,15 @@ function disable_third_party_PCIe_card_Dell_default_cooling_response () {
8686
# }
8787

8888
# Prepare traps in case of container exit
89-
function gracefull_exit () {
89+
function graceful_exit () {
9090
apply_Dell_fan_control_profile
91-
enable_third_party_PCIe_card_Dell_default_cooling_response
91+
92+
# Reset third-party PCIe card cooling response to Dell default depending on the user's choice at startup
93+
if ! $KEEP_THIRD_PARTY_PCIE_CARD_COOLING_RESPONSE_STATE_ON_EXIT
94+
then
95+
enable_third_party_PCIe_card_Dell_default_cooling_response
96+
fi
97+
9298
echo "/!\ WARNING /!\ Container stopped, Dell default dynamic fan control profile applied for safety."
9399
exit 0
94100
}

0 commit comments

Comments
 (0)