| Summary: | Re-running the cancelled sync on completion, should change the status from 'cancelled" to 'sync complete' | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Sachin Ghai <sghai> | ||||
| Component: | WebUI | Assignee: | Eric Helms <ehelms> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Katello QA List <katello-qa-list> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 6.0.1 | CC: | cwelton, jrist, mmccune | ||||
| Target Milestone: | Unspecified | Keywords: | Triaged | ||||
| Target Release: | Unused | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2012-08-22 18:24:36 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Bug Depends On: | |||||||
| Bug Blocks: | 786376 | ||||||
| Attachments: |
|
||||||
|
Description
Sachin Ghai
2012-02-02 10:46:55 UTC
Created attachment 559031 [details]
status remains cencelled on sync completion
starting a sync should clear the previous status.... very good catch on this one. this was a bit tricky. there were two issues which made this a bit confusing since i could not always duplicate. 1) we can't rely on order for the sync history objects that come back from pulp. we need to order them 2) we were accidentally popping the stack in our lower api layers and therefore losing the 'finished' data when the pulp list was not in order working on a fix c611fda..54db6b5 master -> master Had to revert since fix seems to have caused 790246 tried sorting the sync status history based on finish time. that seemed to fix this problem but also introduced other problems that were worse so backed it out. moving on to other bugs for now and will revisit.
diff --git a/src/app/models/glue/pulp/repo.rb b/src/app/models/glue/pulp/repo.rb
index 2cd8856..573fa59 100644
--- a/src/app/models/glue/pulp/repo.rb
+++ b/src/app/models/glue/pulp/repo.rb
-422,7 +422,7 @@ module Glue::Pulp::Repo
def sync_statuses
@sync_status = self._get_most_recent_sync_status() if @sync_status.nil?
- @sync_status
+ @sync_status.sort_by{|item| item.finish_time}.reverse
end
def sync_state
diff --git a/src/lib/resources/pulp.rb b/src/lib/resources/pulp.rb
index f714b64..035b2d6 100644
--- a/src/lib/resources/pulp.rb
+++ b/src/lib/resources/pulp.rb
-284,7 +284,7 @@ module Pulp
response = get(path, self.default_headers)
parsed = JSON.parse(response.body)
return parsed if parsed.empty?
- return parsed.first.with_indifferent_access
+ return parsed.with_indifferent_access
end
problem with above is active syncs will have a finish_time of nil so we can blindly sort just on finish_time. explains why it fixes original issue but erratically busts active syncs. Assigning to jsherrill since Shannon is no longer on the team. mass move ON_QA after brewing QA Verified: 0.1.303-1.el6 getting rid of 6.0.0 version since that doesn't exist |