Unable to use AWS London (eu-west-2) as a region for registry storage
Summary
I am unable to use an S3 bucket in eu-west-2 (London) as a container registry storage.
Steps to reproduce
Add the following config to the gitlab.rb
config file.
registry['storage'] = {
's3' => {
'accesskey' => 'xxxxx',
'secretkey' => 'xxxxx',
'bucket' => 'xxxxx',
'region' => 'eu-west-2'
}
}
Making sure that the bucket is created in London. Then run gitlab-ctl reconfigure
.
What is the current bug behavior?
Once reconfigured, GitLab continues to run normally except when attempting to view a container registry for a project. It returns a standard 500 error.
Tailing /var/log/gitlab/registry/current
in the omnibus installation shows the following error:
2017-09-21_15:14:56.00891 goroutine 1 [running]:
2017-09-21_15:14:56.00898 github.com/docker/distribution/registry/handlers.NewApp(0x11e22a0, 0xc4203f1ad0, 0xc4203e7880, 0x11e22a0)
2017-09-21_15:14:56.00908 /var/cache/omnibus/src/registry/src/github.com/docker/distribution/registry/handlers/app.go:123 +0x4cb
2017-09-21_15:14:56.00915 github.com/docker/distribution/registry.NewRegistry(0x7f1a094a40e8, 0xc4203f1ad0, 0xc4203e7880, 0xc4203e7880, 0x0, 0x0)
2017-09-21_15:14:56.00925 /var/cache/omnibus/src/registry/src/github.com/docker/distribution/registry/registry.go:86 +0x205
2017-09-21_15:14:56.00931 github.com/docker/distribution/registry.glob..func1(0x121b960, 0xc4204084b0, 0x1, 0x1)
2017-09-21_15:14:56.00938 /var/cache/omnibus/src/registry/src/github.com/docker/distribution/registry/registry.go:55 +0x194
2017-09-21_15:14:56.00942 github.com/docker/distribution/vendor/github.com/spf13/cobra.(*Command).execute(0x121b960, 0xc420408460, 0x1, 0x1, 0x121b960, 0xc420408460)
2017-09-21_15:14:56.00952 /var/cache/omnibus/src/registry/src/github.com/docker/distribution/vendor/github.com/spf13/cobra/command.go:495 +0x180
2017-09-21_15:14:56.00957 github.com/docker/distribution/vendor/github.com/spf13/cobra.(*Command).Execute(0x121bb00, 0xc4200001a0, 0xc4200001a0)
2017-09-21_15:14:56.00965 /var/cache/omnibus/src/registry/src/github.com/docker/distribution/vendor/github.com/spf13/cobra/command.go:560 +0x361
2017-09-21_15:14:56.00970 main.main()
2017-09-21_15:14:56.00972 /var/cache/omnibus/src/registry/src/github.com/docker/distribution/cmd/registry/main.go:24 +0x2d
2017-09-21_15:14:57.06229 panic: **Invalid region provided: eu-west-2**
(Emphasis added for readability)
Switching to a bucket in N. Virginia (us-east-1) does not manifest the same issue and the feature works as expected.
What is the expected correct behavior?
This error should not occur, and the registry page should load as normal.
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 14.04 Current User: git Using RVM: no Ruby Version: 2.3.5p376 Gem Version: 2.6.6 Bundler Version:1.13.7 Rake Version: 12.0.0 Redis Version: 3.2.5 Git Version: 2.13.5 Sidekiq Version:5.0.4 Go Version: xgcc (Ubuntu 4.9.3-0ubuntu4) 4.9.3 linux/amd64
GitLab information Version: 9.5.5 Revision: 3cf5eba Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://git.substrakt.com HTTP Clone URL: https://git.substrakt.com/some-group/some-project.git SSH Clone URL: git@git.substrakt.com:some-group/some-project.git Using LDAP: no Using Omniauth: no
GitLab Shell Version: 5.8.0 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories
- block1: /mnt/gitlab-block1/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...
GitLab Shell version >= 5.8.0 ? ... OK (5.8.0) Repo base directory exists? default... yes block1... yes Repo storage directories are symlinks? default... no block1... no Repo paths owned by git:root, or git:git? default... yes block1... yes Repo paths access is drwxrws---? default... yes block1... yes hooks directories in repos are links: ... 7/2 ... ok 2/5 ... ok 7/6 ... ok 9/7 ... ok 7/8 ... ok 7/9 ... ok 7/10 ... ok 9/12 ... ok 12/14 ... ok 7/15 ... ok 7/16 ... ok 9/30 ... ok 9/31 ... ok 9/32 ... ok 7/34 ... ok 15/35 ... ok 15/36 ... ok 15/37 ... ok 15/38 ... ok 15/39 ... ok 15/40 ... ok 15/41 ... ok 15/42 ... ok 7/43 ... ok 7/44 ... ok 9/45 ... ok 16/46 ... ok 7/47 ... repository is empty 7/48 ... ok 7/49 ... ok 15/51 ... repository is empty 7/52 ... ok 16/53 ... ok 7/54 ... ok 16/55 ... ok 7/56 ... ok 7/57 ... ok 7/58 ... ok 7/59 ... ok 7/60 ... ok 7/61 ... ok 7/62 ... ok 7/63 ... repository is empty 7/64 ... ok 7/65 ... ok 7/66 ... ok 7/67 ... ok 7/68 ... ok 7/69 ... ok 7/70 ... ok 7/71 ... ok 7/72 ... ok 7/73 ... ok 7/74 ... ok 7/75 ... ok 7/76 ... ok 7/77 ... ok 7/78 ... ok 7/79 ... ok 7/80 ... ok 7/81 ... ok 7/82 ... ok 7/83 ... ok 7/84 ... ok 7/85 ... ok 15/86 ... ok 7/87 ... ok 7/88 ... ok 7/89 ... ok 7/90 ... ok 7/91 ... ok 7/92 ... ok 7/93 ... ok 15/94 ... ok 15/95 ... ok 7/96 ... ok 7/97 ... ok 15/98 ... ok 7/99 ... ok 7/100 ... ok 7/101 ... ok 7/102 ... ok 15/103 ... ok 7/104 ... ok 7/105 ... ok 7/106 ... ok 16/108 ... ok 9/109 ... ok 7/110 ... ok 7/111 ... repository is empty 15/112 ... ok 15/113 ... ok 9/114 ... ok 7/116 ... ok 15/117 ... ok 7/118 ... ok 15/119 ... ok 7/120 ... ok 7/121 ... ok 9/122 ... ok 7/123 ... ok 7/124 ... ok 7/126 ... ok 7/128 ... ok 15/129 ... ok 9/130 ... repository is empty 9/131 ... ok 15/132 ... ok 9/133 ... ok 9/134 ... ok 7/135 ... ok 9/136 ... ok 9/137 ... ok 9/138 ... ok 12/139 ... ok 7/140 ... ok 9/142 ... ok 7/146 ... ok 7/147 ... ok 16/148 ... ok 32/149 ... ok 9/150 ... ok 9/151 ... ok 7/152 ... ok 16/153 ... ok 9/154 ... ok 23/155 ... ok 2/157 ... ok 7/160 ... ok 15/162 ... ok 7/163 ... ok 7/164 ... ok 7/165 ... ok 15/166 ... ok 9/167 ... ok 15/168 ... ok 23/169 ... ok 15/170 ... ok 9/171 ... repository is empty 7/172 ... ok 7/173 ... ok 2/174 ... ok 7/175 ... ok 9/176 ... ok 7/177 ... ok 2/179 ... ok 16/180 ... repository is empty 7/181 ... ok 16/182 ... ok 9/183 ... ok 9/184 ... ok 7/185 ... ok 2/186 ... ok 23/191 ... ok 16/192 ... ok 16/193 ... ok 7/196 ... ok 9/197 ... ok 9/198 ... ok 15/199 ... ok 15/200 ... ok 7/201 ... ok 7/202 ... ok 7/203 ... ok 7/204 ... ok 15/205 ... ok 9/206 ... ok 7/207 ... ok 15/208 ... ok 7/209 ... ok 9/210 ... ok 9/211 ... ok 7/212 ... ok 9/213 ... ok 9/214 ... ok 7/215 ... ok 32/216 ... ok 32/217 ... ok 7/218 ... ok 7/219 ... ok 7/220 ... ok 9/223 ... ok 9/224 ... ok 9/225 ... ok 23/227 ... ok 16/228 ... ok 35/229 ... ok 37/230 ... ok 23/231 ... ok 9/232 ... ok 41/233 ... ok 15/234 ... ok 9/235 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Access to /var/opt/gitlab/.ssh/authorized_keys: OK Send ping to redis server: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
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? ... no Try fixing it: sudo chown -R git /var/opt/gitlab/gitlab-rails/uploads sudo find /var/opt/gitlab/gitlab-rails/uploads -type f -exec chmod 0644 {} ; sudo find /var/opt/gitlab/gitlab-rails/uploads -type d -not -path /var/opt/gitlab/gitlab-rails/uploads -exec chmod 0700 {} ; For more information see: doc/install/installation.md in section "GitLab" Please fix the error above and rerun the checks. 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: ... 7/2 ... yes 2/5 ... yes 7/6 ... yes 9/7 ... yes 7/8 ... yes 7/9 ... yes 7/10 ... yes 9/12 ... yes 12/14 ... yes 7/15 ... yes 7/16 ... yes 9/30 ... yes 9/31 ... yes 9/32 ... yes 7/34 ... yes 15/35 ... yes 15/36 ... yes 15/37 ... yes 15/38 ... yes 15/39 ... yes 15/40 ... yes 15/41 ... yes 15/42 ... yes 7/43 ... yes 7/44 ... yes 9/45 ... yes 16/46 ... yes 7/47 ... yes 7/48 ... yes 7/49 ... yes 15/51 ... yes 7/52 ... yes 16/53 ... yes 7/54 ... yes 16/55 ... yes 7/56 ... yes 7/57 ... yes 7/58 ... yes 7/59 ... yes 7/60 ... yes 7/61 ... yes 7/62 ... yes 7/63 ... yes 7/64 ... yes 7/65 ... yes 7/66 ... yes 7/67 ... yes 7/68 ... yes 7/69 ... yes 7/70 ... yes 7/71 ... yes 7/72 ... yes 7/73 ... yes 7/74 ... yes 7/75 ... yes 7/76 ... yes 7/77 ... yes 7/78 ... yes 7/79 ... yes 7/80 ... yes 7/81 ... yes 7/82 ... yes 7/83 ... yes 7/84 ... yes 7/85 ... yes 15/86 ... yes 7/87 ... yes 7/88 ... yes 7/89 ... yes 7/90 ... yes 7/91 ... yes 7/92 ... yes 7/93 ... yes 15/94 ... yes 15/95 ... yes 7/96 ... yes 7/97 ... yes 15/98 ... yes 7/99 ... yes 7/100 ... yes 7/101 ... yes 7/102 ... yes 15/103 ... yes 7/104 ... yes 7/105 ... yes 7/106 ... yes 16/108 ... yes 9/109 ... yes 7/110 ... yes 7/111 ... yes 15/112 ... yes 15/113 ... yes 9/114 ... yes 7/116 ... yes 15/117 ... yes 7/118 ... yes 15/119 ... yes 7/120 ... yes 7/121 ... yes 9/122 ... yes 7/123 ... yes 7/124 ... yes 7/126 ... yes 7/128 ... yes 15/129 ... yes 9/130 ... yes 9/131 ... yes 15/132 ... yes 9/133 ... yes 9/134 ... yes 7/135 ... yes 9/136 ... yes 9/137 ... yes 9/138 ... yes 12/139 ... yes 7/140 ... yes 9/142 ... yes 7/146 ... yes 7/147 ... yes 16/148 ... yes 32/149 ... yes 9/150 ... yes 9/151 ... yes 7/152 ... yes 16/153 ... yes 9/154 ... yes 23/155 ... yes 2/157 ... yes 7/160 ... yes 15/162 ... yes 7/163 ... yes 7/164 ... yes 7/165 ... yes 15/166 ... yes 9/167 ... yes 15/168 ... yes 23/169 ... yes 15/170 ... yes 9/171 ... yes 7/172 ... yes 7/173 ... yes 2/174 ... yes 7/175 ... yes 9/176 ... yes 7/177 ... yes 2/179 ... yes 16/180 ... yes 7/181 ... yes 16/182 ... yes 9/183 ... yes 9/184 ... yes 7/185 ... yes 2/186 ... yes 23/191 ... yes 16/192 ... yes 16/193 ... yes 7/196 ... yes 9/197 ... yes 9/198 ... yes 15/199 ... yes 15/200 ... yes 7/201 ... yes 7/202 ... yes 7/203 ... yes 7/204 ... yes 15/205 ... yes 9/206 ... yes 7/207 ... yes 15/208 ... yes 7/209 ... yes 9/210 ... yes 9/211 ... yes 7/212 ... yes 9/213 ... yes 9/214 ... yes 7/215 ... yes 32/216 ... yes 32/217 ... yes 7/218 ... yes 7/219 ... yes 7/220 ... yes 9/223 ... yes 9/224 ... yes 9/225 ... yes 23/227 ... yes 16/228 ... yes 35/229 ... yes 37/230 ... yes 23/231 ... yes 9/232 ... yes 41/233 ... yes 15/234 ... yes 9/235 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.3 ? ... yes (2.3.5) Git version >= 2.7.3 ? ... yes (2.13.5) Active users: ... 24
Checking GitLab ... Finished