natemccurdy
05/11/2022, 5:25 PMAnna Nesterova
05/11/2022, 5:26 PM2022-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
josh
05/11/2022, 5:28 PMpuppet resource file /tmp/test ensure=directory max_files=-1
Anna Nesterova
05/11/2022, 5:28 PMroot@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',
}
natemccurdy
05/11/2022, 5:30 PMpuppetserver
wasn’t actually restarted, and still needs to be.natemccurdy
05/11/2022, 5:30 PMpuppetserver
wasn’t actually restarted, and still needs to be.Anna Nesterova
05/11/2022, 5:31 PM/opt/puppetlabs/bin/puppet generate types --environment #{branch} --force
every time when i have updates on a branch/envnatemccurdy
05/11/2022, 5:34 PMpuppet resource
command worked): grep -C4 'max_files' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/file.rb
Anna Nesterova
05/11/2022, 5:34 PMend
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
natemccurdy
05/11/2022, 5:35 PMpuppet config print server --section agent
Anna Nesterova
05/11/2022, 5:35 PMAnna Nesterova
05/11/2022, 5:35 PMAnna Nesterova
05/11/2022, 5:35 PMAnna Nesterova
05/11/2022, 5:36 PMjosh
05/11/2022, 5:36 PMfile
typeAnna Nesterova
05/11/2022, 5:37 PMjosh
05/11/2022, 5:43 PMfile
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
Anna Nesterova
05/11/2022, 5:44 PM/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 stuffAnna Nesterova
05/11/2022, 5:45 PMnatemccurdy
05/11/2022, 5:45 PMAnna Nesterova
05/11/2022, 5:46 PMAnna Nesterova
05/11/2022, 5:47 PMtheforeman/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)
/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 testsDr Bunsen Honeydew
05/11/2022, 5:47 PMtheforeman-dns
module at https://forge.puppet.com/theforeman/dns?src=slack&channel=puppetnatemccurdy
05/11/2022, 5:47 PMvendor/
directory ended up in that module, but I would bet that’s not helping anything.
Module’s shouldn’t have a vendor/
directory.Anna Nesterova
05/11/2022, 5:49 PMAnna Nesterova
05/11/2022, 5:49 PMAnna Nesterova
05/11/2022, 5:49 PMAnna Nesterova
05/11/2022, 5:49 PMnatemccurdy
05/11/2022, 5:55 PMand compile mastersDid 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
Anna Nesterova
05/11/2022, 5:55 PMsrv_domain = lga-puppet.pulse.prod
use_srv_records = true