-
Bug
-
Resolution: Done
-
Normal
-
None
-
6.14.0
-
False
-
-
False
-
CLOSED
-
1,200
-
True
-
Phoenix
-
-
-
Sprint 117, Sprint 118, Sprint 119
-
Moderate
Description of problem:
When trying to undate the host with hammer CLI return Internal Server Error: the server was unable to finish the request, host update finished with status 70, Could not update the host.
It was working in 6.13.z
Version-Release number of selected component (if applicable):
Stream / Satellite 6.14.0
How reproducible:
Always
Steps to Reproduce:
1. Create a valid scap content
2. Import Ansible role theforeman.foreman_scap_client
3. Import Ansible Variables needed for the role
4. Create a scap policy with anisble as deploy option
5. Associate the policy with a hostgroup
6. Provision a host using the hostgroup
7. Configure REX and associate the Ansible role to created host, use the hammer update command (given in additional info)
8. Play roles for the host
Actual results:
hammer host update command failed
Expected results:
hammer host update command should pass
Additional info:
Hammer CLI command:
- hammer -v -u admin -p changeme --output=csv host update --name="ip-fqdn.redhat.com" --lifecycle-environment="urzXBujvWt" --content-view="WzBKliTpuX" --hostgroup="SFWzWDhtNG" --openscap-proxy-id="1" --organization="sZWBzlmbVQlV" --ansible-role-ids="1" '
------production.log-------
....
2023-05-31T12:00:02 [I|app|110ed532] Authorized user admin(Admin User)
2023-05-31T12:00:02 [I|app|110ed532] Rendered api/v2/hosts/index.json.rabl within api/v2/layouts/index_layout (Duration: 65.8ms | Allocations: 30874)
2023-05-31T12:00:02 [I|app|110ed532] Rendered layout api/v2/layouts/index_layout.json.erb (Duration: 71.5ms | Allocations: 37500)
2023-05-31T12:00:02 [I|app|110ed532] Completed 200 OK in 203ms (Views: 53.2ms | ActiveRecord: 36.3ms | Allocations: 50860)
2023-05-31T12:00:02 [I|app|dd2e33e2] Started PUT "/api/hosts/6" for 10.0.168.199 at 2023-05-31 12:00:02 -0400
2023-05-31T12:00:02 [I|app|dd2e33e2] Processing by Api::V2::HostsController#update as JSON
2023-05-31T12:00:02 [I|app|dd2e33e2] Parameters: {"organization_id"=>5, "host"=>{"name"=>"ip-10-0-167-62.rhos-01.prod.psi.rdu2.redhat.com", "openscap_proxy_id"=>1, "hostgroup_id"=>4, "content_facet_attributes"=>
, "subscription_facet_attributes"=>{}, "ansible_role_ids"=>[1]}, "apiv"=>"v2", "id"=>"6"}
2023-05-31T12:00:02 [I|app|dd2e33e2] Authorized user admin(Admin User)
2023-05-31T12:00:02 [I|app|dd2e33e2] set_up_content_view_environment: cv_id=7, env_id=7
2023-05-31T12:00:03 [I|app|dd2e33e2] set_up_content_view_environment: done
2023-05-31T12:00:03 [W|app|dd2e33e2] Action failed
2023-05-31T12:00:03 [I|app|dd2e33e2] Backtrace for 'Action failed' error (ActiveModel::UnknownAttributeError): unknown attribute 'content_view_id' for Katello::Host::ContentFacet.
dd2e33e2 | /usr/share/gems/gems/activemodel-6.1.7.3/lib/active_model/attribute_assignment.rb:51:in `_assign_attribute'
dd2e33e2 | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/attribute_assignment.rb:21:in `block in _assign_attributes'
dd2e33e2 | /usr/share/gems/gems/activerecord-6.1.7.3/lib/active_record/attribute_assignment.rb:13:in `each'
.....
.....
dd2e33e2 | /usr/share/gems/gems/puma-6.2.2/lib/puma/thread_pool.rb:147:in `block in spawn_thread'
dd2e33e2 | /usr/share/gems/gems/logging-2.3.1/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
2023-05-31T12:00:03 [I|app|dd2e33e2] Rendered api/v2/errors/custom_error.json.rabl within api/v2/layouts/error_layout (Duration: 10.7ms | Allocations: 6329)
2023-05-31T12:00:03 [I|app|dd2e33e2] Rendered layout api/v2/layouts/error_layout.json.erb (Duration: 18.5ms | Allocations: 12542)
2023-05-31T12:00:03 [I|app|dd2e33e2] Completed 500 Internal Server Error in 212ms (Views: 19.1ms | ActiveRecord: 18.5ms | Allocations: 48535)
2023-05-31T12:00:09 [I|app|] Rails cache backend: File
......