Skip to content
Snippets Groups Projects
Commit fa40dbd6 authored by Morris Jette's avatar Morris Jette
Browse files

Merge branch 'slurm-17.11'

parents 1ab63842 dc7ca7be
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/bash
# Emulate dw_wlm_cli (Cray's DataWarp interface) for testing purposes # Emulate dw_wlm_cli (Cray's DataWarp interface) for testing purposes
# See "Flags=EmulateCray" in burst_buffer.conf man page # See "Flags=EmulateCray" in burst_buffer.conf man page
#
# create_persistent
#
if [ $2 == "create_persistent" ]; then if [ $2 == "create_persistent" ]; then
echo 'created' echo 'created'
fi fi
#
# data_in
#
if [ $2 == "data_in" ]; then if [ $2 == "data_in" ]; then
sleep 100 sleep 3
# echo 'badness...' # echo "foo"
# exit 1 # exit 1
fi fi
#
# data_out
#
if [ $2 == "data_out" ]; then if [ $2 == "data_out" ]; then
sleep 1 sleep 20
# echo 'badness...' # echo "foo"
# exit 1 # exit 1
fi fi
#
# destroy_persistent is defunct, use teardown
#
if [ $2 == "destroy_persistent" ]; then if [ $2 == "destroy_persistent" ]; then
sleep 0.1 sleep 0.1
fi fi
#
# job_process
#
if [ $2 == "job_process" ]; then if [ $2 == "job_process" ]; then
sleep 0.1 sleep 0.1
fi fi
#
# paths
#
if [ $2 == "paths" ]; then if [ $2 == "paths" ]; then
if [ $7 == "--pathfile" ]; then if [ $7 == "--pathfile" ]; then
echo 'DWPATHS=/tmp/dw' > $8 echo 'DWPATHS=/tmp/dw' > $8
fi fi
fi fi
#
# pre_run
#
if [ $2 == "pre_run" ]; then if [ $2 == "pre_run" ]; then
sleep 0.1 sleep 5
# echo 'badness...'
# exit 1
fi fi
#
# post_run
#
if [ $2 == "post_run" ]; then if [ $2 == "post_run" ]; then
sleep 0.1 sleep 0.1
fi fi
if [ $2 == "pools" ]; then
# echo '{ "pools": [ { "id":"dwcache", "units":"bytes", "granularity":16777216, "quantity":2048, "free":2048 } ] }'
echo '{ "pools": [ { "id":"dwcache", "units":"bytes", "granularity":16777216, "quantity":2048, "free":2048 }, { "id":"test_pool", "units":"bytes", "granularity":16777216, "quantity":2048, "free":2048 } ] }'
#
# pools
#
if [ $2 == "pools" ]; then
echo '{"pools": [{"free": 29, "granularity": 214748364800, "id": "wlm_pool", "quantity": 29, "units": "bytes"}]}'
fi fi
if [ "$2" = "real_size" ] ; then if [ $2 == "poolsx" ]; then
echo '{ "token":"job.1234", "capacity":17592186044416, "units":"bytes" }' echo '{ "pools": [ { "id":"dwcache", "units":"bytes", "granularity":16777216, "quantity":2048, "free":2048 } ] }'
fi fi
#
# setup
#
if [ $2 == "setup" ]; then if [ $2 == "setup" ]; then
sleep 6
fi
if [ $2 == "setupx" ]; then
sleep 0.1 sleep 0.1
echo 'dwpost - failed client status code %s 400
Error creating instance: 400'
exit 1
fi fi
#
# show_configurations
#
if [ $2 == "show_configurations" ]; then if [ $2 == "show_configurations" ]; then
echo '{ "configurations": [ ] }' echo '{ "configurations": [ ] }'
fi fi
#
# show_instances
#
if [ $2 == "show_instances" ]; then if [ $2 == "show_instances" ]; then
echo '{ "instances": [ ] }'
fi
if [ $2 == "show_instancesx" ]; then
echo '{ "instances": [ echo '{ "instances": [
{"capacity": {"bytes": 1099511627776, "nodes": 2}, "created": 1478231657, "expiration": 0, "expired": false, "id": 74, "intact": true, "label": "alpha", "limits": {"write_window_length": 86400, "write_window_multiplier": 10}, "links": {"configurations": [72], "session": 74}, "public": true, "state": {"actualized": true, "fuse_blown": false, "goal": "create", "mixed": false, "transitioning": false}}, {"capacity": {"bytes": 1288490188800, "nodes": 2}, "created": 1478232104, "expiration": 0, "expired": false, "id": 75, "intact": true, "label": "I75-0", "limits": {"write_window_length": 86400, "write_window_multiplier": 10}, "links": {"configurations": [73], "session": 75}, "public": false, "state": {"actualized": true, "fuse_blown": false, "goal": "create", "mixed": false, "transitioning": false}}
{"capacity": {"bytes": 1099511627776, "nodes": 2}, "created": 1478232104, "expiration": 0, "expired": false, "id": 75, "intact": true, "label": "I75-0", "limits": {"write_window_length": 86400, "write_window_multiplier": 10}, "links": {"configurations": [73], "session": 75}, "public": false, "state": {"actualized": true, "fuse_blown": false, "goal": "create", "mixed": false, "transitioning": false}}
] }' ] }'
fi fi
# Create a job with ID 347 or the buffer will get torn down at slurmctld startup #
# show_instances
#
if [ $2 == "show_sessions" ]; then if [ $2 == "show_sessions" ]; then
echo '{ "sessions": [ ] }'
fi
# Create a job with ID 347 or the buffer will get torn down at slurmctld startup
if [ $2 == "show_sessionsx" ]; then
echo '{ "sessions": [ echo '{ "sessions": [
{"created": 1478231657, "creator": "CLI", "expiration": 0, "expired": false, "id": 74, "links": {"client_nodes": []}, "owner": 1001, "state": {"actualized": true, "fuse_blown": false, "goal": "create", "mixed": false, "transitioning": false}, "token": "alpha"},
{"created": 1478232104, "creator": "SLURM", "expiration": 0, "expired": false, "id": 75, "links": {"client_nodes": ["nid00039"]}, "owner": 1001, "state": {"actualized": true, "fuse_blown": false, "goal": "create", "mixed": false, "transitioning": false}, "token": "347"} {"created": 1478232104, "creator": "SLURM", "expiration": 0, "expired": false, "id": 75, "links": {"client_nodes": ["nid00039"]}, "owner": 1001, "state": {"actualized": true, "fuse_blown": false, "goal": "create", "mixed": false, "transitioning": false}, "token": "347"}
] }' ] }'
fi fi
#
# teardown
#
if [ $2 == "teardown" ]; then if [ $2 == "teardown" ]; then
sleep 0.1 sleep 0.1
# exit 1
fi fi
exit 0 exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment