[pve-devel] [PATCH v3 storage 1/3] status: move unlink from http-server to enpoint

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Aug 31 09:51:39 CEST 2021


On 30.08.21 13:54, Lorenz Stechauner wrote:
> On 26.08.21 18:30, Thomas Lamprecht wrote:
>> On 03/08/2021 14:16, Lorenz Stechauner wrote:
>>> @@ -486,6 +486,7 @@ __PACKAGE__->register_method ({
>>>           print "command: " . join(' ', @$cmd) . "\n";
>>>             eval { run_command($cmd, errmsg => 'import failed'); };
>>> +        unlink $tmpfilename or warn "unable to clean up temporary file '$tmpfilename' - $!";
>> and doesn't this have the same issues as you recently fixed in regards to the node
>> not being the local one and thus ssh/scp being used?
> in this case, the local temp file is deleted and this is intended. previously, this was done by the http server.
> but it would be better to clean up the remote file as well and therefore a ssh command has to be used - could be another commit

Oh, you're right, this is only the intermediate uploaded file which is always local.
A comment could be great for that detail, but I can add that one as follow up.





More information about the pve-devel mailing list