Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Saltstcak has a pit. Keep_jobs has to clean it regularly.

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

When saltstack is running, countless cache of job will be generated under the salt, which must be deleted regularly, or the time of the keep_jobs must be written out. If you don't write, it will be as tragic as I am. It will fill up the inode of the entire server, causing the server to fail to work properly.

Grep "keep_jobs" / etc/salt/master#keep_jobs: 24

Turn this on, otherwise over time, if you delete job regularly, the inode of your hard drive will be full and will not work.

Take a look at my case.

The reason why the handle is not released: the first thread opens the file. Another thread deletes the file. There will be problems. Kill the whole process to release all handles.

The inode node in my root directory is full. I have no choice but to see it for myself. Rebooting is useless.

[root@master] # df-iFilesystem Inodes IUsed IFree IUse% Mounted on/dev/sda3 1240320 1240320 / tmpfs 126536 2 126534 / dev/shm/dev/sda1 25688 38 25650 1 / boot.host:/ 000-/ mnt/hgfs handle is the number of files, and the number of handles that can generate a large number of handles is in the var directory So I wrote a for loop to start looking for .for I in `ls / var` Do find $I /-type f | wc-l & & echo $I Done1accountfind: "cache/salt/master/jobs/7c/3238b58e45f242132dade0d989314a/.minions.p": no file or directory find: "cache/salt/master/jobs/7c/3238b58e45f242132dade0d989314a/.load.p": no file or directory find: "cache/salt/master/jobs/7c/3238b58e45f242132dade0d989314a/jid": no file or directory find: "cache/salt/master/jobs/7c/f98bd5f094921b93d5435ea81b0414/.minions.p": no that File or directory find: "cache/salt/master/jobs/7c/f98bd5f094921b93d5435ea81b0414/.load.p": no file or directory find: "cache/salt/master/jobs/7c/f98bd5f094921b93d5435ea81b0414/jid": no file or directory find: "cache/salt/master/jobs/7c/afa7d7cf12cedd5e2f121536749ded/.minions.p": no file or directory find: "cache/salt/master/jobs/7c/afa7d7cf12cedd5e2f121536749ded/.load.p": No file or directory find: "cache/salt/master/jobs/7c/afa7d7cf12cedd5e2f121536749ded/jid": no file or directory find: "cache/salt/master/jobs/7c/2f0ced419e95aff3fd0940303ed101/master/return.p": no file or directory find: "cache/salt/master/jobs/7c/2f0ced419e95aff3fd0940303ed101/master/out.p": no file or directory find: "cache/salt/master/jobs/7c/2f0ced419e95aff3fd0940303ed101" / .minions.p ": no file or directory find:" cache/salt/master/jobs/7c/2f0ced419e95aff3fd0940303ed101/.load.p ": no file or directory find:" cache/salt/master/jobs/7c/2f0ced419e95aff3fd0940303ed101/jid ": no file or directory find:" cache/salt/master/jobs/7c/c8ad7fa07b55ceaf9dd4f1fa068ee4/.minions.p ": no file or directory find:" cache/salt/master/ " Jobs/7c/c8ad7fa07b55ceaf9dd4f1fa068ee4/.load.p ": there is no file or directory find:" cache/salt/master/jobs/7c/c8ad7fa07b55ceaf9dd4f1fa068ee4/jid ": there is no file or directory

The deletion can be completed when you find it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report