-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(PE-14934) Add more robust puppetdb check #3
(PE-14934) Add more robust puppetdb check #3
Conversation
while not match | ||
output = on(host, "curl -s http://localhost:8080/pdb/meta/v1/version", :accept_all_exit_codes => true) | ||
match = output.stdout =~ /version.*\d+\.\d+\.\d+/ | ||
sleep 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if at first you don't succeed...
Can one of the admins verify this patch? |
Before this commit we were still failing before the last puppet agent run in do_install because we also run puppet agent in some cases before the last run. This commit adds in the wait during that agent run as well as a check on the status endpoint in puppetdb to be sure that it is running in the case that the port is open but puppetdb is not ready for requests.
77dd844
to
7112971
Compare
Ok, we have a version up with checks in both the secondary and final agent runs, with looping, and a 60 second timeout, and which respects the previous version checks while also only performing the status check on a 2016.1.x+ build. Britt's doing a final test run of this now. |
Install test passed on 2016.1 using |
@@ -540,6 +547,22 @@ def install_pe | |||
install_pe_on(hosts, options) | |||
end | |||
|
|||
def check_puppetdb_status_endpoint(host) | |||
if version_is_less(host['pe_ver'], '2016.1.0') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could inline this conditional.
👍 |
@demophoon no real problems with this PR, I'm ready to merge once your own test has been verified. |
Introduced chagnes to the do_install method, but specs were failing because of the tight coupling between expectations and counts of command execution. The need to initialize metadata comes from the fact that the previous PR #3 added step() calls, which reference the TestCase metadata attr. Since we aren't using an actual TestCase instance, this had to be initalized separately.
Introduced chagnes to the do_install method, but specs were failing because of the tight coupling between expectations and counts of command execution. The need to initialize metadata comes from the fact that the previous PR #3 added step() calls, which reference the TestCase metadata attr. Since we aren't using an actual TestCase instance, this had to be initalized separately.
Before this commit we were still failing before the last puppet agent
run in do_install because we also run puppet agent in some cases before
the last run. This commit adds in the wait during that agent run as well
as a check on the status endpoint in puppetdb to be sure that it is
running in the case that the port is open but puppetdb is not ready for
requests.