[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4683/8267] bitbake: fetch2: Add NFS Stale file exception handling
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 4683/8267] bitbake: fetch2: Add NFS Stale file exception handling
- Date: Sun, 17 Dec 2017 02:22:50 +0000 (UTC)
commit b14e61d1bd17d2976cc25fc78ccaad1c0659dd50
Author: Khem Raj <raj khem gmail com>
Date: Wed Feb 8 22:41:50 2017 -0800
bitbake: fetch2: Add NFS Stale file exception handling
- In some cases the file descriptor
is held by nfs client and none of os.path.* is catching
that, it could mean that error is not doled out because
client has cached the stat info. In this case we are
out of luck. Needed to catch IOError, which would be
causing the Stale error.
- In download method, update_stamp is invoked
md5sum validation which is found to be throwing
Stale errors.
- Added error handling to fix the stale errors.
(Bitbake rev: 5a53e7d7b017769a6eb0f0a6335735a1fe51a5ec)
Signed-off-by: Balaji Punnuru <balaji_punnuru cable comcast com>
Signed-off-by: Khem Raj <raj khem gmail com>
Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>
bitbake/lib/bb/fetch2/__init__.py | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 8dd276f..70387f5 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -35,6 +35,7 @@ import operator
import collections
import subprocess
import pickle
+import errno
import bb.persist_data, bb.utils
import bb.checksum
from bb import data
@@ -998,6 +999,12 @@ def try_mirror_url(fetch, origud, ud, ld, check = False):
except bb.fetch2.NetworkAccess:
raise
+ except IOError as e:
+ if e.errno in [os.errno.ESTALE]:
+ logger.warn("Stale Error Observed %s." % ud.url)
+ return False
+ raise
+
except bb.fetch2.BBFetchException as e:
if isinstance(e, ChecksumError):
logger.warning("Mirror checksum failure for url %s (original url: %s)\nCleaning and trying
again." % (ud.url, origud.url))
@@ -1646,6 +1653,11 @@ class Fetch(object):
update_stamp(ud, self.d)
+ except IOError as e:
+ if e.errno in [os.errno.ESTALE]:
+ logger.error("Stale Error Observed %s." % u)
+ raise ChecksumError("Stale Error Detected")
+
except BBFetchException as e:
if isinstance(e, ChecksumError):
logger.error("Checksum failure fetching %s" % u)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]