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
0892fd3d
Commit
0892fd3d
authored
Dec 18, 2014
by
bgrant0607
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3029 from ddysher/get-err-code
Fix node Get() error code
parents
eed52529
677f68ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
etcd.go
pkg/registry/etcd/etcd.go
+1
-1
healthy_registry.go
pkg/registry/minion/healthy_registry.go
+3
-0
rest.go
pkg/registry/minion/rest.go
+3
-0
No files found.
pkg/registry/etcd/etcd.go
View file @
0892fd3d
...
...
@@ -604,7 +604,7 @@ func (r *Registry) GetMinion(ctx api.Context, minionID string) (*api.Node, error
key
:=
makeNodeKey
(
minionID
)
err
:=
r
.
ExtractObj
(
key
,
&
minion
,
false
)
if
err
!=
nil
{
return
nil
,
etcderr
.
InterpretGetError
(
err
,
"minion"
,
minion
.
Name
)
return
nil
,
etcderr
.
InterpretGetError
(
err
,
"minion"
,
minion
ID
)
}
return
&
minion
,
nil
}
...
...
pkg/registry/minion/healthy_registry.go
View file @
0892fd3d
...
...
@@ -40,6 +40,9 @@ func NewHealthyRegistry(delegate Registry, client client.KubeletHealthChecker) R
func
(
r
*
HealthyRegistry
)
GetMinion
(
ctx
api
.
Context
,
minionID
string
)
(
*
api
.
Node
,
error
)
{
minion
,
err
:=
r
.
delegate
.
GetMinion
(
ctx
,
minionID
)
if
err
!=
nil
{
return
minion
,
err
}
if
minion
==
nil
{
return
nil
,
ErrDoesNotExist
}
...
...
pkg/registry/minion/rest.go
View file @
0892fd3d
...
...
@@ -86,6 +86,9 @@ func (rs *REST) Delete(ctx api.Context, id string) (<-chan apiserver.RESTResult,
// Get satisfies the RESTStorage interface.
func
(
rs
*
REST
)
Get
(
ctx
api
.
Context
,
id
string
)
(
runtime
.
Object
,
error
)
{
minion
,
err
:=
rs
.
registry
.
GetMinion
(
ctx
,
id
)
if
err
!=
nil
{
return
minion
,
err
}
if
minion
==
nil
{
return
nil
,
ErrDoesNotExist
}
...
...
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