Bug 1315588 - OSTree content unit count not updating on repo details page after sync
Summary: OSTree content unit count not updating on repo details page after sync
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Container Management
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
high vote
Target Milestone: Unspecified
Assignee: Partha Aji
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Depends On:
Blocks: 1321771
TreeView+ depends on / blocked
Reported: 2016-03-08 07:38 UTC by Partha Aji
Modified: 2019-09-26 17:35 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-07-27 09:26:17 UTC
Target Upstream Version:

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

System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 11612 0 None None None 2016-04-22 16:08:17 UTC
Red Hat Product Errata RHBA-2016:1501 0 normal SHIPPED_LIVE Red Hat Satellite 6.2 Capsule and Server 2016-07-27 12:28:58 UTC

Description Partha Aji 2016-03-08 07:38:06 UTC

Comment 1 Partha Aji 2016-03-08 07:38:08 UTC
Created from redmine issue http://projects.theforeman.org/issues/11612

Comment 2 Partha Aji 2016-03-08 07:38:11 UTC
Upstream bug assigned to paji@redhat.com

Comment 3 Partha Aji 2016-03-08 07:42:59 UTC
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 05:12:41 UTC
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-15 02:56:02 UTC
Changes in the UI for this -> https://partha.fedorapeople.org/ostree-prs/PR-5858/

Comment 8 Sachin Ghai 2016-03-31 09:57:59 UTC
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 10:19:17 UTC
 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 10:19:56 UTC
Created attachment 1142140 [details]
repository details page shows OSTree branch count

Comment 11 Sachin Ghai 2016-03-31 10:20:50 UTC
Created attachment 1142141 [details]
published/promoted content-view shows ostree content count

Comment 12 Sachin Ghai 2016-03-31 10:31:29 UTC
Created attachment 1142142 [details]
composite_CV also correctly shows the ostree branch count

Comment 13 Sachin Ghai 2016-03-31 10:32:17 UTC
Verified as per comment8.

Comment 15 errata-xmlrpc 2016-07-27 09:26:17 UTC
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.