Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Created attachment 929687[details]
A traceback from /var/log/foreman/production.log.
Description of problem:
Issuing an HTTP GET request to /katello/api/v2/systems/:uuid returns an HTTP 400 response if the requested system does not exist. This is improper: an HTTP 400 response indicates that the request uses bad syntax. Fetching a non-existent system should return an HTTP 404 error, indicating that a non-existent resource was requested.
Version-Release number of selected component (if applicable):
This behaviour has been tested against qetello02.usersys.redhat.com, which is running Satellite 6.0.4. The following software is installed:
* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.9.23-1.el6_5.noarch
* candlepin-common-1.0.1-1.el6_5.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.9.23-1.el6_5.noarch
* candlepin-tomcat6-0.9.23-1.el6_5.noarch
* elasticsearch-0.90.10-6.el6sat.noarch
* foreman-1.6.0.40-1.el6sat.noarch
* foreman-compute-1.6.0.40-1.el6sat.noarch
* foreman-gce-1.6.0.40-1.el6sat.noarch
* foreman-libvirt-1.6.0.40-1.el6sat.noarch
* foreman-ovirt-1.6.0.40-1.el6sat.noarch
* foreman-postgresql-1.6.0.40-1.el6sat.noarch
* foreman-proxy-1.6.0.28-1.el6sat.noarch
* foreman-selinux-1.6.0.9-1.el6sat.noarch
* foreman-vmware-1.6.0.40-1.el6sat.noarch
* katello-1.5.0-28.el6sat.noarch
* katello-ca-1.0-1.noarch
* katello-certs-tools-1.5.6-1.el6sat.noarch
* katello-installer-0.0.59-1.el6sat.noarch
* openldap-2.4.23-32.el6_4.1.x86_64
* pulp-katello-0.3-3.el6sat.noarch
* pulp-nodes-common-2.4.0-0.30.beta.el6sat.noarch
* pulp-nodes-parent-2.4.0-0.30.beta.el6sat.noarch
* pulp-puppet-plugins-2.4.0-0.30.beta.el6sat.noarch
* pulp-puppet-tools-2.4.0-0.30.beta.el6sat.noarch
* pulp-rpm-plugins-2.4.0-0.30.beta.el6sat.noarch
* pulp-selinux-2.4.0-0.30.beta.el6sat.noarch
* pulp-server-2.4.0-0.30.beta.el6sat.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch
* ruby193-rubygem-runcible-1.1.0-2.el6sat.noarch
How reproducible:
100%
Steps to Reproduce:
1. Issue an HTTP GET to /katello/api/v2/systems/:uuid, where the requested system does not exist.
Actual results:
An HTTP 400 response.
Expected results:
An HTTP 404 response.
Additional info:
This is an example of the message attached to one of the HTTP 400 error messages received:
{
u'displayMessage':
u'Katello::Resources::Candlepin::Consumer: 404 Resource Not Found
{"displayMessage":"Consumer with id abc123 could not be
found.","requestUuid":"5d0f64df-e373-4273-b00e-6f1977bc3865"} (GET
/candlepin/consumers/abc123)',
u'errors': [
u'Katello::Resources::Candlepin::Consumer: 404 Resource Not Found
{"displayMessage":"Consumer with id abc123 could not be
found.","requestUuid":"5d0f64df-e373-4273-b00e-6f1977bc3865"} (GET
/candlepin/consumers/abc123)'
]
}
The /systems api is deprecated in favor of the /hosts api. Satellite 6.2 embraces this in a big way by adding content and subscription attributes to the /hosts api and I have confirmed that this returns a 404 properly.
Moving this to POST to be tested against the /hsots api
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/RHBA-2016:1500
Created attachment 929687 [details] A traceback from /var/log/foreman/production.log. Description of problem: Issuing an HTTP GET request to /katello/api/v2/systems/:uuid returns an HTTP 400 response if the requested system does not exist. This is improper: an HTTP 400 response indicates that the request uses bad syntax. Fetching a non-existent system should return an HTTP 404 error, indicating that a non-existent resource was requested. Version-Release number of selected component (if applicable): This behaviour has been tested against qetello02.usersys.redhat.com, which is running Satellite 6.0.4. The following software is installed: * apr-util-ldap-1.3.9-3.el6_0.1.x86_64 * candlepin-0.9.23-1.el6_5.noarch * candlepin-common-1.0.1-1.el6_5.noarch * candlepin-scl-1-5.el6_4.noarch * candlepin-scl-quartz-2.1.5-5.el6_4.noarch * candlepin-scl-rhino-1.7R3-1.el6_4.noarch * candlepin-scl-runtime-1-5.el6_4.noarch * candlepin-selinux-0.9.23-1.el6_5.noarch * candlepin-tomcat6-0.9.23-1.el6_5.noarch * elasticsearch-0.90.10-6.el6sat.noarch * foreman-1.6.0.40-1.el6sat.noarch * foreman-compute-1.6.0.40-1.el6sat.noarch * foreman-gce-1.6.0.40-1.el6sat.noarch * foreman-libvirt-1.6.0.40-1.el6sat.noarch * foreman-ovirt-1.6.0.40-1.el6sat.noarch * foreman-postgresql-1.6.0.40-1.el6sat.noarch * foreman-proxy-1.6.0.28-1.el6sat.noarch * foreman-selinux-1.6.0.9-1.el6sat.noarch * foreman-vmware-1.6.0.40-1.el6sat.noarch * katello-1.5.0-28.el6sat.noarch * katello-ca-1.0-1.noarch * katello-certs-tools-1.5.6-1.el6sat.noarch * katello-installer-0.0.59-1.el6sat.noarch * openldap-2.4.23-32.el6_4.1.x86_64 * pulp-katello-0.3-3.el6sat.noarch * pulp-nodes-common-2.4.0-0.30.beta.el6sat.noarch * pulp-nodes-parent-2.4.0-0.30.beta.el6sat.noarch * pulp-puppet-plugins-2.4.0-0.30.beta.el6sat.noarch * pulp-puppet-tools-2.4.0-0.30.beta.el6sat.noarch * pulp-rpm-plugins-2.4.0-0.30.beta.el6sat.noarch * pulp-selinux-2.4.0-0.30.beta.el6sat.noarch * pulp-server-2.4.0-0.30.beta.el6sat.noarch * python-ldap-2.3.10-1.el6.x86_64 * ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch * ruby193-rubygem-runcible-1.1.0-2.el6sat.noarch How reproducible: 100% Steps to Reproduce: 1. Issue an HTTP GET to /katello/api/v2/systems/:uuid, where the requested system does not exist. Actual results: An HTTP 400 response. Expected results: An HTTP 404 response. Additional info: This is an example of the message attached to one of the HTTP 400 error messages received: { u'displayMessage': u'Katello::Resources::Candlepin::Consumer: 404 Resource Not Found {"displayMessage":"Consumer with id abc123 could not be found.","requestUuid":"5d0f64df-e373-4273-b00e-6f1977bc3865"} (GET /candlepin/consumers/abc123)', u'errors': [ u'Katello::Resources::Candlepin::Consumer: 404 Resource Not Found {"displayMessage":"Consumer with id abc123 could not be found.","requestUuid":"5d0f64df-e373-4273-b00e-6f1977bc3865"} (GET /candlepin/consumers/abc123)' ] }