Bug 47705 - Не запускается сервис PuppetServer (requires Ruby 3.1.0 or greater)
Summary: Не запускается сервис PuppetServer (requires Ruby 3.1.0 or greater)
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: puppetserver (show other bugs)
Version: unstable
Hardware: x86_64 Linux
: P5 normal
Assignee: majioa@altlinux.org
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-23 12:46 MSK by Evgeny Shesteperov
Modified: 2024-03-15 15:50 MSK (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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