Commit c68a942
committed
[PLAT-20717]Collect File API does not show failed nodes when they are unreachable
Summary: Add a connectivity check before any of the file-collections/run-script APIs. Add a runtime config to configure this timeout
Test Plan:
```
curl -X POST "http://localhost:9000/api/v2/customers/<>/universes/<>/run-script" -H "Content-Type: application/json" -H "X-AUTH-YW-API-TOKEN: <>" -d '{
> "script_options": {
> "script_content": "echo TEST_INLINE; echo COUNT=$#; echo ARG1=$1; echo ARG2=$2; echo ALL=$@",
> "params": ["hello", "world"],
> "timeout_secs": 30
> }
> }'
```
```
{"summary":{"total_nodes":3,"successful_nodes":2,"failed_nodes":1,"total_execution_time_ms":27667,"all_succeeded":false},"results":{"yb-admin-dkumar-1-n1":{"node_name":"yb-admin-dkumar-1-n1","node_address":"<>","exit_code":0,"stdout":"Command output:TEST_INLINE\nCOUNT=2\nARG1=hello\nARG2=world\nALL=hello world\n","execution_time_ms":127,"success":true},"yb-admin-dkumar-1-n2":{"node_name":"yb-admin-dkumar-1-n2","node_address":"<>","exit_code":-1,"stdout":"","execution_time_ms":27665,"success":false,"error_message":"Node is unreachable"},"yb-admin-dkumar-1-n3":{"node_name":"yb-admin-dkumar-1-n3","node_address":"<>","exit_code":0,"stdout":"Command output:TEST_INLINE\nCOUNT=2\nARG1=hello\nARG2=world\nALL=hello world\n","execution_time_ms":133,"success":true}}}
```
Reviewers: rajiv.kumar, nsingh, anabaria
Reviewed By: anabaria
Subscribers: yugaware
Differential Revision: https://phorge.dev.yugabyte.com/D530211 parent fc30f53 commit c68a942
7 files changed
Lines changed: 77 additions & 0 deletions
File tree
- managed
- src/main
- java/com/yugabyte/yw/common
- config
- resources
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| 138 | + | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
| |||
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
430 | 440 | | |
431 | 441 | | |
432 | 442 | | |
| |||
505 | 515 | | |
506 | 516 | | |
507 | 517 | | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
508 | 530 | | |
509 | 531 | | |
510 | 532 | | |
| |||
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
250 | 268 | | |
251 | 269 | | |
252 | 270 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
181 | 194 | | |
182 | 195 | | |
183 | 196 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
801 | 801 | | |
802 | 802 | | |
803 | 803 | | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
804 | 815 | | |
805 | 816 | | |
806 | 817 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1191 | 1191 | | |
1192 | 1192 | | |
1193 | 1193 | | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
1194 | 1205 | | |
1195 | 1206 | | |
1196 | 1207 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1556 | 1556 | | |
1557 | 1557 | | |
1558 | 1558 | | |
| 1559 | + | |
1559 | 1560 | | |
1560 | 1561 | | |
1561 | 1562 | | |
| |||
0 commit comments