<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>54857</bug_id>
          
          <creation_ts>2025-06-19 15:14:20 +0300</creation_ts>
          <short_desc>Ошибка работы puppet - Error 500 on SERVER: Server Error: undefined method `exists?&apos; for nil:NilClass</short_desc>
          <delta_ts>2025-11-06 17:16:43 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>gem-puppet</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="gfh1gfh1">gfh1gfh1</reporter>
          <assigned_to name="majioa@altlinux.org">majioa</assigned_to>
          <cc>3aHyga</cc>
    
    <cc>admsasha</cc>
    
    <cc>amakeenk</cc>
    
    <cc>cas</cc>
    
    <cc>ibondarev123</cc>
    
    <cc>majioa</cc>
    
    <cc>mike</cc>
    
    <cc>nbr</cc>
    
    <cc>pav</cc>
    
    <cc>rider</cc>
    
    <cc>thatman</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>267479</commentid>
    <comment_count>0</comment_count>
    <who name="gfh1gfh1">gfh1gfh1</who>
    <bug_when>2025-06-19 15:14:20 +0300</bug_when>
    <thetext>ALT Server 11.0

Установлены и настроены пакеты:
puppet-8.4.0-alt2.noarch
puppetserver-8.4.0-alt2.noarch

При запуске агента на клиенте выдает ошибку сервера (даже при отсутствии любых манифестов)
# puppet agent -t
Info: Using environment &apos;production&apos;
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Notice: Requesting catalog from rpa2:8140 (10.168.72.28)
Notice: Catalog compiled by rpa2
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: undefined method `exists?&apos; for nil:NilClass
Did you mean?  exit
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

В логе puppetserver выдает следующее:
2025-06-19T14:41:36.721+03:00 ERROR [qtp1658927374-52] [puppetserver] Puppet Server Error: undefined method `exists?&apos; for nil:NilClass
Did you mean?  exit
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/type/user.rb:514:in `exists?&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/file_system/file_impl.rb:165:in `replace_file&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/file_system/jruby.rb:23:in `replace_file&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/file_system.rb:419:in `replace_file&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/indirector/json.rb:19:in `save&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/indirector/indirection.rb:326:in `save&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/node/facts.rb:22:in `save&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/indirector/catalog/compiler.rb:45:in `save_facts_from_request&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/indirector/catalog/compiler.rb:54:in `find&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/indirector/indirection.rb:230:in `find&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/network/http/api/indirected_routes.rb:121:in `do_find&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/network/http/api/indirected_routes.rb:54:in `block in call&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/context.rb:64:in `override&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet.rb:287:in `override&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/network/http/api/indirected_routes.rb:53:in `call&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/network/http/api/server/v3.rb:18:in `block in wrap&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/network/http/route.rb:85:in `block in process&apos;
org/jruby/RubyArray.java:1989:in `each&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/network/http/route.rb:84:in `process&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/network/http/route.rb:91:in `process&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/network/http/route.rb:91:in `process&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/network/http/handler.rb:88:in `block in process&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/network/http/handler.rb:71:in `block in with_request_profiling&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/util/profiler/around_profiler.rb:59:in `profile&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/util/profiler.rb:53:in `profile&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/network/http/handler.rb:67:in `with_request_profiling&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/network/http/handler.rb:87:in `block in process&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/network/http/handler.rb:94:in `respond_to_errors&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/network/http/handler.rb:86:in `process&apos;
uri:classloader:/puppetserver-lib/puppet/server/master.rb:69:in `block in handleRequest&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/context.rb:64:in `override&apos;
/usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet.rb:287:in `override&apos;
uri:classloader:/puppetserver-lib/puppet/server/master.rb:68:in `handleRequest&apos;

т.е. по идее ошибка в файле /usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/type/user.rb в районе строки 514
строки 505-515:
    # This method has been exposed for puppet to manage users and groups of
    # files in its settings and should not be considered available outside of
    # puppet.
    #
    # (see Puppet::Settings#service_user_available?)
    #
    # @return [Boolean] if the user exists on the system
    # @api private
    def exists?
      provider.exists? ###!!! строка 514 !!!###
    end

# rpm -qf /usr/lib/ruby/gemie/gems/puppet-8.4.0/lib/puppet/type/user.rb
gem-puppet-8.4.0-alt2.noarch

Посмотрел этот файл на github - вроде всё правильно.

Потом сравнил с рабочей версией puppet сервера развернутого на основе ALT Server 10.4
# rpm -qf /usr/lib/ruby/gemie/gems/puppet-7.20.0/lib/puppet/type/user.rb
gem-puppet-7.20.0-alt2.p10.0.noarch

Там этот метод описан чуток по другому:

    def exists?
      provider&amp;.exists?
    end

После provider добавлен &amp;

Привел к тому же виду файл на ALT Server 11.0 и после перезапуска puppetserver агент получает и выполняет манифесты без ошибок

# puppet agent -t
Info: Using environment &apos;production&apos;
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Notice: Requesting catalog from rpa2:8140 (10.168.72.28)
Notice: Catalog compiled by rpa2
Info: Caching catalog for rpa2
Info: Applying configuration version &apos;1750334956&apos;
Notice: /Stage[main]/Main/Node[default]/File[/tmp/1.txt]/ensure: defined content as &apos;{sha256}932f3c1b56257ce8539ac269d7aab42550dacf8818d075f0bdf1990562aae3ef&apos; (corrective)
Notice: Applied catalog in 0.03 seconds

PS. Посмотрел на Debain 12 - там так же указано provider.exists? и puppet сервер и агенты работают. Не специалист по ruby, но кажется тут всплыли какие-то особенности ALT сборки.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>272189</commentid>
    <comment_count>1</comment_count>
    <who name="Alexander Makeenkov">amakeenk</who>
    <bug_when>2025-09-09 16:36:33 +0300</bug_when>
    <thetext>Актуально для версий:

puppet-8.4.0-alt2
puppetserver-8.4.0-alt4</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>