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
3988331c
Commit
3988331c
authored
May 26, 2018
by
Justin Santa Barbara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore InstanceNotFound comment & logic
Otherwise node registration is broken on AWS.
parent
d057795f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
cloud.go
pkg/cloudprovider/cloud.go
+1
-0
aws.go
pkg/cloudprovider/providers/aws/aws.go
+4
-0
No files found.
pkg/cloudprovider/cloud.go
View file @
3988331c
...
@@ -131,6 +131,7 @@ type Instances interface {
...
@@ -131,6 +131,7 @@ type Instances interface {
// services cannot be used in this method to obtain nodeaddresses
// services cannot be used in this method to obtain nodeaddresses
NodeAddressesByProviderID
(
ctx
context
.
Context
,
providerID
string
)
([]
v1
.
NodeAddress
,
error
)
NodeAddressesByProviderID
(
ctx
context
.
Context
,
providerID
string
)
([]
v1
.
NodeAddress
,
error
)
// InstanceID returns the cloud provider ID of the node with the specified NodeName.
// InstanceID returns the cloud provider ID of the node with the specified NodeName.
// Note that if the instance does not exist or is no longer running, we must return ("", cloudprovider.InstanceNotFound)
InstanceID
(
ctx
context
.
Context
,
nodeName
types
.
NodeName
)
(
string
,
error
)
InstanceID
(
ctx
context
.
Context
,
nodeName
types
.
NodeName
)
(
string
,
error
)
// InstanceType returns the type of the specified instance.
// InstanceType returns the type of the specified instance.
InstanceType
(
ctx
context
.
Context
,
name
types
.
NodeName
)
(
string
,
error
)
InstanceType
(
ctx
context
.
Context
,
name
types
.
NodeName
)
(
string
,
error
)
...
...
pkg/cloudprovider/providers/aws/aws.go
View file @
3988331c
...
@@ -1363,6 +1363,10 @@ func (c *Cloud) InstanceID(ctx context.Context, nodeName types.NodeName) (string
...
@@ -1363,6 +1363,10 @@ func (c *Cloud) InstanceID(ctx context.Context, nodeName types.NodeName) (string
}
}
inst
,
err
:=
c
.
getInstanceByNodeName
(
nodeName
)
inst
,
err
:=
c
.
getInstanceByNodeName
(
nodeName
)
if
err
!=
nil
{
if
err
!=
nil
{
if
err
==
cloudprovider
.
InstanceNotFound
{
// The Instances interface requires that we return InstanceNotFound (without wrapping)
return
""
,
err
}
return
""
,
fmt
.
Errorf
(
"getInstanceByNodeName failed for %q with %q"
,
nodeName
,
err
)
return
""
,
fmt
.
Errorf
(
"getInstanceByNodeName failed for %q with %q"
,
nodeName
,
err
)
}
}
return
"/"
+
aws
.
StringValue
(
inst
.
Placement
.
AvailabilityZone
)
+
"/"
+
aws
.
StringValue
(
inst
.
InstanceId
),
nil
return
"/"
+
aws
.
StringValue
(
inst
.
Placement
.
AvailabilityZone
)
+
"/"
+
aws
.
StringValue
(
inst
.
InstanceId
),
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