[19.5] Stop marking the smartcard NGINX server as default_server
What does this MR do and why?
Backport of !10022 (merged) to 19-5-stable, as asked after the merge in !10022 (comment 4255524422).
The smart card NGINX server is rendered from the Rails server's template, so since !8805 (merged) made the Rails server the default_server, the smart card server claims it too, and NGINX does not start when the two share a port:
- with
nginx['redirect_http_to_https'] = true, port 80; - with
smartcard_client_certificate_required_hostset andsmartcard_client_certificate_required_portat 443, port 443.
The port 80 case is the error reported in #9518 (closed). The fix sets default_server_enabled: false for the smart card server only. The Rails server keeps default_server.
git cherry-pick -x applied cleanly, with the same patch as the merged commit. The commit keeps its Changelog: fixed trailer for the patch release changelog. The issue carries no severity label, so I have not picked one; the maintainer can set it, or tell me which and I will add it.
Specs, in ruby:3.3.12 with this branch's bundle:
$ bundle exec rspec spec/chef/cookbooks/nginx/recipes/nginx_spec.rb spec/chef/cookbooks/gitlab/recipes/nginx_disable_spec.rb spec/chef/cookbooks/gitlab/recipes/gitlab-rails/gitlab_yml/smartcard_spec.rb
117 examples, 0 failures
$ bundle exec rspec spec/chef/cookbooks/nginx/recipes/nginx_spec.rb -e smartcard # with the nginx.rb of 19-5-stable
9 examples, 4 failures
$ bundle exec rubocop files/gitlab-cookbooks/gitlab/recipes/nginx.rb spec/chef/cookbooks/nginx/recipes/nginx_spec.rb
2 files inspected, no offenses detectedWithout the fix, the four failures are the two new smart card examples and the two listen *:3444 expectations the fix changes back.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
- This MR is backporting a bug fix, documentation update, or spec fix, previously merged in the default branch.
- The original MR has been deployed to GitLab.com (not applicable for documentation or spec changes).
- This MR has a severity label assigned (if applicable).
Note to the merge request author and maintainer
If you have questions about the patch release process, please:
- Refer to the patch release runbook for engineers and maintainers for guidance.
- Ask questions on the
#releasesSlack channel (internal only).