Bug 2069666
| Summary: | Passing invalid value to infrasturcture_facet search key leads to PG::InvalidTextRepresentation error | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Peter Ondrejka <pondrejk> |
| Component: | Hosts | Assignee: | Adam Ruzicka <aruzicka> |
| Status: | VERIFIED --- | QA Contact: | Lukáš Hellebrandt <lhellebr> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.11.0 | CC: | aruzicka, inecas, lhellebr, rlavi |
| Target Milestone: | 6.14.0 | Keywords: | EasyFix, Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | foreman-3.7.0 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 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
Peter Ondrejka
2022-03-29 12:28:26 UTC
Does this error occur with any search field or is this specific to the infrastructure_facet? Hello, only infrastructure_facet Based upon further review from the engineering team, this bugzilla will not be closed at this time. Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/36394 has been resolved. This is present in foreman-3.7.0. The fix seems to be already present in last snap, so this is effectively ON_QA, but moving to ON_DEV to not mess up the automation in the hope that it will properly transition to ON_QA with the release on next snap. Verified with Sat 6.14.0 snap 10.0. Using reproducer in OP, I get: * `infrastructure_facet.foreman=test` => `Error 'foreman_instance' should be one of 'true, false', but the query was 'test'` foreman_instance is the field's name in the DB - the error could have shown the key that the user actually entered but I think this is ok. * `infrastructure_facet.foreman=true` => Correct result with foreman hosts * `infrastructure_facet.smart_proxy_id=test` => `Value 'test' is not valid for field 'smart_proxy_id'` * `infrastructure_facet.smart_proxy_id=1` => Correct result with the satellite capsule itself No tracebacks anywhere. Using CLI: # hammer host list --search 'infrastructure_facet.foreman=test' 400 Bad Request 'foreman_instance' should be one of 'true, false', but the query was 'test' # hammer host list --search 'infrastructure_facet.foreman=true' ---|---------|------------------|------------|-------------|-------------------|---------------|--------------|---------------------- ID | NAME | OPERATING SYSTEM | HOST GROUP | IP | MAC | GLOBAL STATUS | CONTENT VIEW | LIFECYCLE ENVIRONMENT ---|---------|------------------|------------|-------------|-------------------|---------------|--------------|---------------------- 1 | <FQDN> | RHEL 8.8 | | 10.0.167.80 | fa:16:3e:88:20:36 | Warning | | ---|---------|------------------|------------|-------------|-------------------|---------------|--------------|---------------------- # hammer host list --search 'infrastructure_facet.smart_proxy_id=test' 400 Bad Request Value 'test' is not valid for field 'smart_proxy_id' # hammer host list --search 'infrastructure_facet.smart_proxy_id=1' [correct result] |