[pve-devel] applied: [PATCH v3 storage] fix insecure migration failing if waiting on lock

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Apr 17 12:32:44 CEST 2024


Am 17/04/2024 um 11:48 schrieb Mira Limbeck:
> both STDOUT and STDERR are written into `$info` which is then parsed for
> IP and port of the target socket listening.
> when the ports file can't be locked immediately `trying to acquire
> lock...` is printed on STDERR and in turn written into `$info`.
> trying to parse the IP then fails, resulting in a migration or
> replication failing.
> 
> the bare open3 call is replaced by the run_command wrapper from
> pve-common to use a safe wrapper around open3 with the same
> functionality.
> STDERR is read separatey from STDOUT and the last line of STDERR is
> kept in case of errors.
> 
> Fixes: 57acd6a ("fix #1452: also log stderr of remote command with
> insecure storage migration")
> 
> Signed-off-by: Mira Limbeck <m.limbeck at proxmox.com>
> ---
> v3:
>  - added log prefix for remote error logs
>  - fixed style issues
> 
> v2:
>  - incorporated Fiona's suggestions
>    - added `Fixes: ...` to commit message
>    - kept old ip/port matching including # untaint comments
>    - added logging for all messages in STDERR
>    - simplified branches
> 
>  src/PVE/Storage.pm | 91 ++++++++++++++++++++++++++++------------------
>  1 file changed, 55 insertions(+), 36 deletions(-)
> 
>

applied, thanks!




More information about the pve-devel mailing list