Skip to content

Commit e2b6271

Browse files
author
Nicolas Malaval
committed
Rename power_down.py to change_state.py
1 parent 31b3b72 commit e2b6271

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ This script is the `SuspendProgram` executed by Slurm to place nodes in power sa
174174

175175
You can manually try the suspend program by running `/fullpath/suspend.py (partition_name)-(nodegroup_name)(id)` such as `/fullpath/suspend.py partition-nodegroup0`.
176176

177-
### `power_down.py`
177+
### `change_state.py`
178178

179179
This script is executed every minute by `cron` to change the state of nodes that are stuck in a transient or undesired state. For example, compute nodes that failed to respond within `ResumeTimeout` seconds are placed in a `DOWN*` state and the state must be set to `POWER_DOWN`.
180180

@@ -237,7 +237,7 @@ wget -q https://github.com/aws-samples/aws-plugin-for-slurm/raw/plugin-v2/common
237237
wget -q https://github.com/aws-samples/aws-plugin-for-slurm/raw/plugin-v2/resume.py
238238
wget -q https://github.com/aws-samples/aws-plugin-for-slurm/raw/plugin-v2/suspend.py
239239
wget -q https://github.com/aws-samples/aws-plugin-for-slurm/raw/plugin-v2/generate_conf.py
240-
wget -q https://github.com/aws-samples/aws-plugin-for-slurm/raw/plugin-v2/power_down.py
240+
wget -q https://github.com/aws-samples/aws-plugin-for-slurm/raw/plugin-v2/change_state.py
241241
chmod +x *.py
242242
```
243243

@@ -282,16 +282,16 @@ NodeName=aws-node[0-99] State=CLOUD CPUs=4
282282
Partition=aws Nodes=aws-node[0-99] Default=No MaxTime=INFINITE State=UP
283283
```
284284

285-
8) Change the `cron` configuration to run the script `power_down.py` every minute.
285+
8) Change the `cron` configuration to run the script `change_state.py` every minute.
286286

287287
```
288288
sudo crontab -e
289289
```
290290

291-
If the Slurm user is not root, you could create the cron for that user instead `sudo crontab -e -u username`. Add the following line into the file. Make sure to adapt the path `/fullpath/power_down.py` to your own context.
291+
If the Slurm user is not root, you could create the cron for that user instead `sudo crontab -e -u username`. Add the following line into the file. Make sure to adapt the path `/fullpath/change_state.py` to your own context.
292292

293293
```
294-
* * * * * /fullpath/power_down.py
294+
* * * * * /fullpath/change_state.py
295295
```
296296

297297
<a name="tc_cloudformation"/>

power_down.py renamed to change_state.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import common
66

77

8-
logger, config, partitions = common.get_common('power_down')
8+
logger, config, partitions = common.get_common('change_state')
99

1010
# Populate a hostlist with all AWS nodes
1111
hostlist = []

template.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ Resources:
275275
wget -q ${PluginPrefixUrl}resume.py
276276
wget -q ${PluginPrefixUrl}suspend.py
277277
wget -q ${PluginPrefixUrl}generate_conf.py
278-
wget -q ${PluginPrefixUrl}power_down.py
278+
wget -q ${PluginPrefixUrl}change_state.py
279279
chmod +x *.py
280280

281281
cat > $SLURM_HOME/etc/aws/config.json <<EOF
@@ -376,7 +376,7 @@ Resources:
376376

377377
crontab -l > mycron
378378
cat > mycron <<EOF
379-
* * * * * $SLURM_HOME/etc/aws/power_down.py
379+
* * * * * $SLURM_HOME/etc/aws/change_state.py
380380
EOF
381381
crontab mycron
382382
rm mycron

0 commit comments

Comments
 (0)