Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1342040

Summary: ERF42-5531 [Foreman::Exception]: unknown permission for api/v2/hosts#disassociate
Product: Red Hat Satellite Reporter: Lukas Zapletal <lzap>
Component: Content ManagementAssignee: Ivan Necas <inecas>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: bbuckingham, cwelton, egolov
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-03 09:38:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukas Zapletal 2016-06-02 10:19:40 UTC
REGRESSION FROM 13.1 SNAP (this was working last week):

Try to disassociate a host via API and error occurs:

ERF42-5531 [Foreman::Exception]: unknown permission for api/v2/hosts#disassociate

In my case, I was re-registering previously registered system via bootstrap script:

python bootstrap.py -s hp-nehalem-02.rhts.eng.bos.redhat.com -l admin -p changeme -o "MyOrg" -L "MyLoc" -a "ak-rhel-7-x86_64" --hostgroup "RHEL 7.0 Labs" --force

satellite-6.2.0-13.0.el7sat.noarch

Full log:

==> /var/log/httpd/foreman-ssl_access_ssl.log <==
2620:52:0:102f:5054:1ff:fe2c:e135 - - [02/Jun/2016:06:18:45 -0400] "GET /api/v2/hostgroups/?search=title%3D%22RHEL+7.0+Labs%22 HTTP/1.1" 200 824 "-" "Python-urllib/2.7"
2620:52:0:102f:5054:1ff:fe2c:e135 - - [02/Jun/2016:06:18:45 -0400] "GET /api/v2/locations/?search=title%3D%22MyLoc%22 HTTP/1.1" 200 353 "-" "Python-urllib/2.7"
2620:52:0:102f:5054:1ff:fe2c:e135 - - [02/Jun/2016:06:18:46 -0400] "GET /api/v2/organizations/?search=name%3D%22MyOrg%22 HTTP/1.1" 200 352 "-" "Python-urllib/2.7"
2620:52:0:102f:5054:1ff:fe2c:e135 - - [02/Jun/2016:06:18:46 -0400] "GET /api/v2/domains/?search=name%3D%22lab.bos.redhat.com%22 HTTP/1.1" 200 322 "-" "Python-urllib/2.7"
2620:52:0:102f:5054:1ff:fe2c:e135 - - [02/Jun/2016:06:18:46 -0400] "GET /api/v2/architectures/?search=name%3D%22x86_64%22 HTTP/1.1" 200 267 "-" "Python-urllib/2.7"

==> /var/log/httpd/foreman-ssl_error_ssl.log <==
[Thu Jun 02 06:18:45.763721 2016] [ssl:warn] [pid 65589] [client 2620:52:0:102f:5054:1ff:fe2c:e135:45148] AH02227: Failed to set r->user to 'SSL_CLIENT_S_DN_CN'
[Thu Jun 02 06:18:45.890232 2016] [ssl:warn] [pid 73780] [client 2620:52:0:102f:5054:1ff:fe2c:e135:45149] AH02227: Failed to set r->user to 'SSL_CLIENT_S_DN_CN'
[Thu Jun 02 06:18:46.106707 2016] [ssl:warn] [pid 67801] [client 2620:52:0:102f:5054:1ff:fe2c:e135:45150] AH02227: Failed to set r->user to 'SSL_CLIENT_S_DN_CN'
[Thu Jun 02 06:18:46.181919 2016] [ssl:warn] [pid 65776] [client 2620:52:0:102f:5054:1ff:fe2c:e135:45151] AH02227: Failed to set r->user to 'SSL_CLIENT_S_DN_CN'
[Thu Jun 02 06:18:46.263364 2016] [ssl:warn] [pid 73771] [client 2620:52:0:102f:5054:1ff:fe2c:e135:45152] AH02227: Failed to set r->user to 'SSL_CLIENT_S_DN_CN'
[Thu Jun 02 06:18:46.343689 2016] [ssl:warn] [pid 44358] [client 2620:52:0:102f:5054:1ff:fe2c:e135:45153] AH02227: Failed to set r->user to 'SSL_CLIENT_S_DN_CN'

==> /var/log/foreman/production.log <==
2016-06-02 06:18:45 [app] [I] Started GET "/api/v2/hostgroups/?search=title%3D%22RHEL+7.0+Labs%22" for 2620:52:0:102f:5054:1ff:fe2c:e135 at 2016-06-02 06:18:45 -0400
2016-06-02 06:18:45 [app] [I] Processing by Api::V2::HostgroupsController#index as JSON
2016-06-02 06:18:45 [app] [I]   Parameters: {"search"=>"title=\"RHEL 7.0 Labs\"", "apiv"=>"v2", "hostgroup"=>{}}
2016-06-02 06:18:45 [app] [I] Authorized user admin(Admin User)
2016-06-02 06:18:45 [app] [I]   Rendered api/v2/hostgroups/index.json.rabl within api/v2/layouts/index_layout (23.5ms)
2016-06-02 06:18:45 [app] [I] Completed 200 OK in 71ms (Views: 22.9ms | ActiveRecord: 17.9ms)
2016-06-02 06:18:45 [app] [I] Started GET "/api/v2/locations/?search=title%3D%22MyLoc%22" for 2620:52:0:102f:5054:1ff:fe2c:e135 at 2016-06-02 06:18:45 -0400
2016-06-02 06:18:45 [app] [I] Processing by Api::V2::LocationsController#index as JSON
2016-06-02 06:18:45 [app] [I]   Parameters: {"search"=>"title=\"MyLoc\"", "apiv"=>"v2", "location"=>{}}
2016-06-02 06:18:46 [app] [I] Authorized user admin(Admin User)
2016-06-02 06:18:46 [app] [I]   Rendered api/v2/taxonomies/index.json.rabl within api/v2/layouts/index_layout (4.2ms)
2016-06-02 06:18:46 [app] [I] Completed 200 OK in 168ms (Views: 6.2ms | ActiveRecord: 14.4ms)
2016-06-02 06:18:46 [app] [I] Started GET "/api/v2/organizations/?search=name%3D%22MyOrg%22" for 2620:52:0:102f:5054:1ff:fe2c:e135 at 2016-06-02 06:18:46 -0400
2016-06-02 06:18:46 [app] [I] Processing by Api::V2::OrganizationsController#index as JSON
2016-06-02 06:18:46 [app] [I]   Parameters: {"search"=>"name=\"MyOrg\"", "apiv"=>"v2", "organization"=>{}}
2016-06-02 06:18:46 [app] [I] Authorized user admin(Admin User)
2016-06-02 06:18:46 [app] [I]   Rendered api/v2/taxonomies/index.json.rabl within api/v2/layouts/index_layout (3.6ms)
2016-06-02 06:18:46 [app] [I] Completed 200 OK in 35ms (Views: 5.3ms | ActiveRecord: 10.7ms)
2016-06-02 06:18:46 [app] [I] Started GET "/api/v2/domains/?search=name%3D%22lab.bos.redhat.com%22" for 2620:52:0:102f:5054:1ff:fe2c:e135 at 2016-06-02 06:18:46 -0400
2016-06-02 06:18:46 [app] [I] Processing by Api::V2::DomainsController#index as JSON
2016-06-02 06:18:46 [app] [I]   Parameters: {"search"=>"name=\"lab.bos.redhat.com\"", "apiv"=>"v2", "domain"=>{}}
2016-06-02 06:18:46 [app] [I] Authorized user admin(Admin User)
2016-06-02 06:18:46 [app] [I]   Rendered api/v2/domains/index.json.rabl within api/v2/layouts/index_layout (3.3ms)
2016-06-02 06:18:46 [app] [I] Completed 200 OK in 39ms (Views: 6.0ms | ActiveRecord: 12.0ms)
2016-06-02 06:18:46 [app] [I] Started GET "/api/v2/architectures/?search=name%3D%22x86_64%22" for 2620:52:0:102f:5054:1ff:fe2c:e135 at 2016-06-02 06:18:46 -0400
2016-06-02 06:18:46 [app] [I] Processing by Api::V2::ArchitecturesController#index as JSON
2016-06-02 06:18:46 [app] [I]   Parameters: {"search"=>"name=\"x86_64\"", "apiv"=>"v2", "architecture"=>{}}
2016-06-02 06:18:46 [app] [I] Authorized user admin(Admin User)
2016-06-02 06:18:46 [app] [I]   Rendered api/v2/architectures/index.json.rabl within api/v2/layouts/index_layout (3.5ms)
2016-06-02 06:18:46 [app] [I] Completed 200 OK in 36ms (Views: 5.8ms | ActiveRecord: 11.1ms)
2016-06-02 06:18:46 [app] [I] Started GET "/api/v2/hosts/?search=name%3D%22hp-dl380pgen8-02-vm-13.lab.bos.redhat.com%22" for 2620:52:0:102f:5054:1ff:fe2c:e135 at 2016-06-02 06:18:46 -0400
2016-06-02 06:18:46 [app] [I] Processing by Api::V2::HostsController#index as JSON
2016-06-02 06:18:46 [app] [I]   Parameters: {"search"=>"name=\"hp-dl380pgen8-02-vm-13.lab.bos.redhat.com\"", "apiv"=>"v2", :host=>{}}
2016-06-02 06:18:46 [app] [I] Authorized user admin(Admin User)

==> /var/log/httpd/foreman-ssl_access_ssl.log <==
2620:52:0:102f:5054:1ff:fe2c:e135 - - [02/Jun/2016:06:18:46 -0400] "GET /api/v2/hosts/?search=name%3D%22hp-dl380pgen8-02-vm-13.lab.bos.redhat.com%22 HTTP/1.1" 200 2450 "-" "Python-urllib/2.7"
2620:52:0:102f:5054:1ff:fe2c:e135 - - [02/Jun/2016:06:18:46 -0400] "PUT /api/v2/hosts/8/disassociate HTTP/1.1" 500 111 "-" "Python-urllib/2.7"

==> /var/log/httpd/foreman-ssl_error_ssl.log <==
[Thu Jun 02 06:18:46.540631 2016] [ssl:warn] [pid 77321] [client 2620:52:0:102f:5054:1ff:fe2c:e135:45154] AH02227: Failed to set r->user to 'SSL_CLIENT_S_DN_CN'

==> /var/log/foreman/production.log <==
2016-06-02 06:18:46 [app] [I]   Rendered api/v2/hosts/index.json.rabl within api/v2/layouts/index_layout (99.2ms)
2016-06-02 06:18:46 [app] [I] Completed 200 OK in 154ms (Views: 85.1ms | ActiveRecord: 36.5ms)
2016-06-02 06:18:46 [app] [I] Started PUT "/api/v2/hosts/8/disassociate" for 2620:52:0:102f:5054:1ff:fe2c:e135 at 2016-06-02 06:18:46 -0400
2016-06-02 06:18:46 [app] [I] Processing by Api::V2::HostsController#disassociate as JSON
2016-06-02 06:18:46 [app] [I]   Parameters: {"apiv"=>"v2", "id"=>"8", :host=>{}}
2016-06-02 06:18:46 [app] [I] Authorized user admin(Admin User)
2016-06-02 06:18:46 [app] [W] Action failed
 | Foreman::Exception: ERF42-5531 [Foreman::Exception]: unknown permission for api/v2/hosts#disassociate
 | /usr/share/foreman/app/controllers/api/base_controller.rb:271:in `action_permission'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.38/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb:27:in `action_permission'
 | /usr/share/foreman/app/controllers/concerns/find_common.rb:43:in `scope_for'
 | /usr/share/foreman/app/controllers/concerns/find_common.rb:33:in `resource_scope'
 | /usr/share/foreman/app/controllers/api/base_controller.rb:45:in `resource_scope'
 | /usr/share/foreman/app/controllers/concerns/find_common.rb:8:in `find_resource'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:424:in `block in make_lambda'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:143:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:143:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `block (2 levels) in halting'
 | /usr/share/foreman/app/controllers/api/v2/base_controller.rb:152:in `disable_json_root'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:424:in `block in make_lambda'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `block (2 levels) in halting'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in `around'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:447:in `public_send'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:447:in `block in make_lambda'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `block (2 levels) in halting'
 | /usr/share/foreman/app/controllers/concerns/application_shared.rb:13:in `set_timezone'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:424:in `block in make_lambda'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `block (2 levels) in halting'
 | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:424:in `block in make_lambda'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:229:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:166:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:299:in `block (2 levels) in halting'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/rails-observers-0.1.2/lib/rails/observers/action_controller/caching/sweeping.rb:73:in `around'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:447:in `public_send'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:447:in `block in make_lambda'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:298:in `block in halting'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:149:in `block in halting_and_conditional'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:86:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:86:in `run_callbacks'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/abstract_controller/callbacks.rb:19:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/rescue.rb:29:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/notifications.rb:159:in `block in instrument'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/notifications.rb:159:in `instrument'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/abstract_controller/base.rb:136:in `process'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionview-4.1.5/lib/action_view/rendering.rb:30:in `process'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal.rb:196:in `dispatch'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal/rack_delegation.rb:13:in `dispatch'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_controller/metal.rb:232:in `block in action'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/routing/route_set.rb:80:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/routing/route_set.rb:80:in `dispatch'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/routing/route_set.rb:48:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/routing/mapper.rb:45:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/journey/router.rb:71:in `block in call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/journey/router.rb:59:in `each'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/journey/router.rb:59:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/routing/route_set.rb:676:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.3.6/lib/apipie/static_dispatcher.rb:65:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.3.6/lib/apipie/extractor/recorder.rb:132:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-rails-0.3.6/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/etag.rb:23:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/conditionalget.rb:35:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
 | /usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/flash.rb:254:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in `context'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/cookies.rb:560:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/query_cache.rb:36:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/callbacks.rb:82:in `run_callbacks'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/remote_ip.rb:76:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/railties-4.1.5/lib/rails/rack/logger.rb:38:in `call_app'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/railties-4.1.5/lib/rails/rack/logger.rb:22:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/request_id.rb:21:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/runtime.rb:17:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activesupport-4.1.5/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/actionpack-4.1.5/lib/action_dispatch/middleware/static.rb:64:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/sendfile.rb:112:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/railties-4.1.5/lib/rails/engine.rb:514:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/railties-4.1.5/lib/rails/application.rb:144:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/railties-4.1.5/lib/rails/railtie.rb:194:in `public_send'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/railties-4.1.5/lib/rails/railtie.rb:194:in `method_missing'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/builder.rb:138:in `call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/urlmap.rb:65:in `block in call'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `each'
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `call'
 | /usr/share/gems/gems/passenger-4.0.18/lib/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request'
 | /usr/share/gems/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:140:in `accept_and_process_next_request'
 | /usr/share/gems/gems/passenger-4.0.18/lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop'
 | /usr/share/gems/gems/passenger-4.0.18/lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `call'
 | /opt/theforeman/tfm/root/usr/share/gems/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
2016-06-02 06:18:46 [app] [I]   Rendered api/v2/errors/standard_error.json.rabl within api/v2/layouts/error_layout (0.8ms)
2016-06-02 06:18:46 [app] [I] Completed 500 Internal Server Error in 32ms (Views: 2.1ms | ActiveRecord: 8.6ms)

Comment 1 Lukas Zapletal 2016-06-02 10:23:56 UTC
This was caused by an update in bootstrap.py:

https://github.com/Katello/katello-client-bootstrap/pull/80

So not a regression.

Comment 2 Evgeni Golov 2016-06-02 10:51:23 UTC
While this is a change in bootstrap, yes, I think the issue is in Sat6.

The request bootstrap does looks like this:

url: https://sat62.egolov.example.com:443/api/v2/hosts/16/disassociate
method: PUT
data: null
Error: The following error occured while talking to the API:
url: https://sat62.egolov.example.com:443/api/v2/hosts/16/disassociate
code: 500
error: {
  "error": {
    "message": "ERF42-5531 [Foreman::Exception]: unknown permission for api/v2/hosts#disassociate"
  }
}

Which looks pretty much correct to me? https://theforeman.org/api/1.11/apidoc/v2/hosts/disassociate.html

Comment 4 Lukas Zapletal 2016-06-02 15:17:44 UTC
Yes, I can confirm this should work. Valid API bug!

Comment 5 Ivan Necas 2016-06-03 09:38:47 UTC
Duplicate of a BZ already in post state

*** This bug has been marked as a duplicate of bug 1341149 ***