Bug 1452149

Summary: Docker repository not immediately available on local registry after sync
Product: Red Hat Satellite Reporter: Roman Plevka <rplevka>
Component: Container Management - ContentAssignee: Tom McKay <tomckay>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.9CC: bbuckingham, bkearney, sgraessl, tomckay
Target Milestone: UnspecifiedKeywords: 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-04-26 19:18:50 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:

Description Roman Plevka 2017-05-18 12:37:45 UTC
Description of problem:
After syncing a docker repository using hammer:
`hammer repository synchronize --id="666"`
the `repository info` subcommand reports sync status as success and reports 
'published at: sat6.server.com:5000/foo-bar-baz,

however, if you try to pull the repo using docker: `docker pull sat6.server.com:5000/foo-bar-baz`, you'll get:

Using default tag: latest
Trying to pull repository sat6.server.com:5000/foo-bar-baz ... 
unknown: Not Found

satellite takes some time before the repo is really available.
I believe, the sync task should finish AFTER the repo is really available.

Version-Release number of selected component (if applicable):
6.2.9

How reproducible:
always on pulling the repo just after syncing it.

Steps to Reproduce:
1. hammer repository create --product-id="1" --docker-upstream-name="busybox" --name="foo" --publish-via-http="true" --url="https://registry-1.docker.io" --content-type="docker"
2. hammer repository synchronize --id=1
3. (on a docker host with katello consumer ca installed): docker pull sat6-server.com:5000/foo-bar-baz

Actual results:
unknown: Not Found

Expected results:
repo available and pull finishes successfully

Additional info:
workaround: give satellite some time to publish the repo.

Comment 4 Tom McKay 2017-06-12 11:49:16 UTC
Created redmine issue http://projects.theforeman.org/issues/19982 from this bug

Comment 6 Tom McKay 2017-06-14 12:34:25 UTC
Work around: https://github.com/pulp/crane/blob/master/docs/index.rst#configuration Change the data_dir_polling_interval to a value less than 60 seconds.