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

[BUG] Increase the number of inotify when changes are applied repeatedly #66449

Open
QuinoRay opened this issue Apr 27, 2024 · 1 comment
Open
Labels
Bug broken, incorrect, or confusing behavior

Comments

@QuinoRay
Copy link

Description
Setup an inotify beacon and refresh beacons. Every time beacons are refreshed inotify file handles are leaked.

Setup
dnf install salt-minion
Example beacons file

beacons:
  inotify:
    - disable_during_state_run: True
    - coalesce: True
    - files:
        /etc/nginx/nginx.conf:
          mask:
            - delete
            - modify

Steps to Reproduce the behavior
On the master server salt run:
salt <name_server> state.apply

On the slave server using lsof -
lsof | grep -E 'salt.*inotify'

Expected behavior
There must be a constant number of open

/opt/salt 1817561    root   46r  a_inode    0,14    0    13770 inotify
/opt/salt 1817561 1817562 python3.1    root   46r  a_inode    0,14    0    13770 inotify\n
/opt/salt 1817561 1817659 /opt/salt    root    46r  a_inode    0,14    0    13770 inotify\n
/opt/salt 1817561 1817660 /opt/salt    root    46r  a_inode    0,14    0    13770 inotify\n
/opt/salt 1817561 1817665 /opt/salt    root    46r  a_inode    0,14    0    13770 inotify\n

But there's more every time

/opt/salt 1817561    root   46r  a_inode    0,14    0    13770 inotify
/opt/salt 1817561    root   48r  a_inode    0,14    0    13770 inotify
/opt/salt 1817561    root   49r  a_inode    0,14    0    13770 inotify
/opt/salt 1817561    root   50r  a_inode    0,14    0    13770 inotify
/opt/salt 1817561 1817562 python3.1    root   46r  a_inode    0,14    0    13770 inotify
/opt/salt 1817561 1817562 python3.1    root   48r  a_inode    0,14    0    13770 inotify
/opt/salt 1817561 1817562 python3.1    root   49r  a_inode    0,14    0    13770 inotify
/opt/salt 1817561 1817659 /opt/salt    root   46r  a_inode    0,14    0    13770 inotify
/opt/salt 1817561 1817659 /opt/salt    root   48r  a_inode    0,14    0    13770 inotify
/opt/salt 1817561 1817659 /opt/salt    root   49r  a_inode    0,14    0    13770 inotify
/opt/salt 1817561 1817660 /opt/salt    root   46r  a_inode    0,14    0    13770 inotify
/opt/salt 1817561 1817660 /opt/salt    root   48r  a_inode    0,14    0    13770 inotify
/opt/salt 1817561 1817660 /opt/salt    root   49r  a_inode    0,14    0    13770 inotify
/opt/salt 1817561 1817665 /opt/salt    root   46r  a_inode    0,14    0    13770 inotify
/opt/salt 1817561 1817665 /opt/salt    root   48r  a_inode    0,14    0    13770 inotify
/opt/salt 1817561 1817665 /opt/salt    root   49r  a_inode    0,14    0    13770 inotify
/opt/salt 1817561 1817666 /opt/salt    root   46r  a_inode    0,14    0    13770 inotify
/opt/salt 1817561 1817666 /opt/salt    root   48r  a_inode    0,14    0    13770 inotify
/opt/salt 1817561 1817666 /opt/salt    root   49r  a_inode    0,14    0    13770 inotify

Versions Report

Salt Version:
          Salt: 3006.7

Python Version:
        Python: 3.10.13 (main, Feb 19 2024, 03:31:20) [GCC 11.2.0]

Dependency Versions:
          cffi: 1.14.6
      cherrypy: 18.6.1
      dateutil: 2.8.1
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.3
       libgit2: Not Installed
  looseversion: 1.0.2
      M2Crypto: Not Installed
          Mako: Not Installed
       msgpack: 1.0.2
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 22.0
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.19.1
        pygit2: Not Installed
  python-gnupg: 0.4.8
        PyYAML: 6.0.1
         PyZMQ: 23.2.0
        relenv: 0.15.1
         smmap: Not Installed
       timelib: 0.2.4
       Tornado: 4.5.3
           ZMQ: 4.3.4

System Versions:
          dist: rocky 8.9 Green Obsidian
        locale: utf-8
       machine: x86_64
       release: 4.18.0-372.9.1.el8.x86_64
        system: Linux
       version: Rocky Linux 8.9 Green Obsidian
@QuinoRay QuinoRay added Bug broken, incorrect, or confusing behavior needs-triage labels Apr 27, 2024
Copy link

welcome bot commented Apr 27, 2024

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at saltproject@vmware.com. We’re glad you’ve joined our community and look forward to doing awesome things with you!

@dwoz dwoz removed the needs-triage label May 1, 2024
@dwoz dwoz added this to the Sulfur v3006.9 milestone May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior
Projects
None yet
Development

No branches or pull requests

2 participants