Bug 1315588 - OSTree content unit count not updating on repo details page after sync
OSTree content unit count not updating on repo details page after sync
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Container Management (Show other bugs)
Unspecified Unspecified
unspecified Severity high (vote)
: Beta
: --
Assigned To: Partha Aji
Sachin Ghai
: Triaged
Depends On:
Blocks: 1321771
  Show dependency treegraph
Reported: 2016-03-08 02:38 EST by Partha Aji
Modified: 2016-07-27 05:26 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-07-27 05:26:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
repository details page shows OSTree branch count (56.70 KB, image/png)
2016-03-31 06:19 EDT, Sachin Ghai
no flags Details
published/promoted content-view shows ostree content count (66.26 KB, image/png)
2016-03-31 06:20 EDT, Sachin Ghai
no flags Details
composite_CV also correctly shows the ostree branch count (52.49 KB, image/png)
2016-03-31 06:31 EDT, Sachin Ghai
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 11612 None None None 2016-04-22 12:08 EDT

  None (edit)
Description Partha Aji 2016-03-08 02:38:06 EST

Comment 1 Partha Aji 2016-03-08 02:38:08 EST
Created from redmine issue http://projects.theforeman.org/issues/11612
Comment 2 Partha Aji 2016-03-08 02:38:11 EST
Upstream bug assigned to paji@redhat.com
Comment 3 Partha Aji 2016-03-08 02:42:59 EST
This seemingly simple sounding bug is complicated but super important, because the following items have to be updated
1) Model level association updates between an Ostree Branch and Repo
2) Updates to search page
3) Recognition of Ostree Branch as a first class entity along similar lines to what package/package groups are for yum repos

tracking this upstream at https://github.com/Katello/katello/pull/5842 .
Comment 5 Bryan Kearney 2016-03-11 00:12:41 EST
Moving to POST since upstream bug http://projects.theforeman.org/issues/11612 has been closed
Partha Aji
Following things need to get accomplished for this

1) In a model similar to https://github.com/Katello/katello/blob/master/app/models/katello/rpm.rb add a unit for ostree. It should be simpler (nothing to index or search really since all this model will store is repository it belongs to and an integer for the units)
2) Create migrations for this table, similar to https://github.com/Katello/katello/blob/master/db/migrate/20150613134559_add_rpm.rb (again only one metadata column to be stored for now)
3) Add code to implement update_from_json method https://github.com/Katello/katello/blob/master/app/models/katello/rpm.rb#L40 
4) Add ostree references here in the index_content https://github.com/Katello/katello/blob/master/app/models/katello/glue/pulp/repo.rb#L775
5) Add entries for ostree in th content unit counts https://github.com/Katello/katello/blob/master/app/views/katello/api/v2/repositories/base.json.rabl#L14
6) Sync and make sure the numbers show up in Sync/CV Publishes and other places.
7) Also if possible in pages showing ostree units also show branches :) - extra credit

Partha Aji
Applied in changeset commit:katello|d1285151b86755eb5355fa790ebc109a4e476eae.
Comment 6 Partha Aji 2016-03-14 22:56:02 EDT
Changes in the UI for this -> https://partha.fedorapeople.org/ostree-prs/PR-5858/
Comment 8 Sachin Ghai 2016-03-31 05:57:59 EDT
Verified with sat6.2 beta snap6.

I can see OSTree content count at following places.

1. Under repository info via hammer

2. After sync, under repository details page on webUI

3. On version tab of CV, after publish/promote CV containing ostree contents

4. and OSTree units updated with OSTree branches.

Please see upcoming comments/screenshot for verification
Comment 9 Sachin Ghai 2016-03-31 06:19:17 EDT
 repository info shows OSTree content count

[root@cloud-qe-15 ~]# hammer -u admin -p changeme repository info --organization-id 1 --id 8 --product ostree
ID:                 8
Name:               f23_ostree
Label:              f23_ostree
Organization:       Default Organization
Red Hat Repository: no
Content Type:       ostree
URL:                https://dl.fedoraproject.org/pub/fedora/linux/atomic/23/
Publish Via HTTP:   no
Published At:       https://cloud-qe-15.idmqe.lab.eng.bos.redhat.com/pulp/ostree/web/Default_Organization-ostree-f23_ostree
Relative Path:      Default_Organization/Library/custom/ostree/f23_ostree
    ID:   7
    Name: ostree
GPG Key:            

    Status:         Success
    Last Sync Date: about 2 hours
Created:            2016/03/31 08:13:53
Updated:            2016/03/31 08:13:55
Content Counts:     
    OSTree Branches: 2
Comment 10 Sachin Ghai 2016-03-31 06:19 EDT
Created attachment 1142140 [details]
repository details page shows OSTree branch count
Comment 11 Sachin Ghai 2016-03-31 06:20 EDT
Created attachment 1142141 [details]
published/promoted content-view shows ostree content count
Comment 12 Sachin Ghai 2016-03-31 06:31 EDT
Created attachment 1142142 [details]
composite_CV also correctly shows the ostree branch count
Comment 13 Sachin Ghai 2016-03-31 06:32:17 EDT
Verified as per comment8.
Comment 15 errata-xmlrpc 2016-07-27 05:26:17 EDT
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.


Note You need to log in before you can comment on or make changes to this bug.