public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Lorenz Stechauner <l.stechauner@proxmox.com>
Subject: Re: [pve-devel] [PATCH storage 1/3] status: move unlink from http-server to endpoint
Date: Tue, 20 Jul 2021 15:31:45 +0200	[thread overview]
Message-ID: <105cc2a7-3860-a782-fc30-828cbbdffbcf@proxmox.com> (raw)
In-Reply-To: <20210720115147.1988565-3-l.stechauner@proxmox.com>

On 20.07.21 13:51, Lorenz Stechauner wrote:

for some odd stuff like here I'd like to see a bit more in the commit message,
when did this come in, since when can it get done in another way (and why wasn't
that way then chosen then already?). Stuff is there for a reason, dropping
something fishy like this without any (commit) comment whatsoever is not too ideal.

Besides that, would need a versioned bump on pve-http-server's package, but as we
do not depend on that directly here, IIRC, we would break old manager and bump
the versioned dependency for http-server in there (manager).

Again, not really doable in a "for sure way" on sending, but should be noted ;-)

> Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
> ---
>  PVE/API2/Storage/Status.pm | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/PVE/API2/Storage/Status.pm b/PVE/API2/Storage/Status.pm
> index 72fd851..b549d7d 100644
> --- a/PVE/API2/Storage/Status.pm
> +++ b/PVE/API2/Storage/Status.pm
> @@ -478,6 +478,7 @@ __PACKAGE__->register_method ({
>  	    print "command: " . join(' ', @$cmd) . "\n";
>  
>  	    eval { PVE::Tools::run_command($cmd, errmsg => 'import failed'); };
> +	    unlink $tmpfilename;
>  	    if (my $err = $@) {
>  		unlink $dest;
>  		die $err;
> @@ -485,14 +486,7 @@ __PACKAGE__->register_method ({
>  	    print "finished file import successfully\n";
>  	};
>  
> -	my $upid = $rpcenv->fork_worker('imgcopy', undef, $user, $worker);
> -
> -	# apache removes the temporary file on return, so we need
> -	# to wait here to make sure the worker process starts and
> -	# opens the file before it gets removed.
> -	sleep(1);
> -
> -	return $upid;
> +	return $rpcenv->fork_worker('imgcopy', undef, $user, $worker);
>     }});
>  
>  __PACKAGE__->register_method({
> 





  reply	other threads:[~2021-07-20 13:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-20 11:51 [pve-devel] [PATCH-SERIES http-server/storage/manager] add checksum and algorithm to iso upload Lorenz Stechauner
2021-07-20 11:51 ` [pve-devel] [PATCH http-server] anyevent: move unlink from http-server to endpoint Lorenz Stechauner
2021-07-20 13:23   ` Thomas Lamprecht
2021-07-20 11:51 ` [pve-devel] [PATCH storage 1/3] status: " Lorenz Stechauner
2021-07-20 13:31   ` Thomas Lamprecht [this message]
2021-07-20 11:51 ` [pve-devel] [PATCH storage 2/3] status: add new-filename to upload Lorenz Stechauner
2021-07-20 13:27   ` Thomas Lamprecht
2021-07-20 19:15     ` Thomas Lamprecht
2021-07-20 11:51 ` [pve-devel] [PATCH storage 3/3] status: add checksum and algorithm to file upload Lorenz Stechauner
2021-07-20 13:40   ` Thomas Lamprecht
2021-07-20 11:51 ` [pve-devel] [PATCH manager 2/5] ui: move upload window into UploadToStorage.js Lorenz Stechauner
2021-07-20 11:51 ` [pve-devel] [PATCH manager 3/5] ui: refactor UploadToStorage.js Lorenz Stechauner
2021-07-20 11:51 ` [pve-devel] [PATCH manager 4/5] ui/UploadToStorage.js: add checksum and algorithm Lorenz Stechauner
2021-07-20 11:51 ` [pve-devel] [PATCH manager 5/5] ui/UploadToStorage.js: add TaskViewer Lorenz Stechauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=105cc2a7-3860-a782-fc30-828cbbdffbcf@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=l.stechauner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal