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
6606f9c9
Commit
6606f9c9
authored
Mar 11, 2015
by
Daniel Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
double-fix crash on my cluster
parent
88e0b049
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
kubelet.go
pkg/client/kubelet.go
+2
-1
pod_cache.go
pkg/master/pod_cache.go
+2
-0
No files found.
pkg/client/kubelet.go
View file @
6606f9c9
...
...
@@ -111,7 +111,7 @@ func (c *HTTPKubeletClient) GetPodStatus(host, podNamespace, podID string) (api.
status
:=
api
.
PodStatusResult
{}
query
:=
url
.
Values
{
"podID"
:
{
podID
},
"podNamespace"
:
{
podNamespace
}}
response
,
err
:=
c
.
getEntity
(
host
,
"/api/v1beta1/podInfo"
,
query
.
Encode
(),
&
status
)
if
response
.
StatusCode
==
http
.
StatusNotFound
{
if
response
!=
nil
&&
response
.
StatusCode
==
http
.
StatusNotFound
{
return
status
,
ErrPodInfoNotAvailable
}
return
status
,
err
...
...
@@ -124,6 +124,7 @@ func (c *HTTPKubeletClient) GetNodeInfo(host string) (api.NodeInfo, error) {
return
info
,
err
}
// getEntity might return a nil response.
func
(
c
*
HTTPKubeletClient
)
getEntity
(
host
,
path
,
query
string
,
entity
runtime
.
Object
)
(
*
http
.
Response
,
error
)
{
request
,
err
:=
http
.
NewRequest
(
"GET"
,
c
.
url
(
host
,
path
,
query
),
nil
)
if
err
!=
nil
{
...
...
pkg/master/pod_cache.go
View file @
6606f9c9
...
...
@@ -23,6 +23,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/pod"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/golang/glog"
)
...
...
@@ -264,6 +265,7 @@ func (p *PodCache) UpdateAllContainers() {
pod
:=
&
pods
.
Items
[
i
]
wg
.
Add
(
1
)
go
func
()
{
defer
util
.
HandleCrash
()
defer
wg
.
Done
()
err
:=
p
.
updatePodStatus
(
pod
)
if
err
!=
nil
&&
err
!=
client
.
ErrPodInfoNotAvailable
{
...
...
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