Commit bc00f66
committed
fix(seaweedfs): address second round of PR review comments
- add bounded connect (10s) and per-request (30s) timeouts to the S3
extension HttpClient/HttpRequest so a stalled endpoint cannot block
management-server API threads indefinitely
- only accept 2xx as success for the quota S3 extension request; 3xx was
previously treated as success even though HttpClient does not follow
redirects by default and the mutation was not applied
- omit a bucket from the usage result on S3 listing failure instead of
returning 0, so BucketApiServiceImpl does not overwrite stored usage
with a false zero on a transient endpoint/permission failure
- prefer the current ObjectStoreVO.url over the persisted s3Url detail
in getS3Url so bucket operations follow a live endpoint after an
administrator updates the store URL
- namespace per-account IAM credential keys by store ID so one account
using multiple SeaweedFS pools does not have the second pool overwrite
the first pool's credentials
- update existing BucketVO rows with the new IAM credentials on key
rotation (updateAccountBucketCredentials), mirroring the Cloudian
driver, so previously created buckets stop handing out the old key
- add SeaweedFS to the Add Object Storage UI provider list
- fix testSetBucketQuotaNoS3ConfigThrows to actually clear store details
so the exception comes from the missing-config check, not a network
call
- add a deterministic SigV4 signature-verification test that independently
signs the same request and asserts the Authorization header, payload
hash, and date match exactly
- add a test asserting 3xx responses are rejected for quota requests1 parent 5109b1c commit bc00f66
4 files changed
Lines changed: 201 additions & 30 deletions
File tree
- plugins/storage/object/seaweedfs/src
- main/java/org/apache/cloudstack/storage/datastore
- driver
- util
- test/java/org/apache/cloudstack/storage/datastore/driver
- ui/src/views/infra
Lines changed: 43 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
153 | 155 | | |
154 | 156 | | |
155 | 157 | | |
| |||
164 | 166 | | |
165 | 167 | | |
166 | 168 | | |
167 | | - | |
168 | | - | |
169 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
170 | 172 | | |
171 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
172 | 179 | | |
173 | 180 | | |
174 | 181 | | |
175 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
176 | 198 | | |
177 | 199 | | |
178 | 200 | | |
| |||
249 | 271 | | |
250 | 272 | | |
251 | 273 | | |
252 | | - | |
253 | | - | |
| 274 | + | |
| 275 | + | |
254 | 276 | | |
255 | 277 | | |
256 | 278 | | |
| |||
465 | 487 | | |
466 | 488 | | |
467 | 489 | | |
468 | | - | |
| 490 | + | |
469 | 491 | | |
470 | 492 | | |
471 | 493 | | |
| |||
502 | 524 | | |
503 | 525 | | |
504 | 526 | | |
505 | | - | |
506 | | - | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
507 | 531 | | |
508 | 532 | | |
509 | 533 | | |
| |||
512 | 536 | | |
513 | 537 | | |
514 | 538 | | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
520 | 547 | | |
521 | | - | |
| 548 | + | |
| 549 | + | |
522 | 550 | | |
523 | 551 | | |
524 | 552 | | |
| |||
Lines changed: 45 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
58 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
59 | 84 | | |
60 | 85 | | |
61 | 86 | | |
| |||
201 | 226 | | |
202 | 227 | | |
203 | 228 | | |
204 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
205 | 241 | | |
206 | 242 | | |
207 | 243 | | |
| |||
305 | 341 | | |
306 | 342 | | |
307 | 343 | | |
308 | | - | |
| 344 | + | |
| 345 | + | |
309 | 346 | | |
310 | 347 | | |
311 | 348 | | |
| |||
325 | 362 | | |
326 | 363 | | |
327 | 364 | | |
328 | | - | |
| 365 | + | |
| 366 | + | |
329 | 367 | | |
330 | 368 | | |
331 | | - | |
| 369 | + | |
332 | 370 | | |
333 | 371 | | |
334 | 372 | | |
| |||
Lines changed: 112 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | | - | |
| 157 | + | |
| 158 | + | |
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
340 | 441 | | |
341 | 442 | | |
342 | 443 | | |
343 | 444 | | |
344 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
345 | 450 | | |
346 | 451 | | |
347 | 452 | | |
| |||
402 | 507 | | |
403 | 508 | | |
404 | 509 | | |
405 | | - | |
406 | | - | |
| 510 | + | |
| 511 | + | |
407 | 512 | | |
408 | 513 | | |
409 | 514 | | |
| |||
454 | 559 | | |
455 | 560 | | |
456 | 561 | | |
457 | | - | |
458 | | - | |
| 562 | + | |
| 563 | + | |
459 | 564 | | |
460 | 565 | | |
461 | 566 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| |||
0 commit comments