Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Reproducer (little bit artificial but just to trigger proper race condition):
0) in publish_step.py around 770, artificially add "sleep(2)" just to ensure proper thread interleaving occurs:
_LOG.info('bz1346816: create dir? %s, loc=%s' % (publish_dir_parent, publish_location))
if not os.path.exists(publish_dir_parent):
_LOG.info('bz1346816: new create dir %s, loc=%s' % (publish_dir_parent, publish_location))
time.sleep(2)
os.makedirs(publish_dir_parent, 0750)
_LOG.info('bz1346816: created dir %s, loc=%s' % (publish_dir_parent, publish_location))
1) Have a Sat6 custom product with 2 dummy custom repos (2 is enough, in fact)
2) Publish a content view having the 2 custom repos contained
3) Check Actions::Katello::Repository::MetadataGenerate task in WebUI and /var/log/messages
Current results:
- one such task for one of the two repos fails with "File exists" error
- /var/log/messages has the same error
Expected results:
- no such either error
Trivial patch is adding the try / except block.
Michael, could you pls. triage in upstream?
Dear team, are there any updates on the bug please?
Could someone take ownership?
We've got 2 of our largest customer affected and escalating this.
Thank you in advance for response.
Comment 14pulp-infra@redhat.com
2016-09-13 21:32:01 UTC
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.
Comment 15pulp-infra@redhat.com
2016-09-19 20:31:20 UTC
The Pulp upstream bug status is at VERIFIED. Updating the external tracker on this bug.
Comment 16pulp-infra@redhat.com
2016-09-19 21:31:42 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.
https://pulp.plan.io/issues/2047#note-11
Publishing two yum repos at the same time where their publish paths share a parent directory could produce the issue. But not always. Probably not even very frequently.
I can't reproduce it either.
When I added debugs to that code, I noticed it is executed only during syncing repos (from CDN):
Feb 24 09:43:38 pmoravec-sat62-rhel7 pulp: pulp.plugins.util.publish_step:WARNING: PavelM: publish_dir_parent=/var/lib/pulp/published/yum/https/repos/RedHat/Library/content/dist/rhel/server/7/7.2/x86_64/mrg-m/3, created it
But publishing a Content View with that repo, no such log / the method is not executed.
There must have been a change between 6.1 and 6.2 - maybe in directory structure of /var/lib/pulp or in using /var/cache/pulp/ ?
Or does Content View publish repos in a different way than before? (I dont think so, both repo sync and C.V. publish call pulp.server.managers.repo.publish.publish pulp task).
Justin, Michael, any idea why Sat6.2 (before the fix) doesnt reproduce this BZ?
(imho this information itself is sufficient for marking it verified)
I don't think anything changed about the structure from 6.1. The structure is very important to preserve because of how entitlement enforcement works.
Sorry, I have no idea why this is hard to reproduce on 6.2 specifically.
VERIFIED.
@satellite-6.2.8-4.0.el7sat.noarch
pulp-server-2.8.7.6-1.el7sat.noarch
by this manual procedure:
1. create & sync 35 repos
2. create 100 CVs comprising all these 35 repos
3. publish all 100 CVs one after another
>>> no errors were encountered when repeatedly publishing CVs with many repos
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/RHBA-2017:0447
Reproducer (little bit artificial but just to trigger proper race condition): 0) in publish_step.py around 770, artificially add "sleep(2)" just to ensure proper thread interleaving occurs: _LOG.info('bz1346816: create dir? %s, loc=%s' % (publish_dir_parent, publish_location)) if not os.path.exists(publish_dir_parent): _LOG.info('bz1346816: new create dir %s, loc=%s' % (publish_dir_parent, publish_location)) time.sleep(2) os.makedirs(publish_dir_parent, 0750) _LOG.info('bz1346816: created dir %s, loc=%s' % (publish_dir_parent, publish_location)) 1) Have a Sat6 custom product with 2 dummy custom repos (2 is enough, in fact) 2) Publish a content view having the 2 custom repos contained 3) Check Actions::Katello::Repository::MetadataGenerate task in WebUI and /var/log/messages Current results: - one such task for one of the two repos fails with "File exists" error - /var/log/messages has the same error Expected results: - no such either error Trivial patch is adding the try / except block. Michael, could you pls. triage in upstream?