Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Managing too many files #145

Closed
yakatz opened this issue Dec 21, 2021 · 0 comments · Fixed by #146
Closed

Managing too many files #145

yakatz opened this issue Dec 21, 2021 · 0 comments · Fixed by #146

Comments

@yakatz
Copy link
Contributor

yakatz commented Dec 21, 2021

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.25.1
  • Module version: 5.1.1

How to reproduce (e.g Puppet code you use)

On server:

  $alerts = [
    {
      name        => 'bigloss',
      alert_type  => 'loss',
      pattern     => '==0%,==0%,==0%,==0%,>0%,>0%,>0%',
      comment     => 'suddenly there is packet loss',
    },

    {
      name        => 'startloss',
      alert_type  => 'loss',
      pattern     => '==S,>0%,>0%,>0%',
      comment     => 'loss at startup',
    },

    {
      name        => 'noloss',
      alert_type  => 'loss',
      pattern     => '>0%,>0%,>0%,==0%,==0%,==0%,==0%',
      edgetrigger => true,
      comment     => 'there was loss and now its reachable again',
    },
  ]

  class { '::smokeping':
    mode   => 'standalone',
    alerts => $alerts,
  }

  ::Smokeping::Target <<| |>>

On targets:

  $ip      = dns_a($::fqdn)[0]
  $host    = regsubst($::fqdn,'^([-_0-9a-zA-Z]+)\..*$','\1')
  @@::smokeping::target{$host:
    pagetitle => "Connection to ${::fqdn}",
    menu      => $host,
    host      => $::fqdn,
    probe     => 'FPing',
  }

What are you seeing

We are checking 165 hosts with Smokeping. Puppet produces a warning:

Warning: The directory '/var/lib/smokeping/images' contains 2140 entries, which exceeds the default soft limit 1000 and may cause excessive resource consumption and degraded performance. To remove this warning set a value for `max_files` parameter or consider using an alternate method to manage large directory trees

What behaviour did you expect instead

No warning

Output log

[root@netmgr ~]# puppet agent -t
Info: Using environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Info: Caching catalog for netmgr.example.com
Info: Applying configuration version 'puppet6-production-1d4adbb305c'
Warning: The directory '/var/lib/smokeping/images' contains 2140 entries, which exceeds the default soft limit 1000 and may cause excessive resource consumption and degraded performance. To remove this warning set a value for `max_files` parameter or consider using an alternate method to manage large directory trees
Notice: Applied catalog in 73.35 seconds
[root@netmgr ~]#

Any additional information you'd like to impart

I couldn't find any mention of issues like this in the documentation. Even if there is no way to fix this in this module, a recommendation or at least a pointer to other puppet documentation about limits of directory management would be useful.

yakatz added a commit to yakatz/puppet-smokeping that referenced this issue Jan 16, 2022
Possible workaround for voxpupuli#145
yakatz added a commit to yakatz/puppet-smokeping that referenced this issue Jan 17, 2022
Possible workaround for voxpupuli#145
kenyon pushed a commit to yakatz/puppet-smokeping that referenced this issue Sep 3, 2023
kenyon pushed a commit to yakatz/puppet-smokeping that referenced this issue Sep 3, 2023
trice-ardc added a commit to NeCTAR-RC/puppet-smokeping that referenced this issue Mar 21, 2024
This should prevent the warning:

> Warning: The directory '/var/cache/smokeping/images' contains 1027 entries, which exceeds the default soft limit 1000 and may cause excessive resource consumption and degraded performance. To remove this warning set a value for `max_files` parameter or consider using an alternate method to manage large directory trees

Also see https://www.puppet.com/docs/puppet/7/types/file.html#file-attribute-max_files

We may be able to revert this in v7.0.0, which introduces an option
to not manage the image cache:

* voxpupuli#145
* voxpupuli#146
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant