Bug 1548966 - [RFE] provide means to force recheck/redownload of pulp docker repos
Summary: [RFE] provide means to force recheck/redownload of pulp docker repos
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.2.13
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: 6.10.0
Assignee: satellite6-bugs
QA Contact: Lai
URL:
Whiteboard:
: 1548967 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-26 06:34 UTC by Ahmed Nazmy
Modified: 2023-09-15 00:06 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 14:08:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3363761 0 None None None 2018-05-02 18:31:03 UTC
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:08:40 UTC

Description Ahmed Nazmy 2018-02-26 06:34:52 UTC
Description of problem:

If satellite fails to save a valid docker blob on disk due to any issue (disk full, network glitch), there are not means to force rechecking of a docker repo units similar to what we have for rpm repos.

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

pulp-client-1.0-1
satellite-6.2.13-4.0.el7sat
pulp-server-2.8.7.17-1.el7sat
pulp-docker-plugins-2.0.3.1-1.el7sat
python-crane-2.0.2.1-1.el7sat

How reproducible:
Always

Steps to Reproduce:
1. Setup a small /var/cache/pulp & /var/lib/pulp to hit limits soon
2. Sync some docker repos to fill-up space
3. Error similar to below should be noticed on disk fill-up (Notice its cache that got hit first) :
~~~
Jan 18 10:54:22 satellite.example.com pulp[53455]: nectar.downloaders.threaded:ERROR: (53455-15136) [Errno 28] No space left on device: u'/var/cache/pulp/reserved_resource_worker-6.com/d11a02d8-0a35-40ae-b8f1-301aea436200/sha256:2d36a0f107a4e56b82b2052f02896e58ccabca0d539bfef3f059ebe776c43443'
~~~

4. Verify docker repo sync is marked as complete from WebUI.

5. mentioned docker_blob is has a broken symlink to a missing file on disk:
~~~
# ls -al /var/lib/pulp/published/docker/v2/master/*openshift3_metrics-hawkular*/*/blobs/sha256:2d36a0f107a4e56b82b2052f02896e58ccabca0d539bfef3f059ebe776c43443

lrwxrwxrwx. 1 apache apache   177 Feb 21 11:42 sha256:2d36a0f107a4e56b82b2052f02896e58ccabca0d539bfef3f059ebe776c43443 -> /var/lib/pulp/content/units/docker_blob/06/2fa53cb04a019956f3d7e475a25bd0e8a0b86d21bb1582e50faa2c8f3676dc/sha256:2d36a0f107a4e56b82b2052f02896e58ccabca0d539bfef3f059ebe776c43443
~~~
5. Increase  /var/cache/pulp & /var/lib/pulp disk space to accommodate more docker_blobs

6. Trying to delete/recreate/re-sync this repo doesn't fix the problem.

 
Actual results:

Satellite/pulp wrongfully report docker repo sync is complete, while actually its not, deleting, readding and resyncing the repo from WebUI doesnt actually recover the missing blobs.


Expected results:

Add CLI (hammer/pulp-admin) and WebUI functionality to force content validation for docker repos on syncing.

Comment 4 Tanya Tereshchenko 2018-05-02 18:29:24 UTC
*** Bug 1548967 has been marked as a duplicate of this bug. ***

Comment 5 Tanya Tereshchenko 2018-05-02 18:31:04 UTC
*** Bug 1548940 has been marked as a duplicate of this bug. ***

Comment 7 Marcelo Moreira de Mello 2019-03-14 22:05:31 UTC
    (Pdb) n
    NotUniqueError: NotUniqu...4d" })',)
    > /usr/lib/python2.7/site-packages/pulp_docker/plugins/importers/sync.py(367)process_main()
    -> item.save_and_import_content(os.path.join(self.get_working_dir(), item.digest))
    (Pdb) l
    362  	        :type  item: pulp.server.db.model.FileContentUnit
    363  	        """
    364  		import rpdb; rpdb.set_trace()
    365  	        item.set_storage_path(item.digest)
    366  	        try:
    367  ->	            item.save_and_import_content(os.path.join(self.get_working_dir(), item.digest))
    368  	        except NotUniqueError:
    369  	            item = item.__class__.objects.get(**item.unit_key)
    370  	        repository.associate_single_unit(self.get_repo().repo_obj, item)

Comment 8 Bryan Kearney 2019-11-04 14:03:37 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and while we recognize that it is a valid request, we do not expect this to be implemented in the product in the foreseeable future. This is due to other priorities for the product, and not a reflection on the request itself. We are therefore closing this out as WONTFIX. If you have any concerns about this, please do not reopen. Instead, feel free to contact Red Hat Technical Support. Thank you.

Comment 9 Mike McCune 2020-12-03 20:36:15 UTC
Re-opening this as the inclusion of Pulp 3 in Satellite 6.10 which uses an entirely different storage backend and database from the Pulp 2 in Satellite 6.9 and prior.

Comment 11 Lai 2021-06-17 20:12:37 UTC
I'm not even sure how to verify this since '/var/cache/pulp' and '/var/lib/pulp/published/' doesn't exist for pulp3 anymore.  Please advised on how to verify.

Comment 12 Justin Sherrill 2021-06-17 23:36:44 UTC
If you're wanting to look at the repometadata, there are two options

jsherrill | the easiest way honestly right now is to have a client pull the metadata and check its yum cache
jsherrill | the 2nd easiest way is to download the debug org certs
jsherrill | and curl the file directly specifying those certs
jsherrill | maybe they are kinda equally easy ;)


If you need more details instructions about either of those, let me know.

Comment 15 Lai 2021-08-26 14:42:54 UTC
since syslink doesn't exist anymore in the folder /var/lib/pulp/ in pulp3, that means there's no more syslink.  And if there's no more syslink in that directory, then we can't have anymore broken syslink.

Marking issue as verified on 6.10 snap 14.

Additional note:
I have created a custom docker repo and was able to sync successfully.

Comment 20 errata-xmlrpc 2021-11-16 14:08:26 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 (Moderate: Satellite 6.10 Release), 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-2021:4702

Comment 21 Red Hat Bugzilla 2023-09-15 00:06:38 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days


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