ACK: [ACT][PATCH] UBUNTU: SAUCE: ubuntu_nbd_smoke_test : break up nbd-client, commands

Dimitri John Ledkov dimitri.ledkov at canonical.com
Thu Oct 14 09:52:47 UTC 2021


Acked-by: Dimitri John Ledkov <dimitri.ledkov at canonical.com>

In general, all of nbd is racy. From userspace one cannot tell if nbd
device is fully setup; or fully torn down; and yes sleeps is the best
known way to mitigate contention and reuse of an nbd device.

-- 
Regards,

Dimitri.

On Wed, Oct 13, 2021 at 8:16 PM Sean Feole <sean.feole at canonical.com> wrote:
>
> Please see LP# 1947031 for more context.
>
> It was found that due to 2x nbd-client commands being re-run immediately after one
> another caused a race condition. The sleep command allows smaller instance types to
> ensure the block device is completely free and clear after the first request, thus,
> not interfering with the second.
>
> This has been tested and has resolved issues in Azure Cloud.
>
> Signed-off-by: Sean Feole <sean.feole at canonical.com>
> ---
>  ubuntu_nbd_smoke_test/ubuntu_nbd_smoke_test.sh | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/ubuntu_nbd_smoke_test/ubuntu_nbd_smoke_test.sh b/ubuntu_nbd_smoke_test/ubuntu_nbd_smoke_test.sh
> index 8cd5dd9a..6894ef0d 100755
> --- a/ubuntu_nbd_smoke_test/ubuntu_nbd_smoke_test.sh
> +++ b/ubuntu_nbd_smoke_test/ubuntu_nbd_smoke_test.sh
> @@ -182,7 +182,8 @@ do_test()
>
>      echo "NBD exports found:"
>      nbd-client -l localhost | grep -v Negotiation
> -
> +    # Sleep added due to LP# 1947031
> +    sleep 10
>      do_log "starting client with NBD device ${NBD_DEV}"
>      nbd-client -t ${NBD_TIMEOUT} -b ${NBD_BLOCK_SIZE} -p -N test localhost ${NBD_DEV}
>      if [ $? -ne 0 ]; then
> --
> 2.32.0
>
> --
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team



More information about the kernel-team mailing list