Bug 47705

Summary: Не запускается сервис PuppetServer (requires Ruby 3.1.0 or greater)
Product: Sisyphus Reporter: Evgeny Shesteperov <alimektor>
Component: puppetserverAssignee: majioa <majioa>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P5 CC: 3aHyga, amakeenk, cas
Version: unstable   
Hardware: x86_64   
OS: Linux   
See Also: https://bugzilla.altlinux.org/show_bug.cgi?id=40238
https://bugzilla.altlinux.org/show_bug.cgi?id=38464
https://bugzilla.altlinux.org/show_bug.cgi?id=49169

Description Evgeny Shesteperov 2023-09-23 12:46:15 MSK
Версия

-   gem-puppet-7.24.0.161-alt2
-   puppetserver-6.20.0-alt1
-   java-17-openjdk-17.0.8.0.7-alt2

Шаги воспроизведения

    # apt-get install -y puppet puppetserver java-17-openjdk
    # systemctl enable --now puppet && sleep 5; systemctl status puppet --no-pager -l
    # systemctl start puppetserver && sleep 5; systemctl status puppetserver --no-pager -l

Ожидаемый результат: сервис active (running)

Фактический результат: сервис failed (Result: exit-code)

В логах /var/log/puppetserver/puppetserver.log характерное :

    Caused by: org.jruby.exceptions.LoadError: (LoadError) Puppet 8.0.0 requires Ruby 3.1.0 or greater, found Ruby 2.5.7.

Файл, ломающий это,
/usr/lib/ruby/gemie/gems/puppet-7.24.0.161/lib/puppet.rb:

    Puppet::OLDEST_RECOMMENDED_RUBY_VERSION = '3.1.0'
    if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new(Puppet::OLDEST_RECOMMENDED_RUBY_VERSION)
      raise LoadError, "Puppet #{Puppet.version} requires Ruby #{Puppet::OLDEST_RECOMMENDED_RUBY_VERSION} or greater, found Ruby #{RUBY_VERSION.dup}."
    end

Причина в том, что используется старая версия JRuby:

    # puppetserver ruby --version
    jruby 9.2.13.0 (2.5.7) 2020-08-03 9a89c94bcc OpenJDK 64-Bit Server VM 17.0.8+7 on 17.0.8+7 +jit [linux-x86_64]

Не воспроизводится в P10.
Comment 1 Alexander Makeenkov 2024-02-07 16:17:48 MSK
Актуально для версий:
gem-puppet-8.3.1-alt1
puppetserver-6.20.0-alt1
ruby-3.1.4-alt2.1
Comment 2 Repository Robot 2024-03-15 15:50:18 MSK
puppetserver-8.4.0-alt1 -> sisyphus:

 Fri Mar 15 2024 Pavel Skrylev <majioa@altlinux> 8.4.0-alt1
 - ^ 6.20.0 -> 8.4.0 by cas@ (ALT #38464).
 - Added requires java-17-openjdk by cas@ (ALT #41623).
 - Set current version in executables by cas@ (ALT #47704).
 - Used bundled jruby by cas@ (ALT #47705).
 - * put proper config