Skip to content

Disable sshd web_listen if prometheus disabled

Thong Kuah requested to merge sshd_disable_web_listen into main

What does this merge request do and why?

Disable sshd web_listen if prometheus disabled

By default prometheus is disabled, so it is not useful to bind this port by default.

This helps when we have multiple GDKs

How to set up and validate locally

  1. Check out this branch
  2. gdk reconfigure
  3. Run gdk status, the sshd service should restart successfully

Numbered steps to set up and validate the change are strongly suggested.

$ gdk reconfigure

--------------------------------------------------------------------------------
Ensuring GDK managed configuration files are up-to-date
--------------------------------------------------------------------------------
WARNING: Changes to 'gitlab-runner-config.toml' not applied because it's protected in gdk.yml.

'gitlab-shell/config.yml' has incoming changes:
-------------------------------------------------------------------------------------------------------------
@@ -58,7 +58,7 @@ sshd:
   # the PROXY protocol.
   proxy_protocol: false
   # Address which the server listens on HTTP for monitoring/health checks. Defaults to localhost:9122.
-  web_listen: "127.0.0.1:9122"
+  web_listen: ""
   # Maximum number of concurrent sessions allowed on a single SSH connection. Defaults to 10.
   concurrent_sessions_limit: 10
   # SSH host key files.

-------------------------------------------------------------------------------------------------------------
WARNING: 'gitlab-shell/config.yml' has been overwritten. To recover the previous version, run:

cp -f '/Users/tkuah/code/gdk-ee/.backups/gitlab-shell__config.yml.20240506122043' \
'/Users/tkuah/code/gdk-ee/gitlab-shell/config.yml'

If you want to protect this file from being overwritten, see:
https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/configuration.md#overwriting-configuration-files
-------------------------------------------------------------------------------------------------------------

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • Documentation added/updated, if needed.
  • Announcement added, if change is notable.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.
Edited by Thong Kuah

Merge request reports