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
63f63aa9
Commit
63f63aa9
authored
Mar 30, 2015
by
Justin Santa Barbara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't list AWS instances until they are actually ready
parent
7bbf526a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
aws.go
pkg/cloudprovider/aws/aws.go
+14
-1
No files found.
pkg/cloudprovider/aws/aws.go
View file @
63f63aa9
...
@@ -288,7 +288,20 @@ func (aws *AWSCloud) getInstancesByRegex(regex string) ([]string, error) {
...
@@ -288,7 +288,20 @@ func (aws *AWSCloud) getInstancesByRegex(regex string) ([]string, error) {
for
_
,
instance
:=
range
reservation
.
Instances
{
for
_
,
instance
:=
range
reservation
.
Instances
{
// TODO: Push filtering down into EC2 API filter?
// TODO: Push filtering down into EC2 API filter?
if
!
isAlive
(
&
instance
)
{
if
!
isAlive
(
&
instance
)
{
glog
.
V
(
2
)
.
Infof
(
"skipping EC2 instance (not alive): %s"
,
instance
.
InstanceId
)
glog
.
V
(
2
)
.
Infof
(
"skipping EC2 instance (%s): %s"
,
instance
.
State
.
Name
,
instance
.
InstanceId
)
continue
}
// Only return fully-ready instances when listing instances
// (vs a query by name, where we will return it if we find it)
if
instance
.
State
.
Name
==
"pending"
{
glog
.
V
(
2
)
.
Infof
(
"skipping EC2 instance (pending): %s"
,
instance
.
InstanceId
)
continue
}
if
instance
.
PrivateDNSName
==
""
{
glog
.
V
(
2
)
.
Infof
(
"skipping EC2 instance (no PrivateDNSName): %s"
,
instance
.
InstanceId
)
continue
continue
}
}
...
...
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