OLD | NEW |
1 # Magic Values | 1 # Magic Values |
2 | 2 |
3 Describes magic values on the swarming server | 3 Describes magic values on the swarming server |
4 | 4 |
5 ## Introduction | 5 ## Introduction |
6 | 6 |
7 There are a few "magic" values in the isolate and swarming server. Also some | 7 There are a few "magic" values in the isolate and swarming server. Also some |
8 dimensions and state values have special meaning. | 8 dimensions and state values have special meaning. |
9 | 9 |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 ## Swarming | 29 ## Swarming |
30 | 30 |
31 ### Task execution environment | 31 ### Task execution environment |
32 | 32 |
33 When a Swarming bot is running a task, the following environment variables are | 33 When a Swarming bot is running a task, the following environment variables are |
34 always set: | 34 always set: |
35 | 35 |
36 - `SWARMING_HEADLESS=1` is always set. | 36 - `SWARMING_HEADLESS=1` is always set. |
37 - `SWARMING_BOT_ID` is set to the bot id. | 37 - `SWARMING_BOT_ID` is set to the bot id. |
| 38 - `SWARMING_TASK_ID` is set to the task id. |
| 39 - `SWARMING_AUTH_PARAMS` is path to a file with task authentication tokens. |
38 | 40 |
39 The following environment variables may be set to alter bot behavior: | 41 The following environment variables may be set to alter bot behavior: |
40 | 42 |
41 - `SWARMING_EXTERNAL_BOT_SETUP=1` disables bot_config.setup_bot hook. | 43 - `SWARMING_EXTERNAL_BOT_SETUP=1` disables bot_config.setup_bot hook. |
42 | 44 |
43 | 45 |
44 ### dimensions | 46 ### dimensions |
45 | 47 |
46 - `id`: must be a single value in the list, which also must be unique. It's | 48 - `id`: must be a single value in the list, which also must be unique. It's |
47 what uniquely identify the bot. | 49 what uniquely identify the bot. |
48 - `quarantined`: if present, it specifies the bot self-quarantined, as it | 50 - `quarantined`: if present, it specifies the bot self-quarantined, as it |
49 found out it needs manual sysadmin assistance before being able to accept | 51 found out it needs manual sysadmin assistance before being able to accept |
50 any task. An example is that it doesn't enough free disk space. | 52 any task. An example is that it doesn't enough free disk space. |
51 | 53 |
52 | 54 |
53 ### state | 55 ### state |
54 | 56 |
55 - `cost_usd_hour`: reports the base cost of this bot in $USD/hour. | 57 - `cost_usd_hour`: reports the base cost of this bot in $USD/hour. |
56 - `lease_expiration_ts`: when set to an integer or floating point value, | 58 - `lease_expiration_ts`: when set to an integer or floating point value, |
57 informs the server of the time (in UTC seconds since epoch) that the bot | 59 informs the server of the time (in UTC seconds since epoch) that the bot |
58 will disconnect from the server. The server will not allow the bot to | 60 will disconnect from the server. The server will not allow the bot to |
59 reap any tasks projected to end after the bot disconnects. | 61 reap any tasks projected to end after the bot disconnects. |
60 - `periodic_reboot_secs`: when set to a integer, instructs the server to send | 62 - `periodic_reboot_secs`: when set to a integer, instructs the server to send |
61 a reboot command after this period. The actual period is fuzzed with a 10% | 63 a reboot command after this period. The actual period is fuzzed with a 10% |
62 delta. | 64 delta. |
63 - `quarantined`: has the same meaning than in `dimensions`. It's also | 65 - `quarantined`: has the same meaning than in `dimensions`. It's also |
64 supported as a state. | 66 supported as a state. |
OLD | NEW |