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
914616a1
Commit
914616a1
authored
Apr 08, 2015
by
Dawn Chen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6592 from vishh/kubelet_logging
Improve kubelet logging around startup.
parents
4ffc2aad
2b5cad6a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
2 deletions
+5
-2
server.go
cmd/kubelet/app/server.go
+1
-0
kubelet.go
pkg/kubelet/kubelet.go
+2
-1
server.go
pkg/kubelet/server.go
+1
-1
status_manager.go
pkg/kubelet/status_manager.go
+1
-0
No files found.
cmd/kubelet/app/server.go
View file @
914616a1
...
@@ -425,6 +425,7 @@ func RunKubelet(kcfg *KubeletConfig, builder KubeletBuilder) {
...
@@ -425,6 +425,7 @@ func RunKubelet(kcfg *KubeletConfig, builder KubeletBuilder) {
}
else
{
}
else
{
startKubelet
(
k
,
podCfg
,
kcfg
)
startKubelet
(
k
,
podCfg
,
kcfg
)
}
}
glog
.
Infof
(
"Started kubelet"
)
}
}
func
startKubelet
(
k
KubeletBootstrap
,
podCfg
*
config
.
PodConfig
,
kc
*
KubeletConfig
)
{
func
startKubelet
(
k
KubeletBootstrap
,
podCfg
*
config
.
PodConfig
,
kc
*
KubeletConfig
)
{
...
...
pkg/kubelet/kubelet.go
View file @
914616a1
...
@@ -561,7 +561,7 @@ func (kl *Kubelet) syncNodeStatus() {
...
@@ -561,7 +561,7 @@ func (kl *Kubelet) syncNodeStatus() {
if
kl
.
kubeClient
==
nil
{
if
kl
.
kubeClient
==
nil
{
return
return
}
}
glog
.
Infof
(
"Starting node status updates"
)
for
feq
:=
initialNodeStatusUpdateFrequency
;
feq
<
kl
.
nodeStatusUpdateFrequency
;
feq
+=
nodeStatusUpdateFrequencyInc
{
for
feq
:=
initialNodeStatusUpdateFrequency
;
feq
<
kl
.
nodeStatusUpdateFrequency
;
feq
+=
nodeStatusUpdateFrequencyInc
{
select
{
select
{
case
<-
time
.
After
(
feq
)
:
case
<-
time
.
After
(
feq
)
:
...
@@ -1628,6 +1628,7 @@ func (kl *Kubelet) handleNotFittingPods(pods []api.Pod) {
...
@@ -1628,6 +1628,7 @@ func (kl *Kubelet) handleNotFittingPods(pods []api.Pod) {
// no changes are seen to the configuration, will synchronize the last known desired
// no changes are seen to the configuration, will synchronize the last known desired
// state every sync_frequency seconds. Never returns.
// state every sync_frequency seconds. Never returns.
func
(
kl
*
Kubelet
)
syncLoop
(
updates
<-
chan
PodUpdate
,
handler
SyncHandler
)
{
func
(
kl
*
Kubelet
)
syncLoop
(
updates
<-
chan
PodUpdate
,
handler
SyncHandler
)
{
glog
.
Info
(
"Starting kubelet main sync loop."
)
for
{
for
{
unsyncedPod
:=
false
unsyncedPod
:=
false
podSyncTypes
:=
make
(
map
[
types
.
UID
]
metrics
.
SyncPodType
)
podSyncTypes
:=
make
(
map
[
types
.
UID
]
metrics
.
SyncPodType
)
...
...
pkg/kubelet/server.go
View file @
914616a1
...
@@ -60,7 +60,7 @@ type TLSOptions struct {
...
@@ -60,7 +60,7 @@ type TLSOptions struct {
// ListenAndServeKubeletServer initializes a server to respond to HTTP network requests on the Kubelet.
// ListenAndServeKubeletServer initializes a server to respond to HTTP network requests on the Kubelet.
func
ListenAndServeKubeletServer
(
host
HostInterface
,
address
net
.
IP
,
port
uint
,
tlsOptions
*
TLSOptions
,
enableDebuggingHandlers
bool
)
{
func
ListenAndServeKubeletServer
(
host
HostInterface
,
address
net
.
IP
,
port
uint
,
tlsOptions
*
TLSOptions
,
enableDebuggingHandlers
bool
)
{
glog
.
V
(
1
)
.
Infof
(
"Starting to listen on %s:%d"
,
address
,
port
)
glog
.
Infof
(
"Starting to listen on %s:%d"
,
address
,
port
)
handler
:=
NewServer
(
host
,
enableDebuggingHandlers
)
handler
:=
NewServer
(
host
,
enableDebuggingHandlers
)
s
:=
&
http
.
Server
{
s
:=
&
http
.
Server
{
Addr
:
net
.
JoinHostPort
(
address
.
String
(),
strconv
.
FormatUint
(
uint64
(
port
),
10
)),
Addr
:
net
.
JoinHostPort
(
address
.
String
(),
strconv
.
FormatUint
(
uint64
(
port
),
10
)),
...
...
pkg/kubelet/status_manager.go
View file @
914616a1
...
@@ -53,6 +53,7 @@ func newStatusManager(kubeClient client.Interface) *statusManager {
...
@@ -53,6 +53,7 @@ func newStatusManager(kubeClient client.Interface) *statusManager {
func
(
s
*
statusManager
)
Start
()
{
func
(
s
*
statusManager
)
Start
()
{
// syncBatch blocks when no updates are available, we can run it in a tight loop.
// syncBatch blocks when no updates are available, we can run it in a tight loop.
glog
.
Info
(
"Starting to sync pod status with apiserver"
)
go
util
.
Forever
(
func
()
{
go
util
.
Forever
(
func
()
{
err
:=
s
.
syncBatch
()
err
:=
s
.
syncBatch
()
if
err
!=
nil
{
if
err
!=
nil
{
...
...
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