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.
Description of problem:
I got the following undocumented feature that setting the environment_id not inside the require host hash then it will be used for filtering.
See the commands below, when i specify the current environment_id in the PUT i get a result.
When i specify a different environment_id then it returns a resource not found
[prod] root@li-lp-1800:~# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999,\"environment_id\":\"71\"}" -XPUT https://localhost:443/api/v2/hosts/107 | jq .environment_id
71
[prod] root@li-lp-1800:~# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999,\"environment_id\":\"70\"}" -XPUT https://localhost:443/api/v2/hosts/107
{
"error": {"message":"Resource host not found by id '107'"}
}
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. PUT a hosts with a value of environment_id that is different from the current one, but not inside the host:{} hash
2.
3.
Actual results:
Error resource not found.
Expected results:
Value of environment_id is ignore or an error is given that an unsupported field is passed.
Additional info:
Closing, with 6.2.10 the filtering works reliable and consistent. It first uses the environment_id for filtering and then will search for the host. If the provided environment does not exists then it gives an error that does not exists
Correct environment_id and host_id
[crash/LI] root@li-lc-1578:~# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999,\"environment_id\":\"503\"}" -XPUT https://localhost:443/api/v2/hosts/3 | jq .id
3
Hosts is not in environment_id 503
[crash/LI] root@li-lc-1578:~# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999,\"environment_id\":\"503\"}" -XPUT https://localhost:443/api/v2/hosts/7
{
"error": {"message":"Resource host not found by id '7'"}
}
Environment does not exists
[crash/LI] root@li-lc-1578:~# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999,\"environment_id\":\"99503\"}" -XPUT https://localhost:443/api/v2/hosts/7
{"message":"Environment not found by id '99503'"}
Description of problem: I got the following undocumented feature that setting the environment_id not inside the require host hash then it will be used for filtering. See the commands below, when i specify the current environment_id in the PUT i get a result. When i specify a different environment_id then it returns a resource not found [prod] root@li-lp-1800:~# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999,\"environment_id\":\"71\"}" -XPUT https://localhost:443/api/v2/hosts/107 | jq .environment_id 71 [prod] root@li-lp-1800:~# curl -K /opt/hoici/etc/sat6/curl-hoici.conf "-HContent-Type: application/json" "-d{\"per_page\":9999,\"environment_id\":\"70\"}" -XPUT https://localhost:443/api/v2/hosts/107 { "error": {"message":"Resource host not found by id '107'"} } Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. PUT a hosts with a value of environment_id that is different from the current one, but not inside the host:{} hash 2. 3. Actual results: Error resource not found. Expected results: Value of environment_id is ignore or an error is given that an unsupported field is passed. Additional info: