#3883 Log entries blocking directory removal
Closed a year ago by mikem. Opened 2 years ago by tkopecek.
tkopecek/koji issue3755a  into  master

file modified
+8
@@ -475,6 +475,10 @@ 

      try:

          os.rmdir(path)

      except OSError as e:

+         if e.errno == errno.ENOTEMPTY:

+             # try to find what is there (it could be deleted meanwhile, so it could

+             # be empty)

+             logger.error("Found these entries: %s", ', '.join(os.listdir(path)))

          if e.errno != errno.ENOENT:

              raise

  
@@ -515,6 +519,10 @@ 

                  # For now, we ignore this and proceed, but we'll still fail at

                  # the top level rmdir

                  logger.error("Unable to remove directory %s: %s" % (empty_dir, e))

+                 if e.errno == errno.ENOTEMPTY:

+                     # try to find what is there (it could be deleted meanwhile, so it could

+                     # be empty)

+                     logger.error("Found these entries: %s", ', '.join(os.listdir(empty_dir)))

                  pass

  

          if not dirs:

1 new commit added

  • additional place to log
2 years ago

I will add those all in today and report back... thanks!

So... I have been waiting for it to fail and... it's not. It seems to be working since this update every run. ;(

Is there anything here that would have changed behavior? Or is everything here debugging?

Ah yes, this helped us understand the problem but I don't think we need to merge it. #4012 is the fix to go with.

Pull-Request has been closed by mikem

a year ago
Metadata