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
Boxiang Sun
slapos.core
Commits
c4e86b91
Commit
c4e86b91
authored
Feb 14, 2023
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapformat: Warn when falling back to random IPv6
parent
de7056c3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
slapos/format.py
slapos/format.py
+16
-0
No files found.
slapos/format.py
View file @
c4e86b91
...
...
@@ -1304,6 +1304,14 @@ class Interface(object):
self
.
_reserveIpv6Range
(
result_addr
[
'addr'
],
result_addr
[
'prefixlen'
])
return
result_addr
self
.
_logger
.
warning
(
"Falling back to random address selection for partition %s"
" because %s/%s is already taken"
%
(
'%s tap'
%
partition_index
if
tap
else
partition_index
,
result_addr
[
'addr'
],
result_addr
[
'prefixlen'
],
))
# Try 10 times to add address, raise in case if not possible
for
_
in
range
(
10
):
if
tap
:
...
...
@@ -1349,6 +1357,14 @@ class Interface(object):
ipv6_range
[
'network'
]
=
'%(addr)s/%(prefixlen)d'
%
ipv6_range
if
self
.
_tryReserveIpv6Range
(
ipv6_range
[
'addr'
],
ipv6_range
[
'prefixlen'
]):
return
ipv6_range
self
.
_logger
.
warning
(
"Falling back to random IPv6 range selection for partition %s"
" because %s is already taken"
%
(
'%s tun'
%
i
if
tun
else
i
,
ipv6_range
[
'network'
],
))
# Try 10 times to add address, raise in case if not possible
for
_
in
range
(
10
):
ipv6_range
=
self
.
_generateRandomIPv6Range
(
address_dict
,
suffix
=
'0'
)
...
...
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