Skip to content
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-19888 Add workaround for 2016.1.1 console status check error #63

Conversation

shaigy
Copy link
Contributor

@shaigy shaigy commented Mar 16, 2017

During installation, a classifier-service check is done in beaker-pe
to make sure console service is up and running. The classifier status
service at the default detail level is broken in 2016.1.1 (PE-14857)
and returns an error and state "unknown". The workaround is to query
the classifier-service at 'critical' level and check for the console
service status.

Please delete any headings that don't apply to this Pull Request (PR).

What's this PR do?

Who would you like to review this PR?

@puppetlabs/integration, @puppetlabs/beaker (repo owners)

Should any of this be tested outside the normal PR CI cycle?

Any background context you want to provide?

Questions for reviewers?

@puppetlabs-jenkins
Copy link
Contributor

Can one of the admins verify this patch?

@puppetlabs-jenkins
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker-pe_btc-intn/186/

@cthorn42
Copy link
Collaborator

👍 from me, for what it counts. If we could get this in by this weekend's LTS integration run it would be greatly appreciated.

Copy link
Contributor

@kevpl kevpl left a comment

Choose a reason for hiding this comment

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

@shaigy we'd appreciate it if an rspec test was added to this to ensure we don't break your change going forward. If you need help with that, let us know, & we can pair with you on it.

if (host['pe_ver'] == '2016.1.1')
output = on(host, "curl -s -k https://localhost:4433/status/v1/services?level=critical --cert /etc/puppetlabs/puppet/ssl/certs/#{host}.pem --key /etc/puppetlabs/puppet/ssl/private_keys/#{host}.pem --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem", :accept_all_exit_codes => true)
else
output = on(host, "curl -s -k https://localhost:4433/status/v1/services --cert /etc/puppetlabs/puppet/ssl/certs/#{host}.pem --key /etc/puppetlabs/puppet/ssl/private_keys/#{host}.pem --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem", :accept_all_exit_codes => true)
Copy link
Contributor

Choose a reason for hiding this comment

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

@shaigy rather than repeating this entire command wholesale, I think it would be nicer if we pointed out just the difference for 2016.1.1 for readability. So this would look something like this:

query_params = host['pe_ver'] == '2016.1.1' ? '?level=critical' : ''
output = on(host, "curl -s .... v1/services#{query_params} --cert ...")

(that's assuming that query param is the only change, I just glanced at it)

@shaigy shaigy force-pushed the PE-19888-add-workaround-for-console-status-check-error-in-2016.1.1 branch from e40944e to cb72b95 Compare March 16, 2017 23:00
@shaigy
Copy link
Contributor Author

shaigy commented Mar 16, 2017

@kevpl I incorporated the code change. That definitely looks better!
Sorry, I didn't notice your comment about rspec. I would really appreciate getting some help on the rspec test

@puppetlabs-jenkins
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker-pe_btc-intn/187/

@shaigy shaigy force-pushed the PE-19888-add-workaround-for-console-status-check-error-in-2016.1.1 branch from cb72b95 to ed002c9 Compare March 20, 2017 22:04
@puppetlabs-jenkins
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker-pe_btc-intn/188/

@shaigy shaigy force-pushed the PE-19888-add-workaround-for-console-status-check-error-in-2016.1.1 branch from ed002c9 to 11fd19c Compare March 20, 2017 23:36
@shaigy
Copy link
Contributor Author

shaigy commented Mar 20, 2017

@kevpl Can you please review the changes?

@puppetlabs-jenkins
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker-pe_btc-intn/189/

@shaigy shaigy force-pushed the PE-19888-add-workaround-for-console-status-check-error-in-2016.1.1 branch from 11fd19c to 0357a14 Compare March 21, 2017 17:39
@kevpl
Copy link
Contributor

kevpl commented Mar 21, 2017

I'm 👍 on this. Once it comes through testing, I'm down to merge it.

@cthorn42 any issues with releasing it as soon as it's finished? Any synchronizations that need to happen, or are we green to cut a new gem?

Copy link
Member

@ericwilliamson ericwilliamson left a comment

Choose a reason for hiding this comment

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

@shaigy Can you please update your commit message to explain what the issue is and why setting the level to critical works around it.

Also, a comment in the code saying this is being done to work around a known issue, with a link to said known issue would be helpful for any future refactorings / code additions.

@cthorn42
Copy link
Collaborator

@kevpl I have no issue with releasing this gem. Once Eric's change request gets in I'm all for cutting the new gem. It will let us start to triage the LTS weekend job quicker.

@puppetlabs-jenkins
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker-pe_btc-intn/190/

@shaigy shaigy force-pushed the PE-19888-add-workaround-for-console-status-check-error-in-2016.1.1 branch from 0357a14 to 50d28cc Compare March 21, 2017 21:33
@shaigy
Copy link
Contributor Author

shaigy commented Mar 21, 2017

@ericwilliamson I have modified the commit message, can you review?
I don't have insight into 'why it is working when level is set to critical' part. I left a reference to the original ticket pointing to the bug in 2016.1.1 which also explains the workaround.

@puppetlabs-jenkins
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker-pe_btc-intn/191/

@ericwilliamson
Copy link
Member

I have modified the commit message, can you review?

👍 on the message - can you please add a comment to the actual code now as well please, then 👍

During installation, a classifier-service check is done in beaker-pe
to make sure console service is up and running. The classifier status
service at the default detail level is broken in 2016.1.1 (PE-14857)
and returns an error and state "unknown". The workaround is to query
the classifier-service at 'critical' level and check for the console
service status.
@shaigy shaigy force-pushed the PE-19888-add-workaround-for-console-status-check-error-in-2016.1.1 branch from 50d28cc to 6cd41e4 Compare March 22, 2017 21:13
@shaigy
Copy link
Contributor Author

shaigy commented Mar 22, 2017

@ericwilliamson Done!

@ericwilliamson
Copy link
Member

👍 @kevpl Any other changes you want done?

@kevpl
Copy link
Contributor

kevpl commented Mar 22, 2017

looks good. Once this passes testing, I'll merge & cut a new beaker-pe for it.

@puppetlabs-jenkins
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker-pe_btc-intn/192/

@kevpl kevpl merged commit 635224a into puppetlabs:master Mar 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants