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
a945068e
Commit
a945068e
authored
Apr 09, 2015
by
Fabio Yeon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Fix scheduler crashes when profiling is enabled"
parent
96076eb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
server.go
plugin/cmd/kube-scheduler/app/server.go
+6
-12
No files found.
plugin/cmd/kube-scheduler/app/server.go
View file @
a945068e
...
@@ -69,7 +69,7 @@ func (s *SchedulerServer) AddFlags(fs *pflag.FlagSet) {
...
@@ -69,7 +69,7 @@ func (s *SchedulerServer) AddFlags(fs *pflag.FlagSet) {
client
.
BindClientConfigFlags
(
fs
,
&
s
.
ClientConfig
)
client
.
BindClientConfigFlags
(
fs
,
&
s
.
ClientConfig
)
fs
.
StringVar
(
&
s
.
AlgorithmProvider
,
"algorithm_provider"
,
s
.
AlgorithmProvider
,
"The scheduling algorithm provider to use"
)
fs
.
StringVar
(
&
s
.
AlgorithmProvider
,
"algorithm_provider"
,
s
.
AlgorithmProvider
,
"The scheduling algorithm provider to use"
)
fs
.
StringVar
(
&
s
.
PolicyConfigFile
,
"policy_config_file"
,
s
.
PolicyConfigFile
,
"File with scheduler policy configuration"
)
fs
.
StringVar
(
&
s
.
PolicyConfigFile
,
"policy_config_file"
,
s
.
PolicyConfigFile
,
"File with scheduler policy configuration"
)
fs
.
BoolVar
(
&
s
.
EnableProfiling
,
"profiling"
,
tru
e
,
"Enable profiling via web interface host:port/debug/pprof/"
)
fs
.
BoolVar
(
&
s
.
EnableProfiling
,
"profiling"
,
fals
e
,
"Enable profiling via web interface host:port/debug/pprof/"
)
}
}
// Run runs the specified SchedulerServer. This should never exit.
// Run runs the specified SchedulerServer. This should never exit.
...
@@ -80,19 +80,13 @@ func (s *SchedulerServer) Run(_ []string) error {
...
@@ -80,19 +80,13 @@ func (s *SchedulerServer) Run(_ []string) error {
}
}
go
func
()
{
go
func
()
{
mux
:=
http
.
NewServeMux
()
if
s
.
EnableProfiling
{
if
s
.
EnableProfiling
{
mux
.
HandleFunc
(
"/debug/pprof/"
,
pprof
.
Index
)
http
.
HandleFunc
(
"/debug/pprof/"
,
pprof
.
Index
)
mux
.
HandleFunc
(
"/debug/pprof/profile"
,
pprof
.
Profile
)
http
.
HandleFunc
(
"/debug/pprof/profile"
,
pprof
.
Profile
)
mux
.
HandleFunc
(
"/debug/pprof/symbol"
,
pprof
.
Symbol
)
http
.
HandleFunc
(
"/debug/pprof/symbol"
,
pprof
.
Symbol
)
}
}
mux
.
Handle
(
"/metrics"
,
prometheus
.
Handler
())
http
.
Handle
(
"/metrics"
,
prometheus
.
Handler
())
http
.
ListenAndServe
(
net
.
JoinHostPort
(
s
.
Address
.
String
(),
strconv
.
Itoa
(
s
.
Port
)),
nil
)
server
:=
&
http
.
Server
{
Addr
:
net
.
JoinHostPort
(
s
.
Address
.
String
(),
strconv
.
Itoa
(
s
.
Port
)),
Handler
:
mux
,
}
glog
.
Fatal
(
server
.
ListenAndServe
())
}()
}()
configFactory
:=
factory
.
NewConfigFactory
(
kubeClient
)
configFactory
:=
factory
.
NewConfigFactory
(
kubeClient
)
...
...
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