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 1283215 - Provision host by foreman1.11 fails due to wrong request
Summary: Provision host by foreman1.11 fails due to wrong request
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Discovery Plugin
Version: Unspecified
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-18 13:11 UTC by Yaniv Bronhaim
Modified: 2019-09-26 13:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-27 13:18:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 49073 0 ovirt-engine-3.6 MERGED Foreman integration: Remove 'nested' attribute from parameters dict Never
oVirt gerrit 49075 0 master MERGED Foreman integration: Remove 'nested' attribute from parameters dict Never

Description Yaniv Bronhaim 2015-11-18 13:11:39 UTC
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 13:13:34 UTC
Following foreman issue - http://projects.theforeman.org/issues/12516

Comment 2 Yaniv Bronhaim 2015-11-24 18:44:05 UTC
follow http://projects.theforeman.org/issues/12566 as well

Comment 3 Lukas Zapletal 2015-11-27 13:18:49 UTC
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.