From f5aec8add478650cd011707528c5e32a5bc43959 Mon Sep 17 00:00:00 2001
From: Victor Morales <chipahuac@hotmail.com>
Date: Thu, 18 Apr 2019 15:41:58 -0700
Subject: [PATCH] Fix runc absolute path (#4542)

The BINDIR variable defined on the runc's Makefile[1] defines
installation path is on $(PREFIX)/sbin which used for most of the
Linux distributions. This change fixes the absolute path used for
non-ClearLinux distributions (CentOS, Ubuntu).

[1] https://github.com/opencontainers/runc/blob/master/Makefile#L10
---
 roles/container-engine/cri-o/templates/crio.conf.j2 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/roles/container-engine/cri-o/templates/crio.conf.j2 b/roles/container-engine/cri-o/templates/crio.conf.j2
index b7de5e66d..33abfe828 100644
--- a/roles/container-engine/cri-o/templates/crio.conf.j2
+++ b/roles/container-engine/cri-o/templates/crio.conf.j2
@@ -64,7 +64,11 @@ file_locking = true
 # This is a mandatory setting as this runtime will be the default one
 # and will also be used for untrusted container workloads if
 # runtime_untrusted_workload is not set.
+{% if ansible_os_family == "ClearLinux" %}
 runtime = "/usr/bin/runc"
+{% else %}
+runtime = "/usr/sbin/runc"
+{% endif %}
 
 # runtime_untrusted_workload is the OCI compatible runtime used for untrusted
 # container workloads. This is an optional setting, except if
-- 
GitLab