Skip to content
GitLab
Next
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
GitLab.org
gitlab-runner
Commits
c7664172
Verified
Commit
c7664172
authored
Aug 09, 2018
by
Tomasz Maczukin
Browse files
Make session and metrics server initialization logging consistent
parent
f4a3dadf
Pipeline
#28238161
passed with stages
in 28 minutes and 37 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
commands/multi.go
commands/multi.go
+10
-5
No files found.
commands/multi.go
View file @
c7664172
...
...
@@ -418,7 +418,7 @@ func (mr *RunCommand) setupMetricsAndDebugServer() {
}
if
listenAddress
==
""
{
log
.
Info
ln
(
"M
etrics server disabled"
)
mr
.
log
()
.
Info
(
"Listen address not defined, m
etrics server disabled"
)
return
}
...
...
@@ -426,19 +426,24 @@ func (mr *RunCommand) setupMetricsAndDebugServer() {
// the provided address is invalid or there is some other listener error.
listener
,
err
:=
net
.
Listen
(
"tcp"
,
listenAddress
)
if
err
!=
nil
{
log
.
Fatalln
(
err
)
mr
.
log
()
.
WithError
(
err
)
.
Fatal
(
"Failed to create listener for metrics server"
)
}
mux
:=
http
.
NewServeMux
()
go
func
()
{
log
.
Fatalln
(
http
.
Serve
(
listener
,
mux
))
err
:=
http
.
Serve
(
listener
,
mux
)
if
err
!=
nil
{
mr
.
log
()
.
WithError
(
err
)
.
Fatal
(
"Metrics server terminated"
)
}
}()
mr
.
serveMetrics
(
mux
)
mr
.
serveDebugData
(
mux
)
log
.
Infoln
(
"Metrics server listening at"
,
listenAddress
)
mr
.
log
()
.
WithField
(
"address"
,
listenAddress
)
.
Info
(
"Metrics server listening"
)
}
func
(
mr
*
RunCommand
)
setupSessionServer
()
{
...
...
@@ -465,7 +470,7 @@ func (mr *RunCommand) setupSessionServer() {
go
func
()
{
err
:=
mr
.
sessionServer
.
Start
()
if
err
!=
nil
{
mr
.
log
()
.
Fatal
(
err
)
mr
.
log
()
.
WithError
(
err
)
.
Fatal
(
"Session server terminated"
)
}
}()
...
...
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