[CentOS-devel] [opstools] How to support fluentd with ruby24?

Sat Dec 16 04:51:25 UTC 2017
Rich Megginson <rmeggins at redhat.com>

On 12/14/2017 08:40 AM, Rich Megginson wrote:
> On 12/14/2017 07:02 AM, Matthias Runge wrote:
>> On 13/12/17 19:36, Rich Megginson wrote:
>>> We need to use the ruby24 SCL.
>>>
>>> That means ovirt and rdo will have a dependency on ruby24 SCL, which
>>> also means the fluentd systemd service will need to know how to run the
>>> service using the scl, unless ovirt and rdo are ready to run fluentd
>>> containerized, in which case it is as simple as using the centos ruby24
>>> scl base image, which is what openshift is doing:
>>> https://github.com/openshift/origin-aggregated-logging/blob/master/fluentd/Dockerfile.centos7#L1 
>>>
>>>
>>>
>>> ruby24 will be needed at build time for some packages as well as at
>>> runtime.
>>>
>>> https://www.centos.org/minutes/2017/December/centos-devel.2017-12-13-18.04.log.html 
>>>
>>>
>> In the OpenStack world, containers are used from kolla (or very near to
>> that). [1]
>>
>> The container in kolla itself pull in CentOS-base, centos-opstools, and
>> RDO dependencies.
>>
>> I'd think we'll need another package (and probably all dependencies) as
>> scl versions for fluentd.
>
> So a fluentd-ruby24-scl package, a fluent-plugin-add-ruby24-scl 
> package, etc. etc.?  That's going to be a non-starter.

It is the only way.  You cannot run ruby24 and load packages built for 
ruby 2.0 - running fluentd on a system which has rh-ruby24 installed:

+ exec /opt/rh/rh-ruby24/root/usr/bin/ruby /usr/bin/fluentd 
--no-supervisor -vv
/opt/rh/rh-ruby24/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in 
`require': incompatible library version - 
/usr/share/gems/gems/yajl-ruby-1.3.1/lib/yajl/yajl.so (LoadError)
         from 
/opt/rh/rh-ruby24/root/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in 
`require'
         from /usr/share/gems/gems/yajl-ruby-1.3.1/lib/yajl.rb:1:in 
`<top (required)>'

The gems in /usr/share/gems are installed via RPM and built with ruby 2.0.

It might be possible to perform this conversion at runtime:

- install fluentd from regular ruby 2.0 rpms normally
- for each gem in /usr/share/gems
   rebuild using ruby24 into /opt/rh/rh-ruby24/root/usr/share

but this is just piling hacks on top of more hacks

I think we're going to need ruby24 branches for all of our common, 
collectd, and fluentd packages, and we're going to need some sort of 
mass conversion of all of those specs so that we can use them both with 
and without scl.

>
>>
>> Matthias
>>
>> [1]
>> https://github.com/openstack/kolla/blob/master/docker/fluentd/Dockerfile.j2 
>>
>> _______________________________________________
>> CentOS-devel mailing list
>> CentOS-devel at centos.org
>> https://lists.centos.org/mailman/listinfo/centos-devel
>
>