Description
Category pages on all wikis within a farm, list the content of the first wiki invoked within a farm (instead of showing the content per wiki).
Steps to reproduce
Have a fresh wiki farm with one wiki at http://wiki/a and one at http://wiki/b .
- Clear the cache of all wikis ( moin --config-dir=... --wiki-url=... maint cleancache )
- Create a page within a common category in one wiki.
Example: Edit http://wiki/a/test and add
---- CategoryHomepage
Look up http://wiki/a/CategoryHomepage
- The page "test" is listed.
Look up http://wiki/b/CategoryHomepage
- The page "test" is listed, but the page never existed in this wiki.
- Clear the cache of all wikis ( moin --config-dir=... --wiki-url=... maint cleancache )
Look up http://wiki/b/CategoryHomepage first.
- The page "test" is not listed.
Look up http://wiki/a/CategoryHomepage
- The page "test" is not listed, but it exists and should be in this Category.
Example
Component selection
- general
Details
MoinMoin Version |
1.9.2 |
OS and Version |
SunOS sun 5.10 Generic_142901-05 i86pc i386 i86pc |
Python Version |
2.6.1 |
Server Setup |
Apache 2.2.11 |
Server Details |
mod_wsgi 3.2, mpm_prefork, Xapian 1.0.18 |
Language you are using the wiki in (set in the browser/UserPreferences) |
de |
some parts of farmconfig.py:
page_category_regex = ur'(?P<all>(Kategorie|Category)(?P<key>\S+))' xapian_search = True xapian_index_history = True xapian_stemming = True data_underlay_dir = '/srv/www/a-wiki/underlay/' #shared underlay
Workaround
Discussion
How did you build your xapian index?
- First of all, I found out some time ago that one needs to rebuild the index after changing page_category_regex (would be nice to get that documented).
- So my index was already newer then the last change to page_category_regex .
- As I suspected something to be wrong with the index I did rebuild it again. But from the outcome it is just the same as with "maint cleancache".
- Our local procedure is (moin_farm.py is a script to iterate through all wikis):
su - webservd /opt/moin/bin/moin_farm.py --config-dir=/srv/www/wiki index build --mode=buildnewindex #switch off wikis on root user with # svcadm disable http /opt/moin/bin/moin_farm.py --config-dir=/srv/www/wiki index build --mode=usenewindex exit svcadm enable http
Does moin_farm call the moin script with --wiki-url=<correct wiki url that can be matched via farmconfig> --config-dir=<correct config dir> for each wiki?
- I would say yes from the output and my understanding. I can do it "manually" if that helps.
The script is from http://moinmo.in/ScriptMarket/AllWikisHack . I modified it to match the recent farm configuration changes and include a mode parameter.
Hmm, not completely clear yet. Find out whether your wikis share the same xapian_index_dir or the same cache_dir. Also, we likely need your moin config files to investigate that (remove any secrets before posting them here).
- I did not configure xapian_index_dir or cache_dir, so these directories are specific per wiki:
- farmconfig.py :
wikis = [ ("a", r"^https://wiki/a.*"), ("b", r"^https://wiki/b.*"), ] from MoinMoin.config import multiconfig, url_prefix_static class FarmConfig(multiconfig.DefaultConfig): data_underlay_dir = '/srv/www/a-wiki/underlay/' url_prefix_static = '/moin_static192' url_prefix_local = '/moin_static192' url_prefix_action = 'action' superuser = [u"root", ] acl_rights_before = u"root:read,write,delete,revert,admin" surge_action_limits = { # allow max. <count> <action> requests per <dt> secs 'show': (20, 5), 'raw': (20, 5), # some people use this for css 'AttachFile': (100, 5), 'diff': (30, 60), 'fullsearch': (10, 60), 'edit': (20, 60), 'rss_rc': (5, 60), 'default': (30, 30), } surge_lockout_time = 60 # secs you get locked out when you ignore warnings edit_locking = 'lock 5' cookie_lifetime = (0, 24 ) from MoinMoin.security.autoadmin import SecurityPolicy mail_smarthost = "localhost" mail_from = u"wiki" navi_bar = [ u'RecentChanges', u'FindPage', u'HelpContents', u'%(page_front_page)s', ] theme_default = 'modernized' actions_excluded = [ 'refresh', 'LocalSiteMap', 'MyPages', 'SubscribeUser', 'Despam', 'PackagePages', 'SyncPages', 'xmlrpc', ] edit_bar = [ 'Edit', 'Comments', 'Info', 'Subscribe', 'Attachments', 'ActionsMenu', ] tz_offset = 1.0 page_credits = [ ] user_checkbox_defaults = {'show_page_trail': 0, } user_checkbox_remove = ['show_toolbar', ] language_default = 'de' page_category_regex = ur'(?P<all>(Kategorie|Category)(?P<key>\S+))' page_dict_regex = ur'(?P<all>(?P<key>\S+)Dict)' page_group_regex = ur'(?P<all>(?P<key>\S+)Group)' page_template_regex = ur'(?P<all>(?P<key>\S+)Vorlage)' supplementation_page_name = u'Diskussion' supplementation_page_template = u'DiscussionVorlage' show_hosts = False logo_string = u'<img src="' + url_prefix_static + u'/common/moinmoin.png" alt="MoinMoin Logo">' page_front_page = u"MeineStartSeite" shared_intermap = '/opt/moin/share/moin/data/intermap.txt' log_reverse_dns_lookups = False log_remote_addr = False xapian_search = True xapian_index_history = True xapian_stemming = True
- a.py :
from farmconfig import FarmConfig class Config(FarmConfig): sitename = u'A Wiki' logo_string = u'<img src="/a.png" alt="Logo">' data_dir = '/srv/www/a-wiki/data/' acl_rights_before = u"root,AdminGroup:read,write,delete,revert,admin" acl_rights_default = u"WikiGroup:read,write,delete,revert" acl_rights_after = u"All:read"
- Is there anything I can do to help in hunting this bug? (build the index in the classic way/turn off xapian/use simple config files)
Works in 1.9.3 (probably fixed with http://hg.moinmo.in/moin/1.9/rev/028f38513d8e).
Plan
- Priority:
- Assigned to:
- Status: