Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Stephano Cetola <stephano.cetola@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 1/4] masterimage.py: fix issue with calling reboot on masterimage/DUT
Date: Mon,  6 Nov 2017 10:13:03 -0800	[thread overview]
Message-ID: <20171106181306.3042-2-stephano.cetola@linux.intel.com> (raw)
In-Reply-To: <20171106181306.3042-1-stephano.cetola@linux.intel.com>

From: Erik Botö <erik.boto@pelagicore.com>

On systemd systems calling reboot over an ssh connection doesn't
return as expected causing an exception, therefore wrap the call
to reboot in order to avoid this issue.

Also sync the filesystems before rebooting cause otherwise, it will be
done as part of the reboot and could take a very long time and testimage
will fail to access the machine. This issue was observed consistently with
one of our rootfs at Pelagicore.

[YOCTO #11524]

Signed-off-by: Erik Botö <erik.boto@pelagicore.com>
Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com>
---
 meta/lib/oeqa/controllers/masterimage.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/controllers/masterimage.py b/meta/lib/oeqa/controllers/masterimage.py
index 07418fcda1..fe90967923 100644
--- a/meta/lib/oeqa/controllers/masterimage.py
+++ b/meta/lib/oeqa/controllers/masterimage.py
@@ -108,7 +108,7 @@ class MasterImageHardwareTarget(oeqa.targetcontrol.BaseTarget, metaclass=ABCMeta
             time.sleep(10)
             self.power_ctl("cycle")
         else:
-            status, output = conn.run("reboot")
+            status, output = conn.run("sync; { sleep 1; reboot; } > /dev/null &")
             if status != 0:
                 bb.error("Failed rebooting target and no power control command defined. You need to manually reset the device.\n%s" % output)
 
-- 
2.14.2



  reply	other threads:[~2017-11-06 18:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-06 18:13 [PATCH 0/4] fix runtime tests with systemd-boot Stephano Cetola
2017-11-06 18:13 ` Stephano Cetola [this message]
2017-11-06 18:13 ` [PATCH 2/4] masterimage.py: fix stop() Stephano Cetola
2017-11-06 18:13 ` [PATCH 3/4] masterimage.py: rename parameter "params" in start() to "extra_bootparams" Stephano Cetola
2017-11-06 18:13 ` [PATCH 4/4] sshcontrol.py: in copy_to() always use scp Stephano Cetola
  -- strict thread matches above, loose matches on Subject: below --
2017-05-19 14:20 [PATCH 1/4] masterimage.py: fix issue with calling reboot on masterimage/DUT Erik Botö
2017-05-19 14:59 ` Leonardo Sandoval
2017-05-19 18:24   ` Erik Botö
2017-05-26  9:01 ` Erik Botö
2017-05-26 13:57   ` Leonardo Sandoval

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=20171106181306.3042-2-stephano.cetola@linux.intel.com \
    --to=stephano.cetola@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox