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
98254a34
Commit
98254a34
authored
Aug 08, 2019
by
Erik Wilson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change load balancer logging to debug
parent
862c7ee3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
loadbalancer.go
pkg/agent/loadbalancer/loadbalancer.go
+8
-2
No files found.
pkg/agent/loadbalancer/loadbalancer.go
View file @
98254a34
...
...
@@ -75,6 +75,7 @@ func Setup(ctx context.Context, cfg cmds.Agent) (_lb *LoadBalancer, _err error)
lb
.
proxy
.
AddRoute
(
serviceName
,
&
tcpproxy
.
DialProxy
{
Addr
:
serviceName
,
DialContext
:
lb
.
dialContext
,
OnDialError
:
onDialError
,
})
if
err
:=
lb
.
updateConfig
();
err
!=
nil
{
...
...
@@ -118,14 +119,14 @@ func (lb *LoadBalancer) dialContext(ctx context.Context, network, address string
if
err
==
nil
{
return
conn
,
nil
}
logrus
.
Warn
f
(
"Dial error from load balancer: %s"
,
err
)
logrus
.
Debug
f
(
"Dial error from load balancer: %s"
,
err
)
newServer
,
err
:=
lb
.
nextServer
(
targetServer
)
if
err
!=
nil
{
return
nil
,
err
}
if
targetServer
!=
newServer
{
logrus
.
Warnf
(
"Dial context
in load balancer failed over to %s"
,
newServer
)
logrus
.
Debugf
(
"Dial server
in load balancer failed over to %s"
,
newServer
)
}
if
ctx
.
Err
()
!=
nil
{
return
nil
,
ctx
.
Err
()
...
...
@@ -140,3 +141,8 @@ func (lb *LoadBalancer) dialContext(ctx context.Context, network, address string
}
}
}
func
onDialError
(
src
net
.
Conn
,
dstDialErr
error
)
{
logrus
.
Debugf
(
"Incoming conn %v, error dialing load balancer servers: %v"
,
src
.
RemoteAddr
()
.
String
(),
dstDialErr
)
src
.
Close
()
}
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