Project

General

Profile

Actions

Support #9081

closed

unable to delete host / Unable to delete PuppetCA certificate for host ([RestClient::NotAcceptable]: 406 Not Acceptable)

Added by Jay Christopherson over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Triaged:
Fixed in Releases:
Found in Releases:

Description

Trying to delete a host from Foreman, the logs show this:

App 34082 stderr: Delete PuppetCA certificates for testhost task failed with the following error: ERF12-7740 [ProxyAPI::ProxyException]: Unable to delete PuppetCA certificate for testhost ([RestClient::NotAcceptable]: 406 Not Acceptable) for proxy https://belct1114.belus.apptio.lan:8443/puppet/ca/usr/share/foreman/lib/proxy_api/puppetca.rb:41:in `rescue in del_certificate'
App 34082 stderr: /usr/share/foreman/lib/proxy_api/puppetca.rb:36:in `del_certificate'
App 34082 stderr: /usr/share/foreman/app/models/concerns/orchestration/puppetca.rb:23:in `delCertificate'
App 34082 stderr: /usr/share/foreman/app/models/concerns/orchestration.rb:137:in `execute'
App 34082 stderr: /usr/share/foreman/app/models/concerns/orchestration.rb:85:in `block in process'
App 34082 stderr: /usr/share/foreman/app/models/concerns/orchestration.rb:77:in `each'
App 34082 stderr: /usr/share/foreman/app/models/concerns/orchestration.rb:77:in `process'
App 34082 stderr: /usr/share/foreman/app/models/concerns/orchestration.rb:26:in `on_destroy'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:647:in `_run__211708046491613266__destroy__321692655977660819__callbacks'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_destroy_callbacks'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/callbacks.rb:254:in `destroy'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:236:in `block in destroy'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:293:in `with_transaction_returning_status'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:236:in `destroy'
App 34082 stderr: /usr/share/foreman/app/controllers/hosts_controller.rb:118:in `destroy'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in `process_action'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:615:in `block (3 levels) in run_4277916772471260187__process_action__2482037697917011151__callbacks'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in conditional_callback_around_7244'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_1823'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7244'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:592:in `block (2 levels) in _run
_4277916772471260187__process_action__2482037697917011151__callbacks'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in conditional_callback_around_7243'
App 34082 stderr: /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7243'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:426:in `block in _run
_4277916772471260187__process_action__2482037697917011151__callbacks'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:215:in `block in conditional_callback_around_7242'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:326:in `around'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:310:in `_callback_around_13'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7242'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:414:in `_run
_4277916772471260187__process_action__2482037697917011151__callbacks'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/callbacks.rb:17:in `process_action'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rescue.rb:29:in `process_action'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `block in instrument'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/notifications.rb:123:in `instrument'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:121:in `process'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/rendering.rb:45:in `process'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:203:in `dispatch'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal.rb:246:in `block in action'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:36:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/routing/route_set.rb:600:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/extractor/recorder.rb:97:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/apipie-rails-0.2.6/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
App 34082 stderr: /opt/rh/ruby193/r
App 34082 stderr: oot/usr/share/gems/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/conditionalget.rb:35:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/head.rb:14:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
App 34082 stderr: /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/flash.rb:242:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/cookies.rb:339:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/query_cache.rb:64:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `_run__1663849836604781886__call__321692655977660819__callbacks'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:26:in `call_app'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/rack/logger.rb:16:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/request_id.rb:22:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_dispatch/middleware/static.rb:62:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in `pass'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in `invalidate'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in `call!'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/engine.rb:479:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/application.rb:223:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.8/lib/rails/railtie/configurable.rb:30:in `method_missing'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each'
App 34082 stderr: /opt/rh/ruby193/root/usr/share/gems/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call'
App 34082 stderr: /usr/lib/ruby/gems/1.8/gems/passenger-4.0.53/lib/phusion_passenger/rack/thread_handler_extension.rb:74:in `process_request'
App 34082 stderr: /usr/lib/ruby/gems/1.8/gems/passenger-4.0.53/lib/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'
App 34082 stderr: /usr/lib/ruby/gems/1.8/gems/passenger-4.0.53/lib/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'
App 34082 stderr: /usr/lib/ruby/gems/1.8/gems/passenger-4.0.53/lib/phusion_passenger/request_handler.rb:455:in `block (3 levels) in start_threads'
App 34082 stderr: Rolling back due to a problem: [Delete PuppetCA certificates for bel129.belus.apptio.lan 50 failed [#<Host::Managed id: 13, name: "testhost", ip: nil, last_compile: nil, last_freshcheck: nil, last_report: nil, updated_at: "2015-01-22 19:07:19", source_file_id: nil, created_at: "2015-01-21 21:36:00", mac: "4c:00:82:1d:64:d4", root_pass: "<redacted>", serial: nil, puppet_status: 0, domain_id: 1, architecture_id: 1, operatingsystem_id: 4, environment_id: 3, subnet_id: 1, ptable_id: 11, medium_id: 7, build: false, comment: "", disk: "", installed_at: nil, model_id: nil, hostgroup_id: nil, owner_id: 3, owner_type: "User", enabled: true, puppet_ca_proxy_id: 1, managed: true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: 1, certname: nil, image_id: nil, organization_id: nil, location_id: nil, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil, primary_interface: nil, grub_pass: "<redacted>">, :delCertificate]]

Here is my puppetca.yml, for foreman-proxy settings:
  1. PuppetCA management
    :enabled: true
    :ssldir: /var/lib/puppet/ssl
    :puppetdir: /etc/puppet
    :puppetca_use_sudo: "true"
    :sudo_command: /usr/bin/sudo

This is a relatively fresh install of Foreman and Foreman-Proxy (running on the same host). To this point, I've not encountered any issues. This was a host that I wanted to test provisioning with, but decided to remove and re-add to address another issue (tftp not populating on "Build").

Actions #1

Updated by Jay Christopherson over 9 years ago

This can be closed. The issue was sudo permissions for the foreman-proxy user.

Actions #2

Updated by Anonymous over 9 years ago

  • Tracker changed from Bug to Support
  • Status changed from New to Closed

thanks

Actions

Also available in: Atom PDF