Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

(maint) query instances across all regions concurrently #473

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wkalt
Copy link

@wkalt wkalt commented Jul 29, 2017

Query instances across regions concurrently to reduce the execution time
of "puppet resource ec2_instance".

Query instances across regions concurrently to reduce the execution time
of "puppet resource ec2_instance".
@wkalt
Copy link
Author

wkalt commented Jul 29, 2017

Timings:

[~/work/puppetlabs-aws] (maint/async-instance-queries) $ time RUBYLIB=./lib puppet resource ec2_instance > /dev/null                                                                                                                          
                                                                                                                                                                                                                                              
real    0m4.366s                                                                                                                                                                                                                              
user    0m1.818s                                                                                                                                                                                                                              
sys     0m0.195s                                                                                                                                                                                                                              
[~/work/puppetlabs-aws] (maint/async-instance-queries) $ git checkout master                                                                                                                                                                  
Switched to branch 'master'                                                                                                                                                                                                                   
Your branch is up-to-date with 'origin/master'.                                                                                                                                                                                               
[~/work/puppetlabs-aws] (master) $ time RUBYLIB=./lib puppet resource ec2_instance > /dev/null                                                                                                                                                
                                                                                                                                                                                                                                              
real    0m16.760s                                                                                                                                                                                                                             
user    0m1.884s                                                                                                                                                                                                                              
sys     0m0.179s

if !ex
ex = err
end
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: is this the best way to propagate errors from the spawned threads? The downside I see here is that if an error occurs, we are still waiting for all threads to finish before we can raise it.

@wkalt
Copy link
Author

wkalt commented Jul 29, 2017

@hunner @DavidS can you see if this seems sane when you get a chance?

@wkalt
Copy link
Author

wkalt commented Jul 29, 2017

travis failures look unrelated to me

@gregohardy
Copy link
Contributor

taking a look. Travis failures don't appear to be related.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants