Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
941629d3
Unverified
Commit
941629d3
authored
May 07, 2019
by
Krzysztof Siedlecki
Committed by
GitHub
May 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Add better logging when iptables-restore fails"
parent
a1588cfe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
proxier.go
pkg/proxy/iptables/proxier.go
+4
-4
proxier.go
pkg/proxy/ipvs/proxier.go
+1
-1
No files found.
pkg/proxy/iptables/proxier.go
View file @
941629d3
...
...
@@ -426,7 +426,7 @@ func CleanupLeftovers(ipt utiliptables.Interface) (encounteredError bool) {
// Write it.
err
=
ipt
.
Restore
(
utiliptables
.
TableNAT
,
natLines
,
utiliptables
.
NoFlushTables
,
utiliptables
.
RestoreCounters
)
if
err
!=
nil
{
klog
.
Errorf
(
"Failed to execute iptables-restore for %s: %v
\n
failed payload:
\n
%s"
,
utiliptables
.
TableNAT
,
err
,
string
(
natLines
)
)
klog
.
Errorf
(
"Failed to execute iptables-restore for %s: %v
"
,
utiliptables
.
TableNAT
,
err
)
encounteredError
=
true
}
}
...
...
@@ -452,7 +452,7 @@ func CleanupLeftovers(ipt utiliptables.Interface) (encounteredError bool) {
filterLines
:=
append
(
filterChains
.
Bytes
(),
filterRules
.
Bytes
()
...
)
// Write it.
if
err
:=
ipt
.
Restore
(
utiliptables
.
TableFilter
,
filterLines
,
utiliptables
.
NoFlushTables
,
utiliptables
.
RestoreCounters
);
err
!=
nil
{
klog
.
Errorf
(
"Failed to execute iptables-restore for %s: %v
\n
failed payload:
\n
%s"
,
utiliptables
.
TableFilter
,
err
,
string
(
filterLines
)
)
klog
.
Errorf
(
"Failed to execute iptables-restore for %s: %v
"
,
utiliptables
.
TableFilter
,
err
)
encounteredError
=
true
}
}
...
...
@@ -1368,10 +1368,10 @@ func (proxier *Proxier) syncProxyRules() {
proxier
.
iptablesData
.
Write
(
proxier
.
natChains
.
Bytes
())
proxier
.
iptablesData
.
Write
(
proxier
.
natRules
.
Bytes
())
klog
.
V
(
5
)
.
Infof
(
"Restoring iptables rules: %s"
,
proxier
.
iptablesData
.
String
())
klog
.
V
(
5
)
.
Infof
(
"Restoring iptables rules: %s"
,
proxier
.
iptablesData
.
Bytes
())
err
=
proxier
.
iptables
.
RestoreAll
(
proxier
.
iptablesData
.
Bytes
(),
utiliptables
.
NoFlushTables
,
utiliptables
.
RestoreCounters
)
if
err
!=
nil
{
klog
.
Errorf
(
"Failed to execute iptables-restore: %v
\n
failed payload:
\n
%s"
,
err
,
proxier
.
iptablesData
.
String
()
)
klog
.
Errorf
(
"Failed to execute iptables-restore: %v
"
,
err
)
// Revert new local ports.
klog
.
V
(
2
)
.
Infof
(
"Closing local ports after iptables-restore failure"
)
utilproxy
.
RevertPorts
(
replacementPortsMap
,
proxier
.
portsMap
)
...
...
pkg/proxy/ipvs/proxier.go
View file @
941629d3
...
...
@@ -1230,7 +1230,7 @@ func (proxier *Proxier) syncProxyRules() {
klog
.
V
(
5
)
.
Infof
(
"Restoring iptables rules: %s"
,
proxier
.
iptablesData
.
Bytes
())
err
=
proxier
.
iptables
.
RestoreAll
(
proxier
.
iptablesData
.
Bytes
(),
utiliptables
.
NoFlushTables
,
utiliptables
.
RestoreCounters
)
if
err
!=
nil
{
klog
.
Errorf
(
"Failed to execute iptables-restore: %v
\n
failed payload:
\n
%s"
,
err
,
proxier
.
iptablesData
.
String
())
klog
.
Errorf
(
"Failed to execute iptables-restore: %v
\n
Rules:
\n
%s"
,
err
,
proxier
.
iptablesData
.
Bytes
())
// Revert new local ports.
utilproxy
.
RevertPorts
(
replacementPortsMap
,
proxier
.
portsMap
)
return
...
...
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