kolla-build 安装 fluent-plugin-rewrite-tag-filter 时出错 serverengine 需要 Ruby 版本 >= 2.1.0

kolla-build 安装 fluent-plugin-rewrite-tag-filter 时出错 serverengine 需要 Ruby 版本 >= 2.1.0

我正在使用 kolla/kolla-ansible 5.0.0,我刚刚构建了所有容器镜像并将它们推送到我的本地 docker 注册表。有一个镜像 kolla 无法构建,即 fluentd 镜像。以下是我在 fluentd.log 中收到的错误:

INFO:kolla.image.build.fluentd:Step 7/8 : RUN ulimit -n 65536     && gem install --minimal-deps activesupport:4.2.9
 public_suffix:2.0.5 fluent-plugin-parser fluent-plugin-kubernetes_metadata_filter fluent-plugin-elasticsearch flue
nt-plugin-grep fluent-plugin-grok-parser:0.3.1 fluent-plugin-rewrite-tag-filter     && chmod -R 440 /etc/sudoers.d/
kolla_fluentd_sudoers      && chmod 755 /usr/local/bin/kolla_extend_start     && mkdir -p /var/run/fluentd     && c
hown -R fluentd: /etc/fluentd /var/run/fluentd
INFO:kolla.image.build.fluentd: ---> Running in 58b04375bfb9
INFO:kolla.image.build.fluentd:unable to convert "\x84" from ASCII-8BIT to UTF-8 for lib/active_support/values/
unicode_tables.dat, skipping
INFO:kolla.image.build.fluentd:
INFO:kolla.image.build.fluentd:Successfully installed concurrent-ruby-1.0.5
INFO:kolla.image.build.fluentd:Successfully installed i18n-0.9.1
INFO:kolla.image.build.fluentd:Successfully installed minitest-5.10.3
INFO:kolla.image.build.fluentd:Successfully installed activesupport-4.2.9
INFO:kolla.image.build.fluentd:Parsing documentation for concurrent-ruby-1.0.5
INFO:kolla.image.build.fluentd:Installing ri documentation for concurrent-ruby-1.0.5
INFO:kolla.image.build.fluentd:Parsing documentation for i18n-0.9.1
INFO:kolla.image.build.fluentd:Installing ri documentation for i18n-0.9.1
INFO:kolla.image.build.fluentd:Parsing documentation for minitest-5.10.3
INFO:kolla.image.build.fluentd:Installing ri documentation for minitest-5.10.3
INFO:kolla.image.build.fluentd:Parsing documentation for activesupport-4.2.9
INFO:kolla.image.build.fluentd:Installing ri documentation for activesupport-4.2.9
INFO:kolla.image.build.fluentd:Successfully installed public_suffix-2.0.5
INFO:kolla.image.build.fluentd:Parsing documentation for public_suffix-2.0.5
INFO:kolla.image.build.fluentd:Installing ri documentation for public_suffix-2.0.5
INFO:kolla.image.build.fluentd:Successfully installed fluent-plugin-parser-0.6.1
INFO:kolla.image.build.fluentd:Parsing documentation for fluent-plugin-parser-0.6.1
INFO:kolla.image.build.fluentd:Installing ri documentation for fluent-plugin-parser-0.6.1
INFO:kolla.image.build.fluentd:Successfully installed lru_redux-1.1.0
INFO:kolla.image.build.fluentd:Building native extensions.  This could take a while...
INFO:kolla.image.build.fluentd:ERROR:  Error installing fluent-plugin-elasticsearch:
INFO:kolla.image.build.fluentd: serverengine requires Ruby version >= 2.1.0.
INFO:kolla.image.build.fluentd:
INFO:kolla.image.build.fluentd:ERROR:  Error installing fluent-plugin-rewrite-tag-filter:
INFO:kolla.image.build.fluentd: serverengine requires Ruby version >= 2.1.0.
INFO:kolla.image.build.fluentd:

您可以在底部看到它抱怨无法安装 fluent-plugin-elasticsearch 和 fluent-plugin-rewrite-tag-filter。它说 serverengine 需要 Ruby 版本 >= 2.1.0。我怎样才能让它拥有 ruby​​ 2.1,这样能解决问题吗?我真的需要这个容器来构建。

答案1

  1. vi /usr/share/kolla/docker/fluentd/DockerFile.j2
  2. 找到它说的地方RUN ulimit -n 65536 ** 并将第二行以 **&& gem install 开头的内容替换内容如下:

    && gem 安装 --minimal-deps activesupport:4.2.9 public_suffix:2.0.5 fluent-plugin-parser fluent-plugin-kubernetes_metadata_filter fluent-plugin-elasticsearch:1.10.2 fluent-plugin-grep fluent-plugin-grok-parser:0.3.1 fluent-plugin-rewrite-tag-filter:1.6.0 fluent-plugin-secure-forward \

相关内容