* [PATCH] [arm-autonomy] xenguest-manager: Wait longer for /dev/xvdaX creation
@ 2020-04-30 13:29 Diego Sueiro
2020-04-30 14:25 ` [meta-arm] " Bertrand Marquis
0 siblings, 1 reply; 3+ messages in thread
From: Diego Sueiro @ 2020-04-30 13:29 UTC (permalink / raw)
To: meta-arm; +Cc: nd
Implement a wait block of 20s with exit condition for checking
/dev/xvdaX creation.
For example, in cases where the rootfs is mounted via NFS, a longer
time is needed until the xvda device appears in the system.
Change-Id: I44cbcf2a43aeb476eae92d5b6d2cfd683e4bdf21
Issue-Id: SCM-929
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
---
.../recipes-extended/xenguest/files/xenguest-manager | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-manager b/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-manager
index b25eeb5..4777054 100755
--- a/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-manager
+++ b/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-manager
@@ -234,10 +234,17 @@ function xenguest_disk_init()
exit 1
fi
- # Sometimes it takes time to see the device
- if [ ! -b /dev/xvda${part} ]; then
- sleep 1
- fi
+
+ # Loop for 20s to wait until /dev/xvdaX appears
+ i=0
+ while [ ! -b /dev/xvda${part} ]; do
+ ((i++))
+ if [[ "$i" == '40' ]]; then
+ break;
+ fi
+ sleep 0.5
+ done
+
if [ ! -b /dev/xvda${part} ]; then
echo "${PREF} Partition ${part} creation error"
xenguest_detach_disk
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [meta-arm] [PATCH] [arm-autonomy] xenguest-manager: Wait longer for /dev/xvdaX creation
2020-04-30 13:29 [PATCH] [arm-autonomy] xenguest-manager: Wait longer for /dev/xvdaX creation Diego Sueiro
@ 2020-04-30 14:25 ` Bertrand Marquis
2020-05-06 16:00 ` Jon Mason
0 siblings, 1 reply; 3+ messages in thread
From: Bertrand Marquis @ 2020-04-30 14:25 UTC (permalink / raw)
To: meta-arm; +Cc: nd
> On 30 Apr 2020, at 14:29, Diego Sueiro via lists.yoctoproject.org <diego.sueiro=arm.com@lists.yoctoproject.org> wrote:
>
> Implement a wait block of 20s with exit condition for checking
> /dev/xvdaX creation.
> For example, in cases where the rootfs is mounted via NFS, a longer
> time is needed until the xvda device appears in the system.
>
> Change-Id: I44cbcf2a43aeb476eae92d5b6d2cfd683e4bdf21
> Issue-Id: SCM-929
> Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
> ---
> .../recipes-extended/xenguest/files/xenguest-manager | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-manager b/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-manager
> index b25eeb5..4777054 100755
> --- a/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-manager
> +++ b/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-manager
> @@ -234,10 +234,17 @@ function xenguest_disk_init()
> exit 1
> fi
>
> - # Sometimes it takes time to see the device
> - if [ ! -b /dev/xvda${part} ]; then
> - sleep 1
> - fi
> +
> + # Loop for 20s to wait until /dev/xvdaX appears
> + i=0
> + while [ ! -b /dev/xvda${part} ]; do
> + ((i++))
> + if [[ "$i" == '40' ]]; then
> + break;
> + fi
> + sleep 0.5
> + done
> +
> if [ ! -b /dev/xvda${part} ]; then
> echo "${PREF} Partition ${part} creation error"
> xenguest_detach_disk
> --
> 2.7.4
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [meta-arm] [PATCH] [arm-autonomy] xenguest-manager: Wait longer for /dev/xvdaX creation
2020-04-30 14:25 ` [meta-arm] " Bertrand Marquis
@ 2020-05-06 16:00 ` Jon Mason
0 siblings, 0 replies; 3+ messages in thread
From: Jon Mason @ 2020-05-06 16:00 UTC (permalink / raw)
To: meta-arm
On Thu, Apr 30, 2020 at 02:25:57PM +0000, Bertrand Marquis wrote:
>
>
> > On 30 Apr 2020, at 14:29, Diego Sueiro via lists.yoctoproject.org <diego.sueiro=arm.com@lists.yoctoproject.org> wrote:
> >
> > Implement a wait block of 20s with exit condition for checking
> > /dev/xvdaX creation.
> > For example, in cases where the rootfs is mounted via NFS, a longer
> > time is needed until the xvda device appears in the system.
> >
> > Change-Id: I44cbcf2a43aeb476eae92d5b6d2cfd683e4bdf21
> > Issue-Id: SCM-929
> > Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
>
> Reviewed-by: Bertrand Marquis <bertrand.marquis@arm.com>
Pulled into the master branch.
Thanks,
Jon
>
> > ---
> > .../recipes-extended/xenguest/files/xenguest-manager | 15 +++++++++++----
> > 1 file changed, 11 insertions(+), 4 deletions(-)
> >
> > diff --git a/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-manager b/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-manager
> > index b25eeb5..4777054 100755
> > --- a/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-manager
> > +++ b/meta-arm-autonomy/recipes-extended/xenguest/files/xenguest-manager
> > @@ -234,10 +234,17 @@ function xenguest_disk_init()
> > exit 1
> > fi
> >
> > - # Sometimes it takes time to see the device
> > - if [ ! -b /dev/xvda${part} ]; then
> > - sleep 1
> > - fi
> > +
> > + # Loop for 20s to wait until /dev/xvdaX appears
> > + i=0
> > + while [ ! -b /dev/xvda${part} ]; do
> > + ((i++))
> > + if [[ "$i" == '40' ]]; then
> > + break;
> > + fi
> > + sleep 0.5
> > + done
> > +
> > if [ ! -b /dev/xvda${part} ]; then
> > echo "${PREF} Partition ${part} creation error"
> > xenguest_detach_disk
> > --
> > 2.7.4
> >
> >
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-06 16:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-30 13:29 [PATCH] [arm-autonomy] xenguest-manager: Wait longer for /dev/xvdaX creation Diego Sueiro
2020-04-30 14:25 ` [meta-arm] " Bertrand Marquis
2020-05-06 16:00 ` Jon Mason
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.