Description

wikiconfig.py says about data_underlay_dir:

# Where read-only system and help page are. You might want to share
# this directory between several wikis. When you update MoinMoin,
..

On multiconfig.py _check_dircetories:

mode = os.F_OK | os.R_OK | os.W_OK | os.X_OK
..
if not (os.path.isdir(path_pages) and os.access(path_pages, mode)):

data_underlay_dir is supposed be read-only but is checked for write access too.

Steps to reproduce

  1. Set data_underlay_dir into read-only location

Example

Debian moin 1.3.4 package

data_underlay_dir = /usr/share/moin/underlay

Details

MoinMoin Version

1.3.4

OS and Version

Linux debian now

Python Version

2.3

Server Setup

apache 2

Server Details

Workaround

Use a private copy of underlay for each of your wikis.

Discussion

This is may be a documentation problem. This directory has to be writable because it contains caches that may be renewed/created. The pages themself are "read only" in the underlay dir. If they are edited they are copied into the local wiki.

"Read access" is meant for the wiki user, not for the wiki engine.

If considered a documentation issue only, then I want it to be a feature request as well: Please allow the underlay dir to be stored on read-only media and the caching parts of it to be temporarily stored somewhere else. Using Linux FHS (Linux Filesystem hierarchy Standard) I want the underlay below /usr/share/moin/data/underlay and the caching below /var/lib/moin/cache.

Imagine a huge static library published as wiki pages in a wiki farm with the underlay NFS-shared between multiple servers.

Pain

We were painfully bitten by this today after long and careful preparation to deploy a bunch of MoinMoin instances. Each instance was in different HTTP AUTH access zone and all had a shared underlay. Since the Cache data scattered into the underlay used URL prefix from arbitrary instances we ended up in a mess of life time to debug due to serveral instances working for users only partially (them not having access to URLs of all instances that the cache had references to for icons, images etc.). What a mess, I will cry myself to sleep. This happened with MoinMoin version 1.5.4.

Pain here as well

Problems here as well. Can't really share underlay between wiki instances since e.g. in underlay/pages/HelpOnMacros/cache/text_html cache there will be a href links such as <specific-wiki-instance>/FrontPage?highlight=%28powered%29. Please consider making underlay sharable between wiki instances again.

(!) Without a very detailed and concrete list of problems, a complete fix is rather unlikely to happen. Also, it should be checked (and best directly fixed) on MoinMaster wiki.


The real issue is that cache is mixed with data. Page data changes in different rate than page cache. Page data is critical, cache is not (you can delete it and recreate from the data). Cache accessed frequently, page data almost never (if the cache is effective). They should be saved in different places. For example, pages in pages/pagename/revision/number and cache in cache/text_html/pagename. With this layout, you don't need a script to clear caches, rm -rf cache is just fine. You can also put the cache on fast storage (e.g. memcached) and the data on slower storage (e.g. nfs).

Reported downstream at 334176

Plan

Make it more clear in the docs.


CategoryMoinMoinBug

MoinMoin: FeatureRequests/DontWriteToFilesInUnderlayDir (last edited 2008-06-24 08:03:19 by SamMorris)