Bug 1425605

Summary: [RFE] As a User I want Pulp OSTree to create a new unit for each commit version on a branch
Product: Red Hat Satellite Reporter: Tom McKay <tomckay>
Component: PulpAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Kedar Bidarkar <kbidarka>
Severity: medium Docs Contact:
Priority: medium    
Version: NightlyCC: bbuckingham, bmbouter, daviddavis, dkliban, ehelms, ggainey, ipanova, kbidarka, mhrivnak, pcreech, rchan, ttereshc
Target Milestone: UnspecifiedKeywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1369892    
Attachments:
Description Flags
OSTree latest vs allhistory
none
OSTree committ details branches
none
RHEL7AH_OSTree_brnches
none
We can now sync in with "All History", "Custom Depth" instead of just "Latest" none

Description Tom McKay 2017-02-21 21:10:25 UTC
With the "depth" option pulp today can sync an ostree repo "completely" as opposed to "only the latest". However pulp only a creates a unit per branch head. For example try the following

1) edit /etc/pulp/server/plugins.conf.d/ostree_importer.json {
"depth": -1
}
restart workers ..

2) pulp-admin ostree repo create --repo-id=synthesize --feed=https://partha.fedorapeople.org/test-repos/ostree-zoo/ 
3) pulp-admin ostree repo sync run --repo-id=synthesize

4) pulp-admin ostree repo list --repo-id=synthesize --detail

notice that the content units show quantity of 2

However in reality each branch in that repo has many versions. You can notice this by try something like this

cd /var/lib/pulp/content/shared/ostree
ls -lt  # find the topmost  recent dir which is likely to be of the repo you just synced
$ ostree log --repo=<top-dir>/content fedora-atomic/f21/x86_64/updates-testing/docker-host
commit b954defc0c21b23705bf5776a78ca434b2569260e64e19fb61bdbd5526b3bf0f
Date:  2016-03-03 15:42:30 +0000
Version: 23.3

    testing

commit b5478067c6ed79acde91d09cd3effcd12885a3cc749c390735de18a91ee75c9c
Date:  2016-03-03 15:42:30 +0000
Version: 23.2

    testing

commit 0dfe48948b5ecaf74f1864b4cb43a991ac7ab7e4ca5bbab36ac30b6596d81799
Date:  2016-03-03 15:42:30 +0000
Version: 23.1

    testing
Notice there are 3 versions on just one branch.

In an ideal world pulp ostree would create a new unit per branch + commit version using history from ostree log on the branch.

Comment 4 pulp-infra@redhat.com 2017-02-21 21:31:37 UTC
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.

Comment 5 pulp-infra@redhat.com 2017-02-21 21:31:39 UTC
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.

Comment 6 Jennifer Albertson 2017-02-22 23:47:58 UTC
*** Bug 1425567 has been marked as a duplicate of this bug. ***

Comment 8 Brian Bouterse 2017-04-11 18:05:37 UTC
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.

Comment 9 pulp-infra@redhat.com 2017-04-13 17:33:23 UTC
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.

Comment 10 pulp-infra@redhat.com 2017-05-17 23:04:18 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 11 pulp-infra@redhat.com 2017-05-17 23:34:22 UTC
All upstream Pulp bugs are at MODIFIED+. Moving this bug to POST.

Comment 12 pulp-infra@redhat.com 2017-06-14 19:00:44 UTC
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.

Comment 13 pulp-infra@redhat.com 2017-06-14 19:00:47 UTC
The Pulp upstream bug priority is at High. Updating the external tracker on this bug.

Comment 14 pulp-infra@redhat.com 2017-07-31 14:46:45 UTC
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.

Comment 15 pulp-infra@redhat.com 2017-07-31 14:47:37 UTC
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.

Comment 16 pulp-infra@redhat.com 2017-08-15 14:32:01 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 17 pulp-infra@redhat.com 2017-08-15 14:32:49 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 18 Kedar Bidarkar 2018-01-30 05:36:47 UTC
We now on Satellite6 can sync an ostree repo completely using "All History" as opposed to "only the latest".

We can now set the "Upstream Sync Policy" by going to, "Products => Red Hat Enterprise Linux Atomic Host => Repositories => Red Hat Enterprise Linux Atomic Host Trees".

VERIFIED using Sat6.3.0-snap32.0

Will be attaching few screenshots shortly.

Comment 19 Kedar Bidarkar 2018-01-30 06:17:58 UTC
By adding support for depth option and passing it to libostree, users can control pulling older version. For example: depth=3 would result in pulp pulling 7.3, 7.2 and 7.1.

Comment 20 Kedar Bidarkar 2018-01-30 06:23:36 UTC
Created attachment 1388153 [details]
OSTree latest vs allhistory

Comment 21 Kedar Bidarkar 2018-01-30 06:24:26 UTC
Created attachment 1388154 [details]
OSTree committ details branches

Comment 22 Kedar Bidarkar 2018-01-30 06:25:24 UTC
Created attachment 1388155 [details]
RHEL7AH_OSTree_brnches

Comment 23 Kedar Bidarkar 2018-01-30 06:26:22 UTC
Created attachment 1388156 [details]
We can now sync in with "All History", "Custom Depth" instead of just "Latest"

Comment 24 Satellite Program 2018-02-21 16:54: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.
> 
> https://access.redhat.com/errata/RHSA-2018:0336