Closed g-bougard closed 2 years ago
A crontask to clean temporary file already exists
Hi @trasher imho, just enabling the "cleantmp" automatic action is not the solution. We should still be able to at least handle the cases with the file content I proposed. I think the error handling is just missing to cleanup those temporary json or xml file when native inventory decides to not handle them.
Code of Conduct
Is there an existing issue for this?
Version
10-beta
Bug description
I found 2 cases where a file is kept in
files/_inventories
but it shouldn't be.Relevant log output
No response
Page URL
No response
Steps To reproduce
For the first case, here is sample you can try to inject in server with
glpi-injector
even if no related asset is known:This file was generated by a still fixed bug in GLPI-Agent 1.0. But the problem is a temporary file with that content will remain in
files/_inventories
.For the second case,
netdiscovery
andnetinventory
tasks generates job state messages for the plugin like the following:This looks like an inventory and so is converted generating a temporary file in
files/_inventories
. As this is not an inventory file, it is finally not removed from that folder. To reproduce the case, you need GlpiInventory plugin and run anetdiscovery
ornetinventory
task. This can be done with FusionInventory agent.Your GLPI setup information
No response
Anything else?
No response