https://www.puppet.com/community logo
Join Slack
Powered by
# puppet
  • n

    natemccurdy

    05/11/2022, 5:25 PM
    Is there anything else in the error message?
  • a

    Anna Nesterova

    05/11/2022, 5:26 PM
    Copy code
    2022-05-11T13:17:53.239-04:00 ERROR [qtp1467288596-43151] [puppetserver] Puppet no parameter named 'max_files' (file: /etc/puppet/environments/TO_14888/modules/foreman_proxy/manifests/tftp.pp, line: 18) on File[/var/lib/tftpboot/pxelinux.cfg] (file: /etc/puppet/environments/TO_14888/modules/foreman_proxy/manifests/tftp.pp, line: 18) on node
  • j

    josh

    05/11/2022, 5:28 PM
    Might want to try running this command on the puppetserver host itself:
    Copy code
    puppet resource file /tmp/test ensure=directory max_files=-1
  • a

    Anna Nesterova

    05/11/2022, 5:28 PM
    Copy code
    root@lga-puppetmaster01 anesterova # puppet resource file /tmp/test ensure=directory max_files=-1
    2022-05-11 13:28:27.289949 WARN  puppetlabs.facter - locale environment variables were bad; continuing with LANG=C LC_ALL=C
    Notice: /File[/tmp/test]/ensure: created
    file { '/tmp/test':
      ensure   => 'directory',
      provider => 'posix',
    }
  • n

    natemccurdy

    05/11/2022, 5:30 PM
    Looks to me like
    puppetserver
    wasn’t actually restarted, and still needs to be.
  • n

    natemccurdy

    05/11/2022, 5:30 PM
    Looks to me like
    puppetserver
    wasn’t actually restarted, and still needs to be.
  • a

    Anna Nesterova

    05/11/2022, 5:31 PM
    1 - i did restart it 2 - i do run
    /opt/puppetlabs/bin/puppet generate types --environment #{branch} --force
    every time when i have updates on a branch/env
  • n

    natemccurdy

    05/11/2022, 5:34 PM
    See anything from this (I think you should as the
    puppet resource
    command worked):
    grep -C4 'max_files' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file.rb
  • a

    Anna Nesterova

    05/11/2022, 5:34 PM
    Copy code
    end
        end
      end
    
      newparam(:max_files) do
        desc "In case the resource is a directory and the recursion is enabled, puppet will
          generate a new resource for each file file found, possible leading to
          an excessive number of resources generated without any control.
    
          Setting `max_files` will check the number of file resources that
          will eventually be created and will raise a resource argument error if the
          limit will be exceeded.
    
          Use value `0` to log a warning instead of raising an error.
    --
        # The right-side hash wins in the merge.
        options = @original_parameters.merge(:path => full_path).reject { |param, value| value.nil? }
    
        # These should never be passed to our children.
        [:parent, :ensure, :recurse, :recurselimit, :max_files, :target, :alias, :source].each do |param|
          options.delete(param) if options.include?(param)
        end
    
        self.class.new(options)
    --
          path,
          :links => self[:links],
          :recurse => (self[:recurse] == :remote ? true : self[:recurse]),
          :recurselimit => self[:recurselimit],
          :max_files => self[:max_files],
          :source_permissions => self[:source_permissions],
          :ignore => self[:ignore],
          :checksum_type => (self[:source] || self[:content]) ? self[:checksum] : :none,
          :environment => catalog.environment_instance
  • n

    natemccurdy

    05/11/2022, 5:35 PM
    And your Puppetserver is using itself for Puppet runs?
    puppet config print server --section agent
  • a

    Anna Nesterova

    05/11/2022, 5:35 PM
    yes
  • a

    Anna Nesterova

    05/11/2022, 5:35 PM
    and compile masters
  • a

    Anna Nesterova

    05/11/2022, 5:35 PM
    there is an srv record
  • a

    Anna Nesterova

    05/11/2022, 5:36 PM
    all servers have the same version
  • j

    josh

    05/11/2022, 5:36 PM
    I've seen issues like this (awhile ago) when a module interferes with the builtin
    file
    type
  • a

    Anna Nesterova

    05/11/2022, 5:37 PM
    how did you solve it? 🙂
  • j

    josh

    05/11/2022, 5:43 PM
    Maybe see if any module is registering the
    file
    type like
    grep -r 'Puppet::Type.newtype(:file)' /etc/puppet/environments
    or accessing the already registered type like
    grep -r 'Puppet::Type.type(:file)' /etc/puppet/environments
  • a

    Anna Nesterova

    05/11/2022, 5:44 PM
    Copy code
    /etc/puppet/environments//TO_14888/modules/dnsquery/vendor/bundle/ruby/2.1.0/gems/puppet-4.9.4/lib/puppet/type/file.rb:Puppet::Type.newtype(:file) do
    but that’s another stuff
  • a

    Anna Nesterova

    05/11/2022, 5:45 PM
    oh second one has huge output sec
  • n

    natemccurdy

    05/11/2022, 5:45 PM
    ….uhh…that shouldn’t be inside a module.
  • a

    Anna Nesterova

    05/11/2022, 5:46 PM
    then no
  • a

    Anna Nesterova

    05/11/2022, 5:47 PM
    actually this module has the following deps:
    Copy code
    theforeman/dns (>= 8.1.0 < 10.0.0)
    theforeman/dhcp (>= 6.1.0 < 9.0.0)
    theforeman/foreman (>= 10.0.0 < 21.0.0)
    theforeman/tftp (>= 3.0.0 < 8.0.0)
    puppetlabs/stdlib (>= 4.19.0 < 9.0.0)
    puppet/extlib (>= 3.0.0 < 7.0.0)
    richardc/datacat (>= 0.6.0 < 1.0.0)
    puppet/mosquitto (>= 1.1.0 < 2.0.0)
    Copy code
    /etc/puppet/environments/TO_14888/modules/stdlib/spec/unit/puppet/type/file_line_spec.rb:    file = Puppet::Type.type(:file).new(:name => tmp_path)
    /etc/puppet/environments/TO_14888/modules/datacat/spec/unit/type/datacat_collector_spec.rb:      @file = Puppet::Type.type(:file).new(:path => '/test')
    but these are tests
  • d

    Dr Bunsen Honeydew

    05/11/2022, 5:47 PM
    See the
    theforeman-dns
    module at https://forge.puppet.com/theforeman/dns?src=slack&amp;channel=puppet
  • n

    natemccurdy

    05/11/2022, 5:47 PM
    I don’t know how that
    vendor/
    directory ended up in that module, but I would bet that’s not helping anything. Module’s shouldn’t have a
    vendor/
    directory.
  • a

    Anna Nesterova

    05/11/2022, 5:49 PM
    also weird thing. I have this error in 1 DC only
  • a

    Anna Nesterova

    05/11/2022, 5:49 PM
    other DCs work fine
  • a

    Anna Nesterova

    05/11/2022, 5:49 PM
    same versions/settings/etcs. The only diff is compile masters
  • a

    Anna Nesterova

    05/11/2022, 5:49 PM
    but that shouldnt be the case i think
  • n

    natemccurdy

    05/11/2022, 5:55 PM
    Earlier you said:
    and compile masters
    Did you mean that
    lga-puppetmaster01
    is using SRV records to find a Puppetserver to run against? Do you still see the error if you do a Puppet run like
    sudo puppet agent -t --server $(hostname -f) --environment TO_14888
  • a

    Anna Nesterova

    05/11/2022, 5:55 PM
    i mean:
    Copy code
    srv_domain = lga-puppet.pulse.prod
        use_srv_records = true
1...333435...428Latest