Bug 1283215 - Provision host by foreman1.11 fails due to wrong request
Provision host by foreman1.11 fails due to wrong request
Status: CLOSED UPSTREAM
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Discovery Plugin (Show other bugs)
Unspecified
Unspecified Unspecified
medium Severity high (vote)
: Unspecified
: --
Assigned To: Lukas Zapletal
Katello QA List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-18 08:11 EST by Yaniv Bronhaim
Modified: 2015-11-27 08:18 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-27 08:18:49 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 49073 ovirt-engine-3.6 MERGED Foreman integration: Remove 'nested' attribute from parameters dict Never
oVirt gerrit 49075 master MERGED Foreman integration: Remove 'nested' attribute from parameters dict Never

  None (edit)
Description Yaniv Bronhaim 2015-11-18 08:11:39 EST
Description of problem:

Request which used to work in Satellite 6.1 for provisioning new discovered host fails with the following error:

| Started PUT "/api/v2/discovered_hosts/mac525400452ffc" for 192.168.122.1 at 2015-11-12 04:30:01 -0500
2015-11-12 04:30:01 [app] [I] Processing by Api::V2::DiscoveredHostsController#update as JSON
2015-11-12 04:30:01 [app] [I]   Parameters: {"discovered_host"=>{"name"=>"mac525400452ffc", "hostgroup_id"=>"1", "environment_id"=>"0", "mac"=>"52:54:00:45:2f:fc", "domain_id"=>"2", "subnet_
id"=>"1", "ip"=>"192.168.105.30", "architecture_id"=>"1", "operatingsystem_id"=>"1", "medium_id"=>"8", "ptable_id"=>"67", "root_pass"=>"[FILTERED]", "host_parameters_attributes"=>[{"name"=>" 
host_ovirt_id", "value"=>"[FILTERED]", "_destroy"=>"false", "nested"=>""}, {"name"=>"compute_resource_id", "value"=>"[FILTERED]", "_destroy"=>"false", "nested"=>""}, {"name"=>"pass", "value" 
=>"[FILTERED]", "_destroy"=>"false", "nested"=>""}, {"name"=>"management", "value"=>"[FILTERED]", "_destroy"=>"false", "nested"=>""}]}, "apiv"=>"v2", "id"=>"mac525400452ffc"}
2015-11-12 04:30:01 [app] [I] Authorized user admin(Admin User)
2015-11-12 04:30:02 [app] [W] Action failed
| ActiveRecord::UnknownAttributeError: unknown attribute: nested
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_assignment.rb:88:in `block in assign_attributes'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_assignment.rb:78:in `each'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_assignment.rb:78:in `assign_attributes'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/base.rb:498:in `initialize'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/reflection.rb:183:in `new'
| /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/reflection.rb:183:in `build_association'


Using the following foreman packages:
tfm-rubygem-foreman_gutterball-0.0.1-3.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-3.el7.noarch
foreman-ovirt-1.11.0-0.develop.201510212017git2bb102b.el7.noarch
tfm-rubygem-foreman_bootdisk-6.0.0-2.fm1_10.el7.noarch
foreman-libvirt-1.11.0-0.develop.201510212017git2bb102b.el7.noarch
foreman-selinux-1.11.0-0.develop.201510071426git6234447.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.4.0-1.201510201150gitab068d9.el7.noarch
foreman-debug-1.11.0-0.develop.201510212017git2bb102b.el7.noarch
foreman-1.11.0-0.develop.201510212017git2bb102b.el7.noarch
tfm-rubygem-foreman_docker-1.4.1-2.fm1_10.el7.noarch
foreman-proxy-1.11.0-0.develop.201510201341git00875b3.el7.noarch
centos.internal.com-foreman-proxy-1.0-1.noarch
foreman-release-1.11.0-0.develop.201510212017git2bb102b.el7.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.3-4.el7.noarch
foreman-vmware-1.11.0-0.develop.201510212017git2bb102b.el7.noarch
foreman-gce-1.11.0-0.develop.201510212017git2bb102b.el7.noarch
foreman-postgresql-1.11.0-0.develop.201510212017git2bb102b.el7.noarch
centos.internal.com-foreman-client-1.0-1.noarch
centos.internal.com-foreman-proxy-client-1.0-1.noarch
tfm-rubygem-foreman_discovery-4.1.1-1.fm1_11.el7.noarch
foreman-release-scl-1-1.el7.x86_64
tfm-rubygem-foreman_hooks-0.3.9-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.8-1.el7.noarch
foreman-compute-1.11.0-0.develop.201510212017git2bb102b.el7.noarch
tfm-rubygem-foreman-tasks-0.7.6-1.fm1_10.el7.noarch

Version-Release number of selected component (if applicable):
Version 3.6.0

How reproducible:
100%

Steps to Reproduce:
1. Add new discovered host to foreman
2. Add new discovered host in ovirt-engine

Actual results:
Click OK in addhost form fails to proceed

Expected results:
In foreman production.log the above error appears

Additional info:
Same request worked properly in Satellite 6.1
Comment 1 Yaniv Bronhaim 2015-11-18 08:13:34 EST
Following foreman issue - http://projects.theforeman.org/issues/12516
Comment 2 Yaniv Bronhaim 2015-11-24 13:44:05 EST
follow http://projects.theforeman.org/issues/12566 as well
Comment 3 Lukas Zapletal 2015-11-27 08:18:49 EST
This was reported upstream, Bugzilla is only for Satellite bugs.

http://projects.theforeman.org/issues/12566

Thanks for your report, this is now fixed.

Note You need to log in before you can comment on or make changes to this bug.