From 26eb09cbe9c3cc9fc78ad1be7e66e85b5645844b Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 2 Jul 2021 09:07:54 +0000 Subject: [PATCH] Add latest changes from gitlab-org/gitlab@master --- app/assets/stylesheets/framework/diffs.scss | 2 +- app/views/clusters/clusters/_banner.html.haml | 18 +++++----- doc/administration/pages/index.md | 34 +++++++++++++++++-- .../issue_tracker_service_shared_examples.rb | 6 ---- 4 files changed, 42 insertions(+), 18 deletions(-) diff --git a/app/assets/stylesheets/framework/diffs.scss b/app/assets/stylesheets/framework/diffs.scss index 03d8d595d98..f8b1735207c 100644 --- a/app/assets/stylesheets/framework/diffs.scss +++ b/app/assets/stylesheets/framework/diffs.scss @@ -1192,5 +1192,5 @@ table.code { // Note: Prevents tall files from appearing above sticky tabs .diffs .vue-recycle-scroller__item-view > div:not(.active) { position: absolute; - top: 100vh; + bottom: 100vh; } diff --git a/app/views/clusters/clusters/_banner.html.haml b/app/views/clusters/clusters/_banner.html.haml index 6d902132c73..1ca4f9c670e 100644 --- a/app/views/clusters/clusters/_banner.html.haml +++ b/app/views/clusters/clusters/_banner.html.haml @@ -6,17 +6,19 @@ %span.gl-spinner.gl-spinner-dark{ 'aria-label': 'Loading' } %span.gl-ml-2= s_('ClusterIntegration|Kubernetes cluster is being created...') -.hidden.row.js-cluster-api-unreachable.gl-alert.gl-alert-warning{ role: 'alert' } - = sprite_icon('warning', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - %button.js-close.gl-alert-dismiss{ type: 'button', 'aria-label' => _('Dismiss') } - = sprite_icon('close', css_class: 'gl-icon') += render 'shared/global_alert', + variant: :warning, + alert_class: 'hidden js-cluster-api-unreachable', + is_contained: true, + close_button_class: 'js-close' do .gl-alert-body = s_('ClusterIntegration|Your cluster API is unreachable. Please ensure your API URL is correct.') -.hidden.js-cluster-authentication-failure.js-cluster-api-unreachable.gl-alert.gl-alert-warning{ role: 'alert' } - = sprite_icon('warning', css_class: 'gl-icon gl-alert-icon gl-alert-icon-no-title') - %button.js-close.gl-alert-dismiss{ type: 'button', 'aria-label' => _('Dismiss') } - = sprite_icon('close', css_class: 'gl-icon') += render 'shared/global_alert', + variant: :warning, + alert_class: 'hidden js-cluster-authentication-failure js-cluster-api-unreachable', + is_contained: true, + close_button_class: 'js-close' do .gl-alert-body = s_('ClusterIntegration|There was a problem authenticating with your cluster. Please ensure your CA Certificate and Token are valid.') diff --git a/doc/administration/pages/index.md b/doc/administration/pages/index.md index 9e3f41a1ec8..2e35ef8fa9a 100644 --- a/doc/administration/pages/index.md +++ b/doc/administration/pages/index.md @@ -1119,18 +1119,44 @@ open /opt/gitlab/embedded/ssl/certs/cacert.pem: no such file or directory x509: certificate signed by unknown authority ``` -The reason for those errors is that the files `resolv.conf` and `ca-bundle.pem` are missing inside the `chroot`. -The fix is to copy the host's `/etc/resolv.conf` and the GitLab certificate bundle inside the `chroot`: +The reason for those errors is that the files `resolv.conf`, `/etc/hosts/`, `/etc/nsswitch.conf` and `ca-bundle.pem` are missing inside the `chroot`. +The fix is to copy these files inside the `chroot`: ```shell sudo mkdir -p /var/opt/gitlab/gitlab-rails/shared/pages/etc/ssl sudo mkdir -p /var/opt/gitlab/gitlab-rails/shared/pages/opt/gitlab/embedded/ssl/certs/ -sudo cp /etc/resolv.conf /var/opt/gitlab/gitlab-rails/shared/pages/etc +sudo cp /etc/resolv.conf /var/opt/gitlab/gitlab-rails/shared/pages/etc/ +sudo cp /etc/hosts /var/opt/gitlab/gitlab-rails/shared/pages/etc/ +sudo cp /etc/nsswitch.conf /var/opt/gitlab/gitlab-rails/shared/pages/etc/ sudo cp /opt/gitlab/embedded/ssl/certs/cacert.pem /var/opt/gitlab/gitlab-rails/shared/pages/opt/gitlab/embedded/ssl/certs/ sudo cp /opt/gitlab/embedded/ssl/certs/cacert.pem /var/opt/gitlab/gitlab-rails/shared/pages/etc/ssl/ca-bundle.pem ``` +### `unsupported protocol scheme \"\""` + +If you see the following error: + +```plaintext +{"error":"failed to connect to internal Pages API: Get \"/api/v4/internal/pages/status\": unsupported protocol scheme \"\"","level":"warning","msg":"attempted to connect to the API","time":"2021-06-23T20:03:30Z"} +``` + +It means you didn't set the HTTP(S) protocol scheme in the Pages server settings. +To fix it: + +1. Edit `/etc/gitlab/gitlab.rb`: + + ```ruby + gitlab_pages['gitlab_server'] = "https://" + gitlab_pages['internal_gitlab_server'] = "https://" + ``` + +1. Reconfigure GitLab: + + ```shell + sudo gitlab-ctl reconfigure + ``` + ### 502 error when connecting to GitLab Pages proxy when server does not listen over IPv6 In some cases, NGINX might default to using IPv6 to connect to the GitLab Pages @@ -1339,6 +1365,8 @@ GitLab 14.0 introduces a number of changes to GitLab Pages which may require man 1. Firstly [follow the migration guide](#migrate-gitlab-pages-to-140). 1. If it doesn't work, see [GitLab Pages logs](#how-to-see-gitlab-pages-logs), and if you see any errors there then search them on this page. +The most common problem is when using [`inplace_chroot`](#dial-tcp-lookup-gitlabexamplecom-and-x509-certificate-signed-by-unknown-authority). + WARNING: As the last resort you can temporarily enable legacy storage and configuration mechanisms. Support for them [will be removed in GitLab 14.3](https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/6166), so GitLab Pages will stop working if don't resolve the underlying issue. diff --git a/spec/support/shared_examples/models/issue_tracker_service_shared_examples.rb b/spec/support/shared_examples/models/issue_tracker_service_shared_examples.rb index 9d1a55b5f73..6d519e561ee 100644 --- a/spec/support/shared_examples/models/issue_tracker_service_shared_examples.rb +++ b/spec/support/shared_examples/models/issue_tracker_service_shared_examples.rb @@ -8,12 +8,6 @@ RSpec.shared_examples 'issue tracker integration URL attribute' do |url_attr| it { is_expected.not_to allow_value('herp-and-derp').for(url_attr) } end -# TODO: clean up: -# remove when https://gitlab.com/gitlab-org/gitlab/-/issues/330300 has been completed -RSpec.shared_examples 'issue tracker service URL attribute' do |url_attr| - it_behaves_like 'issue tracker integration URL attribute', url_attr -end - RSpec.shared_examples 'allows project key on reference pattern' do |url_attr| it 'allows underscores in the project name' do expect(described_class.reference_pattern.match('EXT_EXT-1234')[0]).to eq 'EXT_EXT-1234'