Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[metalos] Include {os_version} in PRETTY_NAME
Summary: # This diff Add the version to `os-release` PRETTY_NAME explicitly, this used to be included implicitly when {os_name} was set to "CentOS Stream X" but was removed in D47242191 to confirm with CentOS's standard value. This value is used in ANR to set the value in serf, this diff results in serf OS strings of the form `CentOS Stream 9 MclassicA` Per this transform used by the os.py driver. https://www.internalfb.com/code/fbsource/fbcode/machinechecker/anrsnapshot/drivers/os.py?lines=50-54 # Broader thoughts The approach of executing a big shell command with conditional `cat` from various files is a bit wild. The additional naive parsing os the os-release format double so. This driver probably needs a better rethink. Test Plan: ## os-release File ``` devvm20063.prn0:~/fbsource/fbcode$ buck run metalos/os/facebook/classic/vmtest:switchroot-cached-c9 -- --shell=console [root@vmtest ~]# cat /etc/os-release NAME="CentOS Stream" ID="centos" VERSION="9" PRETTY_NAME="CentOS Stream 9 MclassicA (0a658f98fcba6a779b2a123d1cfb83ad7da39966)" IMAGE_ID="local" IMAGE_LAYER="fbcode//metalos/os/facebook/classic:classic.c9" IMAGE_VCS_REV="0a658f98fcba6a779b2a123d1cfb83ad7da39966" IMAGE_VCS_REV_TIME="2023-07-17T14:07:19-0700" VARIANT="MclassicA" VARIANT_ID="mclassica" ANSI_COLOR="0;34" API_VER_KDUMP_SUBVOL="1" API_VER_NETWORKD_ROUTES_IGNORE="1" API_VER_SERVICE_IMAGE_GC="1" API_VER_SERVICE_IMAGE_HELPER="1" API_VER_SYSTEMD_KEXEC_LOAD="1" API_VER_TMP_SUBVOL="2" API_VER_TW_SUBVOL="1" API_VER_USE_SYSTEMD_EXCEPTION="1" ``` Reviewed By: cooperlees Differential Revision: D47529019 fbshipit-source-id: 33a4bf7a1fc4e3905757b4a44944dee5bb0d98ae
- Loading branch information