Skip to content

Commit

Permalink
Use SIGTERM for dnf command (#3837)
Browse files Browse the repository at this point in the history
Fix a regression of bugzilla 1935846, to also apply to dnf.

Signed-off-by: Gerhard Muntingh <gerhard@qux.nl>
  • Loading branch information
gerhardqux authored Jul 6, 2023
1 parent fc90752 commit 462cdc9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions insights/client/insights_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ def get_output(self):

# use TERM for rpm/yum commands, KILL for everything else
if (self.command.startswith('/bin/rpm') or
self.command.startswith('dnf') or
self.command.startswith('/bin/dnf') or
self.command.startswith('/usr/bin/dnf') or
self.command.startswith('yum') or
self.command.startswith('/usr/bin/yum')):
signal = 'TERM'
Expand Down
2 changes: 1 addition & 1 deletion insights/specs/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class DefaultSpecs(Specs):
dmsetup_status = simple_command("/usr/sbin/dmsetup status")
dnf_conf = simple_file("/etc/dnf/dnf.conf")
dnf_modules = glob_file("/etc/dnf/modules.d/*.module")
dnf_module_list = simple_command("/usr/bin/dnf -C --noplugins module list")
dnf_module_list = simple_command("/usr/bin/dnf -C --noplugins module list", signum=signal.SIGTERM)
docker_info = simple_command("/usr/bin/docker info")
docker_list_containers = simple_command("/usr/bin/docker ps --all --no-trunc")
docker_list_images = simple_command("/usr/bin/docker images --all --no-trunc --digests")
Expand Down

0 comments on commit 462cdc9

Please sign in to comment.