Red Hat Bugzilla – Bug 136733
OSError exception (file already exists) during initial sync with /var/satellite mounted
Last modified: 2007-07-31 11:11:27 EDT
During the initial sync on a rhel3 satellite (with /var/satellite
mounted), satellite-sync dies with an unhandled OSError exception.
- this did *not* happen on the rhel2 satellite
- after taw added a simple try/catch statement that just passes the
exception and prints out an error message, re-running the sync command
did not raise the exception again, though the file existing that
generated the exception in the first place is still there.
18:58:17 Downloading rpm packages
18:58:17 Fetching any missing RPMs: redhat-advanced-server-i386
18:58:17 Fetching any missing RPMs: rhel-i386-as-3 (14)
+++ sending log as an email +++
SYNC ERROR: unhandled exception occurred:
(Check logs/email for potentially more detail)
[Errno 17] File exists:
The full traceback:
Exception Handler Information
Traceback (most recent call last):
File "/usr/bin/satellite-sync", line 128, in main
File "/usr/share/rhn/satellite_tools/satsync.py", line 153, in main
ret = method()
File "/usr/share/rhn/satellite_tools/satsync.py", line 241, in
self._packages_report = self.syncer.download_rpms()
File "/usr/share/rhn/satellite_tools/satsync.py", line 856, in
File "/usr/share/rhn/satellite_tools/satsync.py", line 1697, in
s = rpmManip.write_file(stream)
File "/usr/share/rhn/satellite_tools/syncLib.py", line 165, in
File "/usr/share/rhn/satellite_tools/syncLib.py", line 380, in
makedirs(path, mode=chmod, user=user, group=group)
File "/usr/share/rhn/satellite_tools/syncLib.py", line 359, in makedirs
OSError: [Errno 17] File exists:
Not an easy way to reproduce this, since it's a race condition. I was
checking for missing directories and then creating them, but it's
possible for someone else to create the dirs in the meantime.
I've added the try/except statement to catch this.
ON_DEV/QA_READY --> ON_QA (webQA and RHN Sat ISO/package push complete)
ON_DEV/QA_READY --> ON_QA (webQA and RHN Sat ISO/package push complete) REALLY!
FAILS_QAing this. Misa, is there *any* way to test this? If not...
closeit as NOTABUG. And we'll refile if it ever crops up again. It's
been a month+ now without it coming back. Probably just an oddball
Moving to PROD_READY, since I did add code to fix the potential race
condition, it's just difficult to test.
Mass move from PROD_READY to CLOSED:CURRENTRELEASE