Multiple clusters: incorrect cluster details injected - environment scope is ignored
Summary
Incorrect cluster details are injected - as if environment scope was totally ignored.
cc @markpundsack @ayufan @grzesiek @bikebilly
Steps to reproduce
- Multiple clusters set up separated by environment scopes:
- Multiple jobs with different environment names:
deploy-review:
environment:
name: old-$CI_COMMIT_REF_NAME
# ...
deploy-pdx1:
environment:
name: pdx1/$CI_COMMIT_REF_NAME
# ...
Expected
- Credentials for cluster
cluster-review
are injected inside jobdeploy-review
.-
env | grep KUBE_URL
saysKUBE_URL=https://rafalski-dev-test-k8s-master-nf-1:6443
-
- Credentials for cluster
cluster-pdx1
are injected insidedeploy-pdx1
job.-
env | grep KUBE_URL
saysKUBE_URL=https://reviewapps-pdx1-k8s-master-nf-1:6443
-
Actual
- FAIL: Credentials for cluster
cluster-pdx1
are injected insidedeploy-review
job.-
env | grep KUBE_URL
saysKUBE_URL=https://reviewapps-pdx1-k8s-master-nf-1:6443
-
- PASS: Credentials for cluster
cluster-pdx1
are injected insidedeploy-pdx1
job.-
env | grep KUBE_URL
saysKUBE_URL=https://reviewapps-pdx1-k8s-master-nf-1:6443
-
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
root@pdx1-gitlab01:~# sudo gitlab-rake gitlab:env:infoSystem information System: Ubuntu 14.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.3.6p384 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.3.0 Redis Version: 3.2.11 Git Version: 2.14.3 Sidekiq Version:5.0.5 Go Version: unknown
GitLab information Version: 10.5.5-ee Revision: 8435f3a Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.5 URL: https://git.dreamhost.com HTTP Clone URL: https://git.dreamhost.com/some-group/some-project.git SSH Clone URL: git@git.dreamhost.com:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: google_oauth2
GitLab Shell Version: 6.0.3 Repository storage paths:
- default: /var/opt/gitlab/git-data/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
root@pdx1-gitlab01:~# sudo gitlab-rake gitlab:check SANITIZE=true Checking GitLab Shell ...GitLab Shell version >= 6.0.3 ? ... OK (6.0.3) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 9/8 ... ok 9/9 ... ok 9/10 ... ok 3/12 ... ok 9/13 ... ok 23/14 ... ok 3/15 ... ok 2/16 ... ok 23/17 ... ok 43/22 ... repository is empty 35/24 ... ok 35/25 ... ok 35/26 ... ok 35/27 ... ok 35/28 ... ok 22/29 ... ok 43/30 ... ok 34/31 ... ok 22/32 ... ok 41/34 ... ok 45/35 ... ok 42/36 ... ok 22/38 ... ok 43/40 ... ok 22/41 ... ok 22/42 ... ok 48/43 ... ok 43/44 ... repository is empty 43/45 ... ok 43/46 ... ok 50/47 ... ok 9/48 ... ok 50/49 ... ok 52/50 ... ok 40/51 ... ok 43/52 ... ok 48/53 ... ok 43/54 ... ok 44/55 ... ok 38/57 ... ok 43/59 ... ok 43/60 ... ok 40/61 ... ok 43/62 ... repository is empty 43/63 ... repository is empty 45/64 ... ok 43/65 ... ok 43/66 ... ok 12/67 ... ok 43/68 ... ok 58/69 ... ok 58/70 ... ok 10/71 ... ok 43/72 ... ok 12/73 ... ok 9/74 ... ok 43/75 ... repository is empty 43/76 ... ok 43/77 ... ok 58/78 ... ok 9/79 ... ok 38/81 ... ok 43/82 ... ok 10/83 ... ok 43/84 ... ok 34/85 ... ok 43/86 ... ok 40/88 ... ok 43/89 ... ok 43/90 ... ok 9/91 ... ok 43/92 ... ok 43/93 ... ok 52/94 ... ok 43/95 ... repository is empty 43/96 ... ok 43/97 ... ok 30/98 ... ok 60/102 ... ok 10/103 ... ok 43/104 ... ok 103/105 ... ok 43/106 ... ok 106/107 ... ok 48/108 ... ok 107/109 ... ok 22/110 ... ok 22/111 ... ok 48/112 ... ok 9/113 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: 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 ...
IMAP server credentials are correct? ... yes Init.d configured correctly? ... skipped MailRoom running? ... skipped
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? ... 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: ... 9/8 ... yes 9/9 ... yes 9/10 ... yes 3/12 ... yes 9/13 ... yes 23/14 ... yes 3/15 ... yes 2/16 ... yes 23/17 ... yes 43/22 ... yes 35/24 ... yes 35/25 ... yes 35/26 ... yes 35/27 ... yes 35/28 ... yes 22/29 ... yes 43/30 ... yes 34/31 ... yes 22/32 ... yes 41/34 ... yes 45/35 ... yes 42/36 ... yes 22/38 ... yes 43/40 ... yes 22/41 ... yes 22/42 ... yes 48/43 ... yes 43/44 ... yes 43/45 ... yes 43/46 ... yes 50/47 ... yes 9/48 ... yes 50/49 ... yes 52/50 ... yes 40/51 ... yes 43/52 ... yes 48/53 ... yes 43/54 ... yes 44/55 ... yes 38/57 ... yes 43/59 ... yes 43/60 ... yes 40/61 ... yes 43/62 ... yes 43/63 ... yes 45/64 ... yes 43/65 ... yes 43/66 ... yes 12/67 ... yes 43/68 ... yes 58/69 ... yes 58/70 ... yes 10/71 ... yes 43/72 ... yes 12/73 ... yes 9/74 ... yes 43/75 ... yes 43/76 ... yes 43/77 ... yes 58/78 ... yes 9/79 ... yes 38/81 ... yes 43/82 ... yes 10/83 ... yes 43/84 ... yes 34/85 ... yes 43/86 ... yes 40/88 ... yes 43/89 ... yes 43/90 ... yes 9/91 ... yes 43/92 ... yes 43/93 ... yes 52/94 ... yes 43/95 ... yes 43/96 ... yes 43/97 ... yes 30/98 ... yes 60/102 ... yes 10/103 ... yes 43/104 ... yes 103/105 ... yes 43/106 ... yes 106/107 ... yes 48/108 ... yes 107/109 ... yes 22/110 ... yes 22/111 ... yes 48/112 ... yes 9/113 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.3.6) Git version >= 2.9.5 ? ... yes (2.14.3) Git user has default SSH configuration? ... no Try fixing it: mkdir ~/gitlab-check-backup-1521488871 sudo mv /var/opt/gitlab/.ssh/id_rsa ~/gitlab-check-backup-1521488871 For more information see: doc/ssh/README.md in section "SSH on the GitLab server" Please fix the error above and rerun the checks. Active users: ... 83 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)
Checking GitLab ... Finished