From e2e0a0c6f40ef002f8fbb937157dbd94bb0b7b03 Mon Sep 17 00:00:00 2001 From: Andrew Erickson Date: Fri, 22 May 2026 14:05:01 -0700 Subject: [PATCH] linux talos: install linux-tools + allow cltbld sudo perf (bug 2031822) Adds a linux_perf_profiling profile to the 1804 and 2404 talos roles that installs linux-tools-generic and grants cltbld NOPASSWD sudo on /usr/bin/perf, to support Speedometer3 bimodality profiling. --- modules/linux_packages/manifests/linux_tools.pp | 11 +++++++++++ .../manifests/profiles/linux_perf_profiling.pp | 17 +++++++++++++++++ .../manifests/roles/gecko_t_linux_2404_talos.pp | 3 +++ .../manifests/roles/gecko_t_linux_talos.pp | 3 +++ 4 files changed, 34 insertions(+) create mode 100644 modules/linux_packages/manifests/linux_tools.pp create mode 100644 modules/roles_profiles/manifests/profiles/linux_perf_profiling.pp diff --git a/modules/linux_packages/manifests/linux_tools.pp b/modules/linux_packages/manifests/linux_tools.pp new file mode 100644 index 0000000000..38e63f6605 --- /dev/null +++ b/modules/linux_packages/manifests/linux_tools.pp @@ -0,0 +1,11 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +class linux_packages::linux_tools { + + package { 'linux-tools-generic': + ensure => present, + } + +} diff --git a/modules/roles_profiles/manifests/profiles/linux_perf_profiling.pp b/modules/roles_profiles/manifests/profiles/linux_perf_profiling.pp new file mode 100644 index 0000000000..7d075e312e --- /dev/null +++ b/modules/roles_profiles/manifests/profiles/linux_perf_profiling.pp @@ -0,0 +1,17 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +# Installs the linux-tools package (provides `perf`) and grants cltbld +# sudo access to run it. Used by Linux talos roles to support performance +# profiling investigations (bug 2031822). +class roles_profiles::profiles::linux_perf_profiling { + + require linux_packages::linux_tools + + sudo::custom { 'allow_cltbld_perf': + user => 'cltbld', + command => '/usr/bin/perf', + } + +} diff --git a/modules/roles_profiles/manifests/roles/gecko_t_linux_2404_talos.pp b/modules/roles_profiles/manifests/roles/gecko_t_linux_2404_talos.pp index 4e07682d59..4bc3a9bba8 100644 --- a/modules/roles_profiles/manifests/roles/gecko_t_linux_2404_talos.pp +++ b/modules/roles_profiles/manifests/roles/gecko_t_linux_2404_talos.pp @@ -18,4 +18,7 @@ # talos stuff include roles_profiles::profiles::gecko_t_linux_2404_talos_generic_worker + + # perf profiling support (bug 2031822) + include roles_profiles::profiles::linux_perf_profiling } diff --git a/modules/roles_profiles/manifests/roles/gecko_t_linux_talos.pp b/modules/roles_profiles/manifests/roles/gecko_t_linux_talos.pp index 4c31ffc776..8779dffb98 100644 --- a/modules/roles_profiles/manifests/roles/gecko_t_linux_talos.pp +++ b/modules/roles_profiles/manifests/roles/gecko_t_linux_talos.pp @@ -19,4 +19,7 @@ # talos stuff include ::roles_profiles::profiles::gecko_t_linux_talos_generic_worker + + # perf profiling support (bug 2031822) + include ::roles_profiles::profiles::linux_perf_profiling }