Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
4ab1c441
Commit
4ab1c441
authored
Nov 15, 2021
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(ci): fix the iptables check
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
c29da837
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
ci-scripts/cls_containerize.py
ci-scripts/cls_containerize.py
+4
-4
No files found.
ci-scripts/cls_containerize.py
View file @
4ab1c441
...
...
@@ -923,7 +923,7 @@ class Containerize():
if
result
is
None
:
mySSH
.
command
(
'echo '
+
password
+
' | sudo -S sysctl net.ipv4.conf.all.forwarding=1'
,
'\$'
,
10
)
# Check if iptables forwarding is accepted
mySSH
.
command
(
'echo '
+
password
+
' | sudo -S iptables -L'
,
'\$'
,
10
)
mySSH
.
command
(
'echo '
+
password
+
' | sudo -S iptables -L
FORWARD
'
,
'\$'
,
10
)
result
=
re
.
search
(
'Chain FORWARD .*policy ACCEPT'
,
mySSH
.
getBefore
())
if
result
is
None
:
mySSH
.
command
(
'echo '
+
password
+
' | sudo -S iptables -P FORWARD ACCEPT'
,
'\$'
,
10
)
...
...
@@ -951,7 +951,7 @@ class Containerize():
if
result
is
None
:
mySSH
.
command
(
'echo '
+
password
+
' | sudo -S sysctl net.ipv4.conf.all.forwarding=1'
,
'\$'
,
10
)
# Check if iptables forwarding is accepted
mySSH
.
command
(
'echo '
+
password
+
' | sudo -S iptables -L'
,
'\$'
,
10
)
mySSH
.
command
(
'echo '
+
password
+
' | sudo -S iptables -L
FORWARD
'
,
'\$'
,
10
)
result
=
re
.
search
(
'Chain FORWARD .*policy ACCEPT'
,
mySSH
.
getBefore
())
if
result
is
None
:
mySSH
.
command
(
'echo '
+
password
+
' | sudo -S iptables -P FORWARD ACCEPT'
,
'\$'
,
10
)
...
...
@@ -979,7 +979,7 @@ class Containerize():
if
result
is
None
:
mySSH
.
command
(
'echo '
+
password
+
' | sudo -S sysctl net.ipv4.conf.all.forwarding=1'
,
'\$'
,
10
)
# Check if iptables forwarding is accepted
mySSH
.
command
(
'echo '
+
password
+
' | sudo -S iptables -L'
,
'\$'
,
10
)
mySSH
.
command
(
'echo '
+
password
+
' | sudo -S iptables -L
FORWARD
'
,
'\$'
,
10
)
result
=
re
.
search
(
'Chain FORWARD .*policy ACCEPT'
,
mySSH
.
getBefore
())
if
result
is
None
:
mySSH
.
command
(
'echo '
+
password
+
' | sudo -S iptables -P FORWARD ACCEPT'
,
'\$'
,
10
)
...
...
@@ -1002,7 +1002,7 @@ class Containerize():
if
result
is
None
:
mySSH
.
command
(
'echo '
+
password
+
' | sudo -S sysctl net.ipv4.conf.all.forwarding=1'
,
'\$'
,
10
)
# Check if iptables forwarding is accepted
mySSH
.
command
(
'echo '
+
password
+
' | sudo -S iptables -L'
,
'\$'
,
10
)
mySSH
.
command
(
'echo '
+
password
+
' | sudo -S iptables -L
FORWARD
'
,
'\$'
,
10
)
result
=
re
.
search
(
'Chain FORWARD .*policy ACCEPT'
,
mySSH
.
getBefore
())
if
result
is
None
:
mySSH
.
command
(
'echo '
+
password
+
' | sudo -S iptables -P FORWARD ACCEPT'
,
'\$'
,
10
)
...
...
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