During the initial sync on a rhel3 satellite (with /var/satellite mounted), satellite-sync dies with an unhandled OSError exception. Log below: Note: - 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 (NONE MISSING) 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: '/var/satellite/redhat/NULL/initscripts/7.31.18.EL-1' The full traceback: Exception Handler Information Traceback (most recent call last): File "/usr/bin/satellite-sync", line 128, in main return satsync.Runner().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 _step_rpms self._packages_report = self.syncer.download_rpms() File "/usr/share/rhn/satellite_tools/satsync.py", line 856, in download_rpms self._fetch_packages(channel, missing_fs_packages) File "/usr/share/rhn/satellite_tools/satsync.py", line 1697, in _fetch_packages s = rpmManip.write_file(stream) File "/usr/share/rhn/satellite_tools/syncLib.py", line 165, in write_file createPath(dirname) File "/usr/share/rhn/satellite_tools/syncLib.py", line 380, in createPath makedirs(path, mode=chmod, user=user, group=group) File "/usr/share/rhn/satellite_tools/syncLib.py", line 359, in makedirs os.mkdir(dirname, mode) OSError: [Errno 17] File exists: '/var/satellite/redhat/NULL/initscripts/7.31.18.EL-1'
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 race condition.
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