-
Bug
-
Resolution: Fixed
-
Normal
-
Bug fixes, 2012-06-25
-
None
Since updating to the latest tag, slave.sh has failed to run:
Can't locate Carton/CLI.pm in @INC (@INC contains:
+local/lib/perl5/i486-linux-gnu-thread-multi local/lib/perl5 .
+/usr/share/perl/5.10 /usr/lib/perl/5.10) at /usr/local/bin/carton line 7.
BEGIN failed--compilation aborted at /usr/local/bin/carton line 7.
Can't locate Carton/CLI.pm in @INC (@INC contains:
+local/lib/perl5/i486-linux-gnu-thread-multi local/lib/perl5 .
+/usr/share/perl/5.10 /usr/lib/perl/5.10) at /usr/local/bin/carton line 7.
BEGIN failed--compilation aborted at /usr/local/bin/carton line 7.
/home/mbserver/musicbrainz-server/admin/cron/slave.sh: line 12: /slave.log:
+Permission denied
Fri Jul 6 19:22:02 BST 2012 : LoadReplicationChanges failed (rc=1) - see
+/slave.log
error: error creating state file /.logrotate-state: Permission denied
error: stat of /slave.log failed: No such file or directory
error: could not read state file, will not attempt to write into it
Discussed it with ianmcorvidae on IRC, and he suggested the following patch:
diff --git a/admin/cron/slave.sh b/admin/cron/slave.sh
index 0a4ce35..35495e3 100755
— a/admin/cron/slave.sh
+++ b/admin/cron/slave.sh
@@ -9,7 +9,7 @@ carton exec – ./admin/config.sh
X=${SLAVE_LOG:=$MB_SERVER_ROOT/slave.log}
X=${LOGROTATE:=/usr/sbin/logrotate --state $MB_SERVER_ROOT/.logrotate-state}
-./admin/replication/LoadReplicationChanges >> $SLAVE_LOG 2>&1 ||
{ +carton exec -- ./admin/replication/LoadReplicationChanges >> $SLAVE_LOG 2>&1 || RC=$? echo `date`" : LoadReplicationChanges failed (rc=$RC) - see $SLAVE_LOG" }This appears to have fixed the issue.