| Summary: | API call POST /katello/api/products/:id/sync fails | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Manikandan Somasundaram <msomasun> |
| Component: | API - Content | Assignee: | satellite6-bugs <satellite6-bugs> |
| Status: | CLOSED ERRATA | QA Contact: | Katello QA List <katello-qa-list> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.2.2 | CC: | andrew.schofield, bkearney, jcallaha, jomitsch, kabbott, mbacovsk, omaciel, swadeley |
| Target Milestone: | Unspecified | ||
| Target Release: | Unused | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-02-21 16:54:17 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: | |
I discussed this with Martin Bacovsky and it seems likely this is an API code issues. I wasn't able to reproduce this:
[vagrant@sat-snap-rhel7 ~]$ rpm -qa | grep satellite
satellite-6.2.6-2.0.el7sat.noarch
[vagrant@sat-snap-rhel7 ~]$ curl -X POST -k -u admin:changeme -H "Content-Type: application/json" 192.168.121.167:3000/katello/api/v2/products/2/sync
{"id":"fc11645b-b493-46dc-a2ea-0fd68c788e9c","label":"Actions::BulkAction","pending":true,"username":"admin","started_at":"2016-12-19 20:25:59 UTC","ended_at":null,"state":"planned","result":"pending","progress":0.0,"input":{"action_class":"Actions::Katello::Repository::Sync","target_ids":[1],"target_class":"Katello::Repository","args":[],"current_user_id":3,"locale":"en"},"output":{},"humanized":{"action":"Bulk action","input":null,"output":null,"errors":[]},"cli_example":null}
Verified on Satellite 6.3 Snap 8.0 ( satellite-6.3.0-11.1.beta.el7sat.noarch) and Satellite 6.2.8 Snap 3.0 (satellite-6.2.8-1.0.el7sat.noarch) Sync task completed without errors, repositories synced and have updated content-count. 2017-02-24 14:59:59 - nailgun.client - DEBUG - Making HTTP POST request to https://sat6.com/katello/api/v2/products/48/sync with options {'verify': False, 'auth': ('admin', 'changeme'), 'headers': {'content-type': 'application/json'}} and no data. 2017-02-24 15:00:01 - nailgun.client - DEBUG - Received HTTP 202 response: {"id":"0fd0c6e6-fa7a-4b8a-b50e-ccf3e2caefb2","label":"Actions::BulkAction","pending":true,"username":"admin","started_at":"2017-02-24 13:00:02 UTC","ended_at":null,"state":"planned","result":"pending"," Moving to 6.3 to track verification on that thread. 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
|
Description of problem: cu is facing an below error when they follow the documentation on the page “/apidoc/v2/products/sync.html”. Version-Release number of selected component (if applicable): Satellite 6.2 How reproducible: 1) Have a Satellite 6.2 Server 2) Add several repositories for a product, 3) Try to sync all of them using API call Actual results: Error: POST /katello/api/products/:id/sync { "displayMessage": "Organization required", "errors": [ "Organization required" ] } Expected results: Sync all repos Additional info: N/A