Fix ovs check pkg_has_restart error.

One of the call to run_locale_safe misses the module parameter which
will cause trouble in non_layered_ovs_upgrade.

This wasn't detected by CI as we don't use that code path in general,
but eventually one job triggered it.

Change-Id: I93f039b717c67d57b70083a6c859eaf02ea68bc1
Closes-Bug: #1998770
(cherry picked from commit e539b03d04)
This commit is contained in:
Sofer Athlan-Guyot 2022-12-05 12:04:38 +01:00
parent d1056fe829
commit 129edccee5
1 changed files with 2 additions and 1 deletions

View File

@ -215,7 +215,8 @@ def pkg_has_restart(module):
cmd = """rpm -q --scripts openvswitch | \\
awk '/postuninstall/,/*/' | \\
grep -q 'systemctl.*try-restart'"""
rc, _, _ = run_locale_safe(cmd, check_rc=False,
rc, _, _ = run_locale_safe(module,
cmd, check_rc=False,
use_unsafe_shell=True)
return rc == 0