Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-7049

Property m.r.f.o.excludedDirectories does not exclude inner directories

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 5.5.5
    • 5.5.4
    • None
    • None
    • Basel 100, Basel 101, Basel 102
    • 5

      A directory defined in m.r.f.o.excludedDirectories is not properly excluded of the tree traversal.

      Example:
      We want to exclude rsyncstagingdir from the tree traversal because it is a temporary directory used while we refresh the light module from GIT

      -Dmagnolia.resources.filesystem.observation.excludedDirectories=META-INF,WEB-INF,cache,docroot,logs,repositories,tmp,rsyncstagingdir
      

      In Magnolia we have those exceptions where we can clearly see the directorywatcher trying to access the directory rsyncstagingdir

      2017-05-30 06:25:52,396 WARN  info.magnolia.dirwatch.DirectoryWatcher           : Unable to register all subdirectories because of the following exception:
      java.nio.file.AccessDeniedException: /var/lib/magnolia/resources/btk/webresources-sources/scss/.sass-cache/36c1b40a9aeec4dde941708c1332c8da0c87e3da/rsyncstagingdir
      	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
      	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
      	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
      	at sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:427)
      	at java.nio.file.Files.newDirectoryStream(Files.java:457)
      	at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:300)
      	at java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:322)
      	at java.nio.file.Files.walkFileTree(Files.java:2662)
      	at info.magnolia.dirwatch.DirectoryWatcher.registerRecursively(DirectoryWatcher.java:168)
      	at info.magnolia.dirwatch.DirectoryWatcher.run(DirectoryWatcher.java:230)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      Full logs: https://jira.magnolia-cms.com/secure/attachment/39398/2017-05-30-06-25-50_Magnolia_server.log

      In our context, the light module is being updated form GIT, so we expect the light module to be partially loaded, or not loaded at all. Apparently, right now, when this happens, it puts the instance in an unreachable state, leading to some incoming requests to be simply interrupted. We expect the Magnolia instance still reachable and able to handle that case gracefully.

      More details in this ticket: https://jira.magnolia-cms.com/browse/ONDEMAND-1044

        Acceptance criteria

              mmichel Maxime Michel
              nbarbe Magnolia International
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD