Hide Forgot
Description of problem: The API call /katello/api/repositories/:id/import_uploads is performed async but doesn't return a taskid so we can't monitor its progress. Version-Release number of selected component (if applicable): 6.1.8 How reproducible: Always. Expected results: The call should return a taskid so we can monitor the status.
Hi Andrew, thank you for raising the bugzilla. In the API referenced, it actually executes the request using a synch task versus an async one. As a result, when the API returns the request should be completed; therefore, no monitoring of the task should be needed. e.g. sync_task(::Actions::Katello::Repository::ImportUpload, @repository, upload_id) Based upon this, I am going to close this bugzilla; however, please feel free to reopen if you are not seeing the expected behavior.
There is sample code that illustrates the issue. Can this be evaluated relative to the code posted?
I tried several times to reproduce but was unable to. Even when I was calling the api to add the puppet module to the content view within 2 seconds after getting a response from import_uploads, it seemed to work fine (see the log output below). If we can get a foreman-debug output or /var/log/foreman/production.log output, that would help us to debug the problem. 2016-06-28 15:02:13 [I] Processing by Katello::Api::V2::RepositoriesController#import_uploads as application/json;version=2 2016-06-28 15:02:17 [I] Completed 200 OK in 3895ms (Views: 0.8ms | ActiveRecord: 95.2ms) 2016-06-28 15:02:17 [I] Processing by Katello::Api::V2::ContentUploadsController#destroy as application/json;version=2 2016-06-28 15:02:17 [I] Completed 200 OK in 64ms (Views: 1.0ms | ActiveRecord: 9.9ms) 2016-06-28 15:02:19 [I] Processing by Katello::Api::V2::ContentViewPuppetModulesController#create as application/json;version=2 2016-06-28 15:02:19 [I] Completed 200 OK in 253ms (Views: 82.6ms | ActiveRecord: 0.7ms)
Hi Andrew, would you be able to share a foreman-debug? See comment 5. Thanks!
This is pending an internal retest.
Seems like specific to repositories API.
Hello Andrew, any updates on the re-test? If not, should we close the bugzilla and later re-open if/when it is reproduced?
I emailed with Andrew, here is hte response: <Andrew> This can be closed out. The reporter hasn't been able to supply me with steps to replicate. Again, this was against 6.1 we're 6.2 now. If I see this as an issue again I can re-raise (I have code which uses this for puppet modules and I've not seen an issue). </Andrew>