Artifacts upload failed with S3 and aws signature version 4
Summary
After updating gitlab-ce from 13.6.3 to 13.7.4, uploading artifacts failed when configured to upload to S3-compatible object storage and using aws signature version 4.
Other objects like "uploads" and "packages" are correctly uploaded to S3. Only artifacts seems to be impacted.
Switching aws signature version to 2 make the artifacts upload work again.
It was working well with version 4 on previous GitLab version.
Steps to reproduce
- Install gitlab-ce 13.7.4
- Add consolidated object storage configuration
... gitlab_rails['object_store']['enabled'] = true gitlab_rails['object_store']['proxy_download'] = true gitlab_rails['object_store']['connection'] = { 'provider' => 'AWS', 'aws_access_key_id' => '<access-key>', 'aws_secret_access_key' => '<secret-key>', 'host' => '<host-fqdn>', 'aws_signature_version' => '4', 'enable_signature_v4_streaming' => 'false' } gitlab_rails['object_store']['objects']['artifacts']['enabled'] = true gitlab_rails['object_store']['objects']['artifacts']['bucket'] = 'gitlab-artifacts' ... - Reconfigure gitlab :
gitlab-ctl reconfigure - Launch pipeline wich artifact upload.
What is the current bug behavior?
The pipeline job failed with error :
WARNING: Uploading artifacts as "archive" to coordinator... failed id=28006 responseStatus=500 Internal Server Error status=500
WARNING: Retrying... context=artifacts-uploader error=invalid argument
What is the expected correct behavior?
Artifacts being successfully uploaded to S3-compatible object storage.
Relevant logs and/or screenshots
Job log :
...
Uploading artifacts for successful job
00:04
Uploading artifacts...
test: found 1 matching files and directories
WARNING: Uploading artifacts as "archive" to coordinator... failed id=28006 responseStatus=500 Internal Server Error status=500
WARNING: Retrying... context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts as "archive" to coordinator... failed id=28006 responseStatus=500 Internal Server Error status=500
WARNING: Retrying... context=artifacts-uploader error=invalid argument
WARNING: Uploading artifacts as "archive" to coordinator... failed id=28006 responseStatus=500 Internal Server Error status=500
FATAL: invalid argument
Cleaning up file based variables
00:01
ERROR: Job failed: exit code 1
...
gitlab/nginx/gitlab_access.log :
...
x.x.x.x - - [21/Jan/2021:12:57:57 +0100] "POST /api/v4/jobs/27943/artifacts?artifact_format=zip&artifact_type=archive&expire_in=1+hour HTTP/1.1" 500 22 "" "gitlab-runner 13.7.0 (13-7-stable; go1.13.8; linux/amd64)" -
...
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Current User: git Using RVM: no Ruby Version: 2.7.2p137 Gem Version: 3.1.4 Bundler Version:2.1.4 Rake Version: 13.0.1 Redis Version: 5.0.9 Git Version: 2.29.0 Sidekiq Version:5.2.9 Go Version: unknown GitLab information Version: 13.7.4 Revision: 2f14978e280 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 12.4 URL: https://<fqdn> HTTP Clone URL: https://<fqdn>/some-group/some-project.git SSH Clone URL: git@<fqdn>:some-group/some-project.git Using LDAP: yes Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 13.14.0 Repository storage paths: - default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 13.14.0 ? ... OK (13.14.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP users with access to your GitLab server (only showing the first 100 results) User output sanitized. Found 87 users of 100 limit.
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 2/2 ... yes 2/4 ... yes 134/7 ... yes 128/11 ... yes 12/14 ... yes 13/15 ... yes 15/19 ... yes 15/21 ... yes 18/24 ... yes 12/29 ... yes 13/32 ... yes 7/33 ... yes 2/35 ... yes 2/38 ... yes 11/39 ... yes 29/43 ... yes 29/44 ... yes 29/45 ... yes 29/46 ... yes 29/47 ... yes 15/51 ... yes 30/52 ... yes 29/54 ... yes 29/56 ... yes 29/57 ... yes 93/58 ... yes 93/59 ... yes 29/66 ... yes 29/68 ... yes 29/81 ... yes 29/85 ... yes 40/90 ... yes 36/91 ... yes 30/92 ... yes 29/93 ... yes 13/94 ... yes 17/97 ... yes 17/99 ... yes 17/100 ... yes 17/101 ... yes 17/102 ... yes 17/103 ... yes 17/104 ... yes 17/105 ... yes 17/106 ... yes 36/115 ... yes 134/117 ... yes 134/119 ... yes 128/121 ... yes 128/122 ... yes 137/124 ... yes 128/126 ... yes 128/127 ... yes 128/130 ... yes 134/132 ... yes 44/134 ... yes 134/135 ... yes 36/137 ... yes 7/138 ... yes 128/139 ... yes 128/140 ... yes 134/141 ... yes 29/142 ... yes 128/143 ... yes 128/144 ... yes 4/145 ... yes 136/146 ... yes 2/147 ... yes 44/148 ... yes 44/149 ... yes 136/151 ... yes 46/152 ... yes 79/153 ... yes 44/154 ... yes 44/155 ... yes 46/156 ... yes 79/157 ... yes 135/158 ... yes 135/160 ... yes 135/161 ... yes 29/162 ... yes 50/163 ... yes 54/170 ... yes 36/171 ... yes 54/172 ... yes 137/173 ... yes 59/174 ... yes 59/176 ... yes 49/177 ... yes 49/178 ... yes 44/180 ... yes 46/181 ... yes 46/182 ... yes 61/185 ... yes 50/190 ... yes 62/191 ... yes 63/192 ... yes 62/198 ... yes 24/200 ... yes 54/201 ... yes 66/202 ... yes 137/205 ... yes 44/206 ... yes 9/208 ... yes 9/210 ... yes 74/212 ... yes 74/213 ... yes 42/214 ... yes 42/215 ... yes 42/217 ... yes 42/218 ... yes 42/219 ... yes 42/220 ... yes 49/221 ... yes 75/222 ... yes 75/223 ... yes 49/224 ... yes 80/228 ... yes 80/231 ... yes 80/233 ... yes 81/234 ... yes 44/235 ... yes 81/236 ... yes 80/237 ... yes 29/238 ... yes 84/240 ... yes 29/242 ... yes 82/243 ... yes 82/244 ... yes 42/249 ... yes 42/250 ... yes 124/255 ... yes 29/257 ... yes 88/262 ... yes 88/263 ... yes 82/270 ... yes 136/271 ... yes 11/274 ... yes 136/275 ... yes 36/277 ... yes 136/278 ... yes 75/279 ... yes 88/281 ... yes 36/282 ... yes 36/283 ... yes 88/284 ... yes 88/287 ... yes 4/288 ... yes 24/289 ... yes 88/290 ... yes 82/295 ... yes 17/298 ... yes 24/299 ... yes 86/300 ... yes 36/301 ... yes 62/302 ... yes 36/303 ... yes 66/304 ... yes 36/305 ... yes 66/307 ... yes 44/308 ... yes 36/309 ... yes 2/310 ... yes 36/312 ... yes 36/313 ... yes 74/315 ... yes 42/318 ... yes 16/320 ... yes 16/321 ... yes 16/322 ... yes 16/323 ... yes 16/324 ... yes 16/325 ... yes 16/326 ... yes 16/327 ... yes 16/328 ... yes 16/329 ... yes 16/330 ... yes 16/331 ... yes 16/332 ... yes 16/333 ... yes 16/334 ... yes 16/335 ... yes 16/336 ... yes 16/337 ... yes 16/338 ... yes 16/339 ... yes 16/340 ... yes 16/341 ... yes 16/342 ... yes 16/343 ... yes 16/344 ... yes 16/345 ... yes 16/347 ... yes 16/348 ... yes 16/349 ... yes 16/351 ... yes 16/352 ... yes 16/353 ... yes 16/354 ... yes 16/355 ... yes 16/356 ... yes 16/357 ... yes 16/358 ... yes 16/359 ... yes 16/360 ... yes 29/361 ... yes 16/362 ... yes 94/366 ... yes 36/367 ... yes 49/368 ... yes 29/369 ... yes 86/372 ... yes 16/373 ... yes 66/374 ... yes 17/379 ... yes 99/380 ... yes 75/382 ... yes 85/384 ... yes 103/386 ... yes 73/388 ... yes 99/389 ... yes 101/390 ... yes 115/391 ... yes 103/392 ... yes 103/393 ... yes 73/394 ... yes 84/395 ... yes 20/396 ... yes 103/397 ... yes 103/398 ... yes 84/402 ... yes 42/405 ... yes 16/413 ... yes 29/415 ... yes 100/417 ... yes 17/423 ... yes 105/424 ... yes 3/427 ... yes 105/430 ... yes 16/433 ... yes 128/434 ... yes 128/435 ... yes 99/436 ... yes 4/439 ... yes 44/440 ... yes 16/442 ... yes 111/443 ... yes 119/444 ... yes 42/445 ... yes 88/446 ... yes 119/447 ... yes 113/448 ... yes 113/449 ... yes 113/450 ... yes 119/451 ... yes 119/452 ... yes 119/453 ... yes 119/454 ... yes 115/455 ... yes 114/456 ... yes 115/457 ... yes 17/458 ... yes 17/459 ... yes 84/460 ... yes 119/462 ... yes 36/463 ... yes 88/464 ... yes 119/465 ... yes 113/466 ... yes 88/467 ... yes 88/468 ... yes 75/470 ... yes 88/471 ... yes 44/473 ... yes 119/474 ... yes 119/475 ... yes 119/476 ... yes 119/477 ... yes 39/478 ... yes 111/479 ... yes 113/480 ... yes 44/481 ... yes 14/482 ... yes 36/483 ... yes 88/484 ... yes 99/485 ... yes 103/486 ... yes 99/487 ... yes 99/488 ... yes 99/490 ... yes 44/491 ... yes 103/492 ... yes 99/494 ... yes 113/497 ... yes 3/498 ... yes 119/499 ... yes 39/500 ... yes 16/502 ... yes 3/503 ... yes 62/504 ... yes 111/505 ... yes 62/506 ... yes 36/507 ... yes 114/509 ... yes 36/510 ... yes 84/511 ... yes 119/513 ... yes 119/514 ... yes 88/515 ... yes 88/516 ... yes 84/517 ... yes 58/518 ... yes 126/519 ... yes 119/521 ... yes 103/522 ... yes 119/523 ... yes 114/525 ... yes 126/528 ... yes 88/530 ... yes 129/531 ... yes 129/532 ... yes 130/533 ... yes 88/534 ... yes 88/536 ... yes 16/537 ... yes 49/539 ... yes 160/541 ... yes 81/543 ... yes 126/544 ... yes 119/545 ... yes 14/547 ... yes 14/548 ... yes 39/550 ... yes 36/553 ... yes 36/554 ... yes 36/555 ... yes 88/556 ... yes 44/557 ... yes 99/558 ... yes 49/559 ... yes 75/561 ... yes 14/562 ... yes 49/563 ... yes 119/564 ... yes 88/565 ... yes 75/566 ... yes 88/567 ... yes 99/568 ... yes 2/569 ... yes 2/570 ... yes 128/572 ... yes 128/573 ... yes 116/574 ... yes 88/575 ... yes 88/576 ... yes 88/577 ... yes 88/578 ... yes 88/579 ... yes 88/580 ... yes 88/581 ... yes 128/582 ... yes 14/583 ... yes 88/584 ... yes 14/585 ... yes 99/586 ... yes 81/590 ... yes 4/595 ... yes 2/596 ... yes 81/599 ... yes 42/602 ... yes 44/603 ... yes 14/608 ... yes 144/611 ... yes 42/613 ... yes 88/614 ... yes 145/616 ... yes 145/617 ... yes 145/618 ... yes 42/619 ... yes 119/620 ... yes 122/622 ... yes 122/623 ... yes 122/624 ... yes 16/626 ... yes 88/627 ... yes 36/628 ... yes 145/630 ... yes 81/631 ... yes 92/633 ... yes 36/635 ... yes 88/638 ... yes 88/639 ... yes 36/642 ... yes 88/643 ... yes 39/644 ... yes 88/645 ... yes 88/647 ... yes 88/648 ... yes 88/649 ... yes 88/650 ... yes 117/651 ... yes 122/652 ... yes 66/653 ... yes 14/655 ... yes 119/656 ... yes 88/660 ... yes 119/664 ... yes 66/668 ... yes 36/669 ... yes 119/671 ... yes 119/672 ... yes 101/673 ... yes 36/675 ... yes 3/677 ... yes 3/678 ... yes 148/684 ... yes 148/685 ... yes 88/687 ... yes 88/688 ... yes 88/689 ... yes 88/690 ... yes 88/691 ... yes 4/694 ... yes 4/695 ... yes 4/696 ... yes 4/697 ... yes 122/698 ... yes 16/702 ... yes 116/703 ... yes 66/704 ... yes 153/706 ... yes 152/707 ... yes 152/708 ... yes 73/709 ... yes 2/711 ... yes 157/712 ... yes 157/713 ... yes 157/714 ... yes 158/715 ... yes 14/716 ... yes 99/717 ... yes 44/718 ... yes 119/719 ... yes 135/721 ... yes 158/722 ... yes 119/724 ... yes 154/725 ... yes 16/727 ... yes 4/728 ... yes 161/729 ... yes 142/732 ... yes 161/733 ... yes 73/734 ... yes 36/737 ... yes 16/739 ... yes 99/740 ... yes 122/741 ... yes 146/742 ... yes 14/743 ... yes 42/744 ... yes 73/749 ... yes 164/750 ... yes 75/751 ... yes 164/753 ... yes 158/754 ... yes 2/755 ... yes 119/756 ... yes 99/757 ... yes 99/758 ... yes 3/760 ... yes 73/761 ... yes 36/762 ... yes 36/763 ... yes 73/766 ... yes 166/767 ... yes 166/768 ... yes 166/769 ... yes 44/770 ... yes 84/771 ... yes 4/772 ... yes 59/773 ... yes 167/774 ... yes 167/775 ... yes 167/776 ... yes 167/777 ... yes 59/778 ... yes 158/779 ... yes 59/780 ... yes 59/781 ... yes 116/783 ... yes 158/784 ... yes 99/785 ... yes 116/786 ... yes 166/787 ... yes 88/788 ... yes 119/789 ... yes 8/792 ... yes 117/793 ... yes 132/794 ... yes 14/795 ... yes 173/796 ... yes 8/797 ... yes 174/798 ... yes 174/799 ... yes 174/800 ... yes 117/801 ... yes 44/802 ... yes 14/803 ... yes 173/804 ... yes 145/805 ... yes 88/806 ... yes 99/807 ... yes 119/808 ... yes 36/809 ... yes 2/810 ... yes Redis version >= 4.0.0? ... yes Ruby version >= 2.7.2 ? ... yes (2.7.2) Git version >= 2.29.0 ? ... yes (2.29.0) Git user has default SSH configuration? ... yes Active users: ... 87 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished