All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jon Mason" <jdmason@kudzu.us>
To: meta-arm@lists.yoctoproject.org
Subject: Re: [meta-arm] [PATCH] [arm-autonomy] xenguest-manager: Wait longer for /dev/xvdaX creation
Date: Wed, 6 May 2020 12:00:24 -0400	[thread overview]
Message-ID: <20200506160023.GD22996@kudzu.us> (raw)
In-Reply-To: <D181AFAA-FF59-4CC9-935D-DDF6F8F2333C@arm.com>

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
> > 
> > 
> 

> 


      reply	other threads:[~2020-05-06 16:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=20200506160023.GD22996@kudzu.us \
    --to=jdmason@kudzu.us \
    --cc=meta-arm@lists.yoctoproject.org \
    /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 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.