Koha/misc/migration_tools
Marcel de Rooy 07de37f0e5 Bug 11078: QA Follow-up for missing file permissions on lockfile
The original patch creates a lockfile in the ZEBRA_LOCKDIR.
It can fall back to /var/lock or even /tmp.
If the create fails, it dies. This can be considered as very
exceptional.

This followup adjusts the fallback location in /var/lock or /tmp
slightly.  It appends the database name to the folder in order to
prevent interfering between multiple Koha instances. Creation of the
lockfile has been moved to a subroutine extending directory and file
creation testing.

In the very unlikely case that we cannot create the lockfile (after
three separate tries), this follow-up allows you to continue instead
of die.  This is just as we did before we had file locking here. Every
time skipping a reindex could cause more harm than continuing and
having the race condition once in a while.

Test plan:
Test adding and removing lockdir from your koha-conf.xml. Check fallback.
Note that fallback in /var/lock or /tmp must contain database name.
Remove the lockdir config line and remove permissions from fallback. In
this case the reindex should continue but with a warning.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Tested with daemon and one-off invocation simultaneously.
Tested new wait parameter.
Tried all variations of lock directory (changing permissions etc.)

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-02-28 22:22:47 +00:00
..
22_to_30 Bug 6752: Be stricter with utf-8 encoding of output 2012-01-27 12:11:06 +01:00
build_oai_sets.pl Bug 6440: Implement OAI-PMH Sets 2012-03-20 11:38:26 +01:00
buildCOUNTRY.pl Convert to UTF-8. 2010-05-06 17:58:24 -04:00
buildEDITORS.pl Bug 2505 - Add commented use warnings where missing in the misc/ directory 2010-04-21 20:26:44 +12:00
buildLANG.pl Convert to UTF-8. 2010-05-06 17:58:24 -04:00
bulkmarcimport.pl Bug 11096: support the retrieval of large MARCXML records 2014-02-28 19:50:09 +00:00
checkNonIndexedBiblios.pl Bug 6566 Checking if DB's records are properly indexed 2012-07-06 17:11:39 +02:00
create_analytical_rel.pl Bug 5528: Analytic records support 2011-10-13 10:03:39 +13:00
fix_onloan.pl Bug 2505 - Add commented use warnings where missing in the misc/ directory 2010-04-21 20:26:44 +12:00
koha-svc.pl Bug 7213 : Follow up fixing license information 2012-05-15 15:44:33 +02:00
merge_authority.pl 6094 Fixing ModAuthority problems 2011-10-20 11:28:53 +13:00
rebuild_solr.pl Bug 8233 : SearchEngine: Add a Koha::SearchEngine module 2012-07-06 16:51:58 +02:00
rebuild_zebra.pl Bug 11078: QA Follow-up for missing file permissions on lockfile 2014-02-28 22:22:47 +00:00
rebuild_zebra_sliced.sh Bug 8746 [Follow-up] Replace == by eq in string comparison 2013-04-21 09:23:23 -04:00
remove_unused_authorities.pl Bug 11417: make sure remove_unused_authorities.pl accepts --test 2013-12-19 15:09:18 +00:00
switch_marc21_series_info.pl bug 5608 follow-up: exit immediately if UNIMARC 2013-03-21 22:15:56 -04:00
upgradeitems.pl (bug #4518) enhance 2.2 to 3.0 scripts 2011-11-16 17:48:24 +01:00