sown / tasks

Tasks for sown projects
0 stars 0 forks source link

update_config tmp files filling node's /tmp directory #43

Closed drn05r closed 4 years ago

drn05r commented 4 years ago

node311 was reporting an UPDATE-CONFIG failure on 10th November. This was due to its /tmp being full with files from update_config running each day. Due to it being up for 214 days, /tmp had not recently been cleared. update_config is creating two files each time its runs:

-rw------- 1 root root 8 Aug 2 17:04 /tmp/tmp.ALEdkm.fail -rw-r--r-- 1 root root 189 Aug 2 17:04 /tmp/tmp.ALEdkm.headers.fail

Although this adds up to less that 200 bytes this script has run once an hour for 214 days, which was big enough to fill up all the space. These files should not need to hang around as they contain no real useful information. tmp.XXXXXX.fail contains just "return 0" and tmp.XXXXXX.headers.fail just something like:

HTTP/1.1 200 OK^M Date: Tue, 02 Jul 2019 06:04:00 GMT^M Server: Apache/2.4.18 (Ubuntu)^M Content-Disposition: inline; filename="1"^M Content-Length: 8^M Content-Type: text/x-sh;charset=UTF-8^M ^M

It looks as though these files are created because there is a content type mismatch between the config requested by update_config and what it gets back but as shown above the information is not that illuminating.

TimStallard commented 4 years ago

This was because we were expecting Content-Type: text/x-sh, and got it with ;charset=UTF-8 instead. The cron check was causing this, and not actually in use, so @drn05r disabled it via the admin system on all nodes.