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.
DescriptionLukáš Hellebrandt
2023-01-19 16:30:21 UTC
Created attachment 1939182[details]
production.log
Description of problem:
When trying to `curl -X POST` to some endpoints, e.g. `/api/hosts` or `/api/users`, without specifying `-H "Content-Type: application/json"`, the call fails with 500 ISE and this backtrace:
```
2023-01-19T10:59:00 [I|app|59252892] Backtrace for 'Action failed' error (NoMethodError): undefined method `[]=' for nil:NilClass
59252892 | /usr/share/foreman/app/controllers/api/base_controller.rb:277:in `block in assign_lone_taxonomies'
59252892 | /usr/share/foreman/app/controllers/api/base_controller.rb:266:in `each'
59252892 | /usr/share/foreman/app/controllers/api/base_controller.rb:266:in `assign_lone_taxonomies'
59252892 | /usr/share/gems/gems/activesupport-6.1.7/lib/active_support/callbacks.rb:427:in `block in make_lambda'
[...]
```
Version-Release number of selected component (if applicable):
Reproduced on Sat 6.13 snap 4.0 and 7.0, Sat 6.12 snap 16.0 and Sat 6.10.5 snap 2.0 => Doesn't seem like a regression
How reproducible:
Deterministic
Steps to Reproduce:
1. # curl -uadmin:changeme -X POST https://$(hostname)/api/users -d '{"name": "test2"}'
Actual results:
{
"error": {"message":"Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs."}
}
Expected results:
{
"error": {"message":"Media type in 'Content-Type: application/x-www-form-urlencoded' is unsupported in API v2 for POST and PUT requests. Please use 'Content-Type: application/json'."}
}
Additional info:
Full traceback attached
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team. Thank you.
Thank you for your interest in Red Hat Satellite. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this feel free to contact your Red Hat Account Team. Thank you.