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))
_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
- one such task for one of the two repos fails with "File exists" error
- /var/log/messages has the same error
- no such either error
Trivial patch is adding the try / except block.
Michael, could you pls. triage in upstream?
Morning, could you update this BZ please.
Some progress made? We have a customer hitting this BZ that ended up due to this bug in many repos being empty..
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.
The Pulp upstream bug status is at POST. Updating the external tracker on this bug.
The Pulp upstream bug status is at MODIFIED. Updating the external tracker on this bug.
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.
The Pulp upstream bug status is at ON_QA. Updating the external tracker on this bug.
The Pulp upstream bug status is at VERIFIED. Updating the external tracker on this bug.
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.
Hi, after check that maybe it will be a new Satellite version 6.1.z, is it possible to include it in the next version 6.1.10 or 6.1.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.
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.