Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
slapos.core
Commits
a05a455e
Commit
a05a455e
authored
Jul 24, 2023
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos/grid: improve logging regarding networkcache
parent
a105879b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
slapos/grid/SlapObject.py
slapos/grid/SlapObject.py
+4
-1
slapos/grid/networkcache.py
slapos/grid/networkcache.py
+5
-2
No files found.
slapos/grid/SlapObject.py
View file @
a05a455e
...
@@ -213,6 +213,9 @@ class Software(object):
...
@@ -213,6 +213,9 @@ class Software(object):
finally
:
finally
:
tar
.
close
()
tar
.
close
()
elif
force_binary_cache
:
elif
force_binary_cache
:
if
os
.
path
.
exists
(
self
.
software_path
):
message
=
'Binary cache forced for %r, but directory %s already exists, will retry again'
%
(
self
.
url
,
self
.
software_path
)
else
:
message
=
'Binary cache forced for %r, but failed to download, will retry again'
%
(
self
.
url
,)
message
=
'Binary cache forced for %r, but failed to download, will retry again'
%
(
self
.
url
,)
self
.
logger
.
error
(
message
)
self
.
logger
.
error
(
message
)
raise
BuildoutFailedError
(
message
)
raise
BuildoutFailedError
(
message
)
...
...
slapos/grid/networkcache.py
View file @
a05a455e
...
@@ -93,13 +93,16 @@ def download_network_cached(cache_url, dir_url, software_url, software_root,
...
@@ -93,13 +93,16 @@ def download_network_cached(cache_url, dir_url, software_url, software_root,
return True if download succeeded.
return True if download succeeded.
"""
"""
if
not
LIBNETWORKCACHE_ENABLED
:
if
not
LIBNETWORKCACHE_ENABLED
:
logger
.
warning
(
'LIBNETWORKCACHE_ENABLED is false'
)
return
False
return
False
if
not
(
cache_url
and
dir_url
and
software_url
and
software_root
):
if
not
(
cache_url
and
dir_url
and
software_url
and
software_root
):
logger
.
warning
(
'networkcache badly configured'
)
return
False
return
False
for
url
in
download_from_binary_cache_url_blacklist
:
for
url
in
download_from_binary_cache_url_blacklist
:
if
software_url
.
startswith
(
url
):
if
software_url
.
startswith
(
url
):
logger
.
warning
(
'URL %s is blacklisted'
,
url
)
return
False
return
False
try
:
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment