berkshelf / ridley

A reliable Chef API client with a clean syntax
Other
231 stars 85 forks source link

Chef/Berks creating tons of folders in /tmp directory. Regression? #324

Open AnalogJ opened 8 years ago

AnalogJ commented 8 years ago

I'm creating a new issue for visibility: This may be a regression of the issue fixed in https://github.com/reset/ridley/issues/262

Basically the issue is that any time knife/berks commands are run, we're seeing a ton of new folders being created in the /tmp folder (in the same format as the issue referenced above)

drwx------     2 berkshelf berkshelf    4096 Nov  9 09:11 d20151109-11078-1orsbyz
drwx------     2 berkshelf berkshelf    4096 Nov  9 09:11 d20151109-11078-aficvo
drwx------     2 berkshelf berkshelf    4096 Nov  9 09:11 d20151109-11065-65gf8t
drwx------     2 berkshelf berkshelf    4096 Nov  9 09:11 d20151109-11065-tdio7h
drwx------     2 berkshelf berkshelf    4096 Nov  9 09:10 d20151109-11055-18z2bm4
drwx------     2 berkshelf berkshelf    4096 Nov  9 09:10 d20151109-11055-lppkms
drwx------     2 berkshelf berkshelf    4096 Nov  9 09:10 d20151109-11045-1kmoxcf
drwx------     2 berkshelf berkshelf    4096 Nov  9 09:10 d20151109-11045-y70ur1

Here's the debugging info that @jsirex provided in the https://github.com/berkshelf/berkshelf/issues/1069 issue. Note, I wiped out the /tmp folder and then ran our script once and the following files were created. Our script uses the ridley gem, executes berks multiple times and also calls knife.

tmp]# ls | grep d2015 | wc
382     382    8987

Chef version information:

$chef --version
Chef Development Kit Version: 0.9.0
chef-client version: 12.5.1
berks version: 4.0.1
kitchen version: 1.4.2

Ruby & Gem version info

$ ruby --version
ruby 2.1.6p336 (2015-04-13 revision 50298) [x86_64-linux]

$ gem list | grep ridley
ridley (4.3.1, 4.1.1)

I didnt provide the Berksfile/Berksfile.lock/knife.rb nor full Gemlist but I can if needed.

This is a big deal because in CentOS there seems to be a limit of ~32000 subfolders in a single directory.
Our CI environment was completely clobbered as nothing could write to the /tmp folder anymore. We've noticed that we can hit that limit in as little as 2 days.

saavedrah commented 8 years ago

Hello,

Has somebody looked into this?

I'm having a similar issue but I don't even have ridley in my environment

drwx------    2 user          user             4096  3月 18 09:47 2016 d20160318-6902-rplpd8
drwx------    2 user          user             4096  3月 18 09:43 2016 d20160318-5841-wbsuzy
drwx------    2 user          user             4096  3月 18 09:38 2016 d20160318-4352-1ond4fx
...
$ knife --version
Chef: 12.6.0
$ ruby --version
ruby 2.1.6p336 (2015-04-13 revision 50298) [x86_64-linux]
$ gem list | grep ridley
$ gem list | grep chef
chef (12.6.0, 12.4.1)
chef-config (12.6.0, 12.5.1, 12.4.1)
chef-zero (4.4.0, 4.2.3)
cheffish (1.6.0)
thommay commented 7 years ago

@AnalogJ is this still occurring? (sorry it's been a year, we're trying to get back in the game with berkshelf)

AnalogJ commented 7 years ago

not 100% sure, we threw in a cronjob to delete the folders created by berkshelf in our tmp folder. Its also our build server so we haven't upgraded our berkshelf version in a while. I'll take a look and get back to you.

thommay commented 7 years ago

thanks!

AnalogJ commented 7 years ago

Hey @thommay I just verified that it is still occurring.

$ berks --version
4.3.2

$ ls /tmp | grep d2016
...
d20160826-12483-952y02
d20160829-15238-1uwpje9
d20160829-15238-gqncc0
d20160831-18634-1fhr5nb
d20160831-18634-1r9nfas
d20160831-18634-dz3vj3
d20160831-18634-kho8v8
d20160901-13176-1xev10w
d20161019-25792-18vvb9m
AnalogJ commented 6 years ago

Any update on this? We're still seeing this..

chef --version
Chef Development Kit Version: 1.6.1
chef-client version: 12.21.4
delivery version: master (73ebb72a6c42b3d2ff5370c476be800fee7e5427)
berks version: 5.6.4
kitchen version: 1.16.0
inspec version: 1.25.1