summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-29 17:04:38 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-08-29 23:36:17 +0100
commitfac12de72bda1e864e71538be07d6c6f6e987498 (patch)
tree6b1f5170d3a6024d63695a460109e320eea4bafe
parentb87a33d9c86cc1d2ea196259020e1d3dc712ccef (diff)
downloadopenembedded-core-contrib-fac12de72bda1e864e71538be07d6c6f6e987498.tar.gz
openembedded-core-contrib-fac12de72bda1e864e71538be07d6c6f6e987498.tar.bz2
openembedded-core-contrib-fac12de72bda1e864e71538be07d6c6f6e987498.zip
scripts/runqemu: Don't print error messages about tap file locks
Errors like: runqemu - ERROR - Acquiring lockfile /tmp/qemu-tap-locks/tap0.lock failed: [Errno 11] Resource temporarily unavailable are not really fatal errors. Change these to info messages instead so people look later in the log for the real errors. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/runqemu10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 1131324ccc..df76270904 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -232,13 +232,17 @@ class BaseConfig(object):
self.mac_tap = "52:54:00:12:34:"
self.mac_slirp = "52:54:00:12:35:"
- def acquire_lock(self):
+ def acquire_lock(self, error=True):
logger.debug("Acquiring lockfile %s..." % self.lock)
try:
self.lock_descriptor = open(self.lock, 'w')
fcntl.flock(self.lock_descriptor, fcntl.LOCK_EX|fcntl.LOCK_NB)
except Exception as e:
- logger.error("Acquiring lockfile %s failed: %s" % (self.lock, e))
+ msg = "Acquiring lockfile %s failed: %s" % (self.lock, e)
+ if error:
+ logger.error(msg)
+ else:
+ logger.info(msg)
if self.lock_descriptor:
self.lock_descriptor.close()
return False
@@ -927,7 +931,7 @@ class BaseConfig(object):
logger.info('Found %s.skip, skipping %s' % (lockfile, p))
continue
self.lock = lockfile + '.lock'
- if self.acquire_lock():
+ if self.acquire_lock(error=False):
tap = p
logger.info("Using preconfigured tap device %s" % tap)
logger.info("If this is not intended, touch %s.skip to make runqemu skip %s." %(lockfile, tap))