Bug 1466240
| Summary: | GET /docker/api/v2/containers returns SQL error when sending optional compute_resource_id | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Stanislav Tkachenko <stkachen> |
| Component: | Container Management - Runtime | Assignee: | Marek Hulan <mhulan> |
| Status: | CLOSED ERRATA | QA Contact: | Nikhil Kathole <nkathole> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.3.0 | CC: | bkearney, mhulan, nkathole, sgraessl, zhunting |
| Target Milestone: | Unspecified | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | tfm-rubygem-foreman_docker-3.1.0.1-1.fm1_14 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-02-21 16:54:37 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
Stanislav Tkachenko
2017-06-29 10:23:57 UTC
Created redmine issue http://projects.theforeman.org/issues/21893 from this bug PR available upstream Upstream bug assigned to mhulan Upstream bug assigned to mhulan Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21893 has been resolved. VERIFIED
Version tested:
Satellite 6.3 snap 31
Steps:
# curl -s -H "Content-Type: application/json" -H "Accept:application/json" -k -u "admin:changeme" -X GET -d '{"compute_resource_id": 4}' https://sat6/docker/api/v2/containers
{
"total": 1,
"subtotal": 1,
"page": 1,
"per_page": 20,
"search": null,
"sort": {
"by": null,
"order": null
},
"results": [{"command":"","compute_resource_id":4,"compute_resource_name":"docker","entrypoint":"","cpu_set":"","cpu_shares":null,"memory":"","tty":true,"attach_stdin":true,"attach_stdout":true,"attach_stderr":true,"repository_name":"centos","tag":"latest","registry_id":null,"registry_name":null,"created_at":"2018-01-10 09:56:04 UTC","updated_at":"2018-01-10 09:56:04 UTC","id":1,"name":"jovial_rosalind","uuid":"93a45905ef61e66e2e7cbdbe06724e5a7c74755355bcb734df756822a40e6451"}]
}
# curl -s -H "Content-Type: application/json" -H "Accept:application/json" -k -u "admin:changeme" -X GET -d '{"compute_resource_id": 1}' https://sat6/docker/api/v2/containers
{
"total": 0,
"subtotal": 0,
"page": 1,
"per_page": 20,
"search": null,
"sort": {
"by": null,
"order": null
},
"results": []
}
# curl -s -H "Content-Type: application/json" -H "Accept:application/json" -k -u "admin:changeme" -X GET https://sgi-uv20-01.rhts
.eng.bos.redhat.com/docker/api/v2/containers
{
"total": 1,
"subtotal": 1,
"page": 1,
"per_page": 20,
"search": null,
"sort": {
"by": null,
"order": null
},
"results": [{"command":"","compute_resource_id":4,"compute_resource_name":"docker","entrypoint":"","cpu_set":"","cpu_shares":null,"memory":"","tty":true,"attach_stdin":true,"attach_stdout":true,"attach_stderr":true,"repository_name":"centos","tag":"latest","registry_id":null,"registry_name":null,"created_at":"2018-01-10 09:56:04 UTC","updated_at":"2018-01-10 09:56:04 UTC","id":1,"name":"jovial_rosalind","uuid":"93a45905ef61e66e2e7cbdbe06724e5a7c74755355bcb734df756822a40e6451"}]
}
production.log ==>
2018-01-10 05:00:57 1a18b08c [app] [I] Started GET "/docker/api/v2/containers" for IP at 2018-01-10 05:00:57 -0500
2018-01-10 05:00:57 1a18b08c [app] [I] Processing by Api::V2::ContainersController#index as JSON
2018-01-10 05:00:57 1a18b08c [app] [I] Parameters: {"compute_resource_id"=>4, "apiv"=>"v2", "container"=>{"compute_resource_id"=>4}}
2018-01-10 05:00:57 1a18b08c [app] [I] Current user: foreman_admin (administrator)
2018-01-10 05:00:57 1a18b08c [app] [I] Authorized user admin(Admin User)
2018-01-10 05:00:57 1a18b08c [app] [I] Current user: admin (administrator)
2018-01-10 05:00:57 1a18b08c [app] [I] Expire fragment views/tabs_and_title_records-3 (0.1ms)
2018-01-10 05:00:57 1a18b08c [app] [I] Expire fragment views/tabs_and_title_records-3 (0.1ms)
2018-01-10 05:00:57 1a18b08c [app] [I] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_docker-3.1.0.1/app/views/api/v2/containers/index.json.rabl within api/v2/layouts/index_layout (8.0ms)
2018-01-10 05:00:57 1a18b08c [app] [I] Completed 200 OK in 41ms (Views: 11.3ms | ActiveRecord: 5.0ms)
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-2018:0336
|