From 5e7afb779c469f593a1628e8f63c66989b7e2c49 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Mon, 24 Oct 2022 12:17:48 +0200 Subject: [PATCH] Run dmesg command with sudo It seems that setting "sysctl kernel.dmesg_restrict" was changed in Ubuntu 22.04 (Jammy) to "1" and because of that running "dmesg" command requires now root privileges. Closes-bug: #1994023 Change-Id: I2adc76e3025fadf994bab2e2e1fd608e688874fc --- lib/neutron_plugins/ovs_source | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/neutron_plugins/ovs_source b/lib/neutron_plugins/ovs_source index 164d574c42..ea71e60e68 100644 --- a/lib/neutron_plugins/ovs_source +++ b/lib/neutron_plugins/ovs_source @@ -33,9 +33,9 @@ function load_module { local fatal=$2 if [ "$(trueorfalse True fatal)" == "True" ]; then - sudo modprobe $module || (dmesg && die $LINENO "FAILED TO LOAD $module") + sudo modprobe $module || (sudo dmesg && die $LINENO "FAILED TO LOAD $module") else - sudo modprobe $module || (echo "FAILED TO LOAD $module" && dmesg) + sudo modprobe $module || (echo "FAILED TO LOAD $module" && sudo dmesg) fi } @@ -103,7 +103,7 @@ function prepare_for_ovs_compilation { function load_ovs_kernel_modules { load_module openvswitch load_module vport-geneve False - dmesg | tail + sudo dmesg | tail } # reload_ovs_kernel_modules() - reload openvswitch kernel module