From 29d12aebd679a3079fec6e46c6d0d1654796bee8 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Thu, 19 Sep 2019 13:50:41 +0200 Subject: [PATCH] sensu-client: install older whois gem Whois 5.0.0 requires Ruby 2.4 while CentOS has only 2.0 version. Change-Id: I6ec9d58bf54db1ac69b879785f38fb492bc2dfc2 (cherry picked from commit 41408527ae88ac42de11ca2818ff405320795a8b) (cherry picked from commit 091d9a96ef0462017a1ea20cdf5c2b43271e226a) --- docker/sensu/sensu-client/Dockerfile.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/sensu/sensu-client/Dockerfile.j2 b/docker/sensu/sensu-client/Dockerfile.j2 index 718f05b0cb..54c6c6bf56 100644 --- a/docker/sensu/sensu-client/Dockerfile.j2 +++ b/docker/sensu/sensu-client/Dockerfile.j2 @@ -77,7 +77,8 @@ RUN echo '{{ image_name }} not yet available for {{ base_distro }}' \ # TODO(mandre) Use packaged sensu plugins from centos-opstools for binary distro # http://cbs.centos.org/koji/search?match=glob&type=package&terms=*sensu* -RUN sensu-install --plugins {{ sensu_plugins | customizable('plugins') | join (',') }} +# NOTE(hrw): whois 5.0.0 requires Ruby 2.4+ while CentOS has 2.0 +RUN {%if base_distro in ['centos', 'rhel', 'oraclelinux'] %} gem install whois:"<5" && {% endif %} sensu-install --plugins {{ sensu_plugins | customizable('plugins') | join (',') }} {% endblock %} {% block sensu_client_footer %}{% endblock %}