Skip to content

Add output of `systemd-detect-virt`

Kenneth Chu requested to merge kenneth-main-patch-b86f into main

Provides some context as to what virtualization environment GitLab is running in. This is useful to be able to get that information without us needing to ask the customer for that detail. The type of nodes they are (bare metal, virtualized on their own hardware, using a cloud provider) can help answering ambiguities about scaling and performance when customers have overlooked giving us that information in their urgent requests.

For example:

  • Bare metal
$ systemd-detect-virt
none
  • Amazon EC2
$ systemd-detect-virt
amazon
  • Our docker image doesn't use systemd:
# docker run -it gitlab/gitlab-ee /bin/sh
Unable to find image 'gitlab/gitlab-ee:latest' locally
latest: Pulling from gitlab/gitlab-ee
7021d1b70935: Pull complete
9b87e4395634: Pull complete
821c07830dd3: Pull complete
21733a1eda31: Pull complete
2defe998b3b4: Pull complete
ba20789fcd29: Pull complete
2e85479b6460: Pull complete
ceb00cb9fb4d: Pull complete
ad9a2c54ef3b: Pull complete
Digest: sha256:d40d24645c3181a48d394b722880c8bf6981d5f1f40b1fe20d4f1540f2cf08cb
Status: Downloaded newer image for gitlab/gitlab-ee:latest
# systemd-detect-virt
/bin/sh: 1: systemd-detect-virt: not found

So if the command can't be found, it's likely in docker.

Edited by Mike Lockhart | GitLab

Merge request reports