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
72fed9a2
Commit
72fed9a2
authored
Apr 09, 2015
by
Robert Bailey
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6654 from GoogleCloudPlatform/revert-6623-fix_scheduler_profiling
Revert "Fix scheduler crashes when profiling is enabled"
parents
4661cedf
a945068e
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 @
72fed9a2
...
...
@@ -69,7 +69,7 @@ func (s *SchedulerServer) AddFlags(fs *pflag.FlagSet) {
client
.
BindClientConfigFlags
(
fs
,
&
s
.
ClientConfig
)
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
.
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.
...
...
@@ -80,19 +80,13 @@ func (s *SchedulerServer) Run(_ []string) error {
}
go
func
()
{
mux
:=
http
.
NewServeMux
()
if
s
.
EnableProfiling
{
mux
.
HandleFunc
(
"/debug/pprof/"
,
pprof
.
Index
)
mux
.
HandleFunc
(
"/debug/pprof/profile"
,
pprof
.
Profile
)
mux
.
HandleFunc
(
"/debug/pprof/symbol"
,
pprof
.
Symbol
)
http
.
HandleFunc
(
"/debug/pprof/"
,
pprof
.
Index
)
http
.
HandleFunc
(
"/debug/pprof/profile"
,
pprof
.
Profile
)
http
.
HandleFunc
(
"/debug/pprof/symbol"
,
pprof
.
Symbol
)
}
mux
.
Handle
(
"/metrics"
,
prometheus
.
Handler
())
server
:=
&
http
.
Server
{
Addr
:
net
.
JoinHostPort
(
s
.
Address
.
String
(),
strconv
.
Itoa
(
s
.
Port
)),
Handler
:
mux
,
}
glog
.
Fatal
(
server
.
ListenAndServe
())
http
.
Handle
(
"/metrics"
,
prometheus
.
Handler
())
http
.
ListenAndServe
(
net
.
JoinHostPort
(
s
.
Address
.
String
(),
strconv
.
Itoa
(
s
.
Port
)),
nil
)
}()
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