mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
qemurunner: Improves checking for server and target IPs on qemus parameters
Fixes OS hanging infinitely waiting for qemus process to release bitbake.lock (From OE-Core master rev: d168bf34c553dbe5de7511e158cd83869d7a88bc) (From OE-Core rev: b19f599fe8d06d9381ae774f3289fa8c054ad1cc) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Joshua Lock <joshua.lock@collabora.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
1c65b4bdd8
commit
d6dcddbb3d
@@ -107,14 +107,17 @@ class QemuRunner:
|
|||||||
cmdline = ''
|
cmdline = ''
|
||||||
with open('/proc/%s/cmdline' % self.qemupid) as p:
|
with open('/proc/%s/cmdline' % self.qemupid) as p:
|
||||||
cmdline = p.read()
|
cmdline = p.read()
|
||||||
ips = re.findall("((?:[0-9]{1,3}\.){3}[0-9]{1,3})", cmdline.split("ip=")[1])
|
try:
|
||||||
if not ips or len(ips) != 3:
|
ips = re.findall("((?:[0-9]{1,3}\.){3}[0-9]{1,3})", cmdline.split("ip=")[1])
|
||||||
|
if not ips or len(ips) != 3:
|
||||||
|
raise ValueError
|
||||||
|
else:
|
||||||
|
self.ip = ips[0]
|
||||||
|
self.server_ip = ips[1]
|
||||||
|
except IndexError, ValueError:
|
||||||
logger.info("Couldn't get ip from qemu process arguments! Here is the qemu command line used: %s" % cmdline)
|
logger.info("Couldn't get ip from qemu process arguments! Here is the qemu command line used: %s" % cmdline)
|
||||||
self.stop()
|
self.stop()
|
||||||
return False
|
return False
|
||||||
else:
|
|
||||||
self.ip = ips[0]
|
|
||||||
self.server_ip = ips[1]
|
|
||||||
logger.info("Target IP: %s" % self.ip)
|
logger.info("Target IP: %s" % self.ip)
|
||||||
logger.info("Server IP: %s" % self.server_ip)
|
logger.info("Server IP: %s" % self.server_ip)
|
||||||
logger.info("Waiting at most %d seconds for login banner" % self.boottime)
|
logger.info("Waiting at most %d seconds for login banner" % self.boottime)
|
||||||
|
|||||||
Reference in New Issue
Block a user