Bug 1488475
Summary: | Specifying wrong content source id for host or hostgroup via hammer throws SQL error | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Andrii Balakhtar <abalakht> |
Component: | Content Management | Assignee: | Andrew Kofink <akofink> |
Status: | CLOSED ERRATA | QA Contact: | Mirek Długosz <mzalewsk> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.3.0 | CC: | akofink, bbuckingham, bkearney, ehelms, jhutar, mmccune, mzalewsk, pcreech, zhunting |
Target Milestone: | 6.5.0 | Keywords: | Triaged |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | hammer-cli-katello-0.13.5-1 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-05-14 12:36:36 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
Andrii Balakhtar
2017-09-05 13:27:26 UTC
Created redmine issue http://projects.theforeman.org/issues/21689 from this bug This would require a change in Foreman and across Katello potentially. It exists whenever a model has relationships to other models via foreign keys. snap 23, not 63 There are two error messages displayed: "Content Source not found" (when --content-source is passed) or "Content source with given ID not found" (when --content-source-id is passed). These are consistent with what Jan saw before fix had to be reverted. The same error messages are displayed for host create/update and hostgroup create/update. #v+ # hammer host create --name bz1488475-host-create --organization "Default Organization" --location "Default Location" --medium-id="1" --ip="1.2.3.4" --operatingsystem-id="1" --lifecycle-environment-id="1" --domain-id="1" --partition-table-id="1" --mac="40:8f:bf:b6:ca:7a" --content-view-id=1 --architecture-id=1 --root-password="testtesttest" --content-source "This does not exist" Could not create the host: Error: Content Source not found. # hammer host create --name bz1488475-host-create --organization "Default Organization" --location "Default Location" --ip="1.2.3.4" --operatingsystem-id="1" --lifecycle-environment-id="1" --domain-id="2" --partition-table-id="1" --mac="40:8f:bf:b6:ca:7a" --content-view-id=1 --architecture-id=1 --hostgroup-id 1 --root-password="testtesttest" --content-source-id=9999 Could not create the host: Content source with given ID not found # hammer host update --id 3 --content-source "This does not exist" Could not update the host: Error: Content Source not found. # hammer host update --id 3 --content-source-id=9999 Could not update the host: Content source with given ID not found # hammer hostgroup create --name bz1488475-hostgroup-create --content-source "This does not exist" Could not create the hostgroup: Error: Content Source not found. # hammer hostgroup create --name bz1488475-hostgroup-create --content-source-id 9999 Could not create the hostgroup: Content source with given ID not found # hammer hostgroup update --id 2 --content-source "This does not exist" Could not update the hostgroup: Error: Content Source not found. # hammer hostgroup update --id 2 --content-source-id 9999 Could not update the hostgroup: Content source with given ID not found #v- Version: Satellite 6.5 snap 18 tfm-rubygem-katello-3.10.0.24-1.el7sat.noarch foreman-1.20.1.10-1.el7sat.noarch pulp-server-2.18.0-0.1.rc.el7sat.noarch satellite-6.5.0-6.beta.el7sat.noarch tfm-rubygem-hammer_cli-0.15.1.1-1.el7sat.noarch tfm-rubygem-hammer_cli_csv-2.3.1-3.el7sat.noarch tfm-rubygem-hammer_cli_foreman-0.15.1-1.el7sat.noarch tfm-rubygem-hammer_cli_foreman_admin-0.0.8-3.el7sat.noarch tfm-rubygem-hammer_cli_foreman_ansible-0.1.1-3.el7sat.noarch tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3.3-5.el7sat.noarch tfm-rubygem-hammer_cli_foreman_discovery-1.0.0-3.el7sat.noarch tfm-rubygem-hammer_cli_foreman_docker-0.0.6.1-1.el7sat.noarch tfm-rubygem-hammer_cli_foreman_openscap-0.1.6-2.el7sat.noarch tfm-rubygem-hammer_cli_foreman_remote_execution-0.1.0-2.el7sat.noarch tfm-rubygem-hammer_cli_foreman_tasks-0.0.13-1.el7sat.noarch tfm-rubygem-hammer_cli_foreman_templates-0.1.2-1.el7sat.noarch tfm-rubygem-hammer_cli_foreman_virt_who_configure-0.0.3-3.el7sat.noarch tfm-rubygem-hammer_cli_katello-0.16.0.9-1.el7sat.noarch Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2019:1222 |