Created attachment 1489034 [details] foreman-debug output Description of problem: An Error "Oops, we're sorry but something went wrong" when trying to assign organization or Location for a discovered host Version-Release number of selected component (if applicable): * candlepin-2.4.8-1.el7.noarch * candlepin-selinux-2.4.8-1.el7.noarch * foreman-1.18.0.36-1.el7sat.noarch * foreman-bootloaders-redhat-201801241201-3.el7sat.noarch * foreman-bootloaders-redhat-tftpboot-201801241201-3.el7sat.noarch * foreman-cli-1.18.0.36-1.el7sat.noarch * foreman-compute-1.18.0.36-1.el7sat.noarch * foreman-debug-1.18.0.36-1.el7sat.noarch * foreman-discovery-image-3.5.3-1.el7sat.noarch * foreman-ec2-1.18.0.36-1.el7sat.noarch * foreman-gce-1.18.0.36-1.el7sat.noarch * foreman-installer-1.18.0.1-1.el7sat.noarch * foreman-installer-katello-3.7.0.9-1.el7sat.noarch * foreman-libvirt-1.18.0.36-1.el7sat.noarch * foreman-openstack-1.18.0.36-1.el7sat.noarch * foreman-ovirt-1.18.0.36-1.el7sat.noarch * foreman-postgresql-1.18.0.36-1.el7sat.noarch * foreman-proxy-1.18.0.1-1.el7sat.noarch * foreman-proxy-content-3.7.0-8.el7sat.noarch * foreman-rackspace-1.18.0.36-1.el7sat.noarch * foreman-selinux-1.18.0.1-1.el7sat.noarch * foreman-vmware-1.18.0.36-1.el7sat.noarch * katello-3.7.0-8.el7sat.noarch * katello-ca-consumer-sat-r220-02.lab.eng.rdu2.redhat.com-1.0-6.noarch * katello-certs-tools-2.4.0-2.el7sat.noarch * katello-client-bootstrap-1.6.0-1.el7sat.noarch * katello-common-3.7.0-8.el7sat.noarch * katello-debug-3.7.0-8.el7sat.noarch * katello-default-ca-1.0-1.noarch * katello-installer-base-3.7.0.9-1.el7sat.noarch * katello-selinux-3.0.3-2.el7sat.noarch * katello-server-ca-1.0-1.noarch * katello-service-3.7.0-8.el7sat.noarch * openldap-2.4.44-15.el7_5.x86_64 * pulp-client-1.0-1.noarch * pulp-docker-plugins-3.1.4.1-1.el7sat.noarch * pulp-katello-1.0.2-5.el7sat.noarch * pulp-maintenance-2.16.4.1-1.el7sat.noarch * pulp-ostree-plugins-1.3.0-1.el7sat.noarch * pulp-puppet-plugins-2.16.4-3.el7sat.noarch * pulp-puppet-tools-2.16.4-3.el7sat.noarch * pulp-rpm-plugins-2.16.4.1-5.el7sat.noarch * pulp-selinux-2.16.4.1-1.el7sat.noarch * pulp-server-2.16.4.1-1.el7sat.noarch * python-ldap-2.4.15-2.el7.x86_64 * tfm-rubygem-ldap_fluff-0.4.7-2.el7sat.noarch * tfm-rubygem-net-ldap-0.15.0-2.el7sat.noarch How reproducible: Always Steps to Reproduce: 1. Goto Hosts > Discovered hosts 2. Select one discovered host 3. Apply action Assign Organization (or Assign Location) 4. In the dialog box: select the target organization (or Location in case of Assign Location) 5. Press submit Actual results: an error Message is displayed: Oops, we're sorry but something went wrong PG::AmbiguousColumn: ERROR: column reference "id" is ambiguous LINE 1: ...zation_id" = 1 AND "hosts"."location_id" = 2 AND (id IN ('10... ^ : SELECT "hosts"."id" FROM "hosts" LEFT OUTER JOIN "models" ON "models"."id" = "hosts"."model_id" LEFT OUTER JOIN "fact_values" ON "fact_values"."host_id" = "hosts"."id" LEFT OUTER JOIN "nics" ON "nics"."host_id" = "hosts"."id" LEFT OUTER JOIN "taxonomies" ON "taxonomies"."id" = "hosts"."location_id" AND "taxonomies"."type" IN ('Location') LEFT OUTER JOIN "taxonomies" "organizations_hosts" ON "organizations_hosts"."id" = "hosts"."organization_id" AND "organizations_hosts"."type" IN ('Organization') WHERE "hosts"."type" IN ('Host::Discovered') AND "hosts"."organization_id" = 1 AND "hosts"."location_id" = 2 AND (id IN ('10') or name IN (NULL)) ORDER BY hosts.created_at DESC Expected results: The select Organization is assigned to the discovered host Additional info: for Assign location the error message is: Oops, we're sorry but something went wrong PG::AmbiguousColumn: ERROR: column reference "id" is ambiguous LINE 1: ...zation_id" = 1 AND "hosts"."location_id" = 2 AND (id IN ('10... ^ : SELECT "hosts"."id" FROM "hosts" LEFT OUTER JOIN "models" ON "models"."id" = "hosts"."model_id" LEFT OUTER JOIN "fact_values" ON "fact_values"."host_id" = "hosts"."id" LEFT OUTER JOIN "nics" ON "nics"."host_id" = "hosts"."id" LEFT OUTER JOIN "taxonomies" ON "taxonomies"."id" = "hosts"."location_id" AND "taxonomies"."type" IN ('Location') LEFT OUTER JOIN "taxonomies" "organizations_hosts" ON "organizations_hosts"."id" = "hosts"."organization_id" AND "organizations_hosts"."type" IN ('Organization') WHERE "hosts"."type" IN ('Host::Discovered') AND "hosts"."organization_id" = 1 AND "hosts"."location_id" = 2 AND (id IN ('10') or name IN (NULL)) ORDER BY hosts.created_at DESC
Workaround: Move taxonomy during provisioning in the quick form.
Unable to reproduce with Foreman Core develop. Unable to reproduce on older snap: [root@next ~]# rpm -qa foreman katello foreman-1.18.0.14-1.el7sat.noarch katello-3.7.0-5.el7sat.noarch Installing the latest snap.
Regression created by https://bugzilla.redhat.com/show_bug.cgi?id=1593553 - see upstream tickets for more discussion.
Satellite 6.4 is now End of Life. These bus will not be fixed on the 6.4 stream. Users of Satellite should upgrade to the latest version of Satellite to get access to the most current set of bugfixes and feature improvements.
qe-test-coverage + : Covered from Ui test `test_positive_update_default_taxonomies` discovery test.