Stuart Bishop has proposed merging lp:~stub/launchpad/pending-db-changes into 
lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  #628637 staging replication logs get lost
  https://bugs.launchpad.net/bugs/628637


Staging replication currently logs into the tree, rather than the standard 
staging log directory. This means logs get trashed when the code is updated 
which sucks for debugging.

This branch allows the replication log directory to be specified in the 
launchpad-lazr.conf. Default is the current in tree location, which is good for 
testing things locally. After the branch lands, I'll update the staging configs 
so the logs there go to the correct destination.
-- 
https://code.launchpad.net/~stub/launchpad/pending-db-changes/+merge/34744
Your team Launchpad code reviewers is requested to review the proposed merge of 
lp:~stub/launchpad/pending-db-changes into lp:launchpad.
=== modified file 'database/replication/Makefile'
--- database/replication/Makefile	2010-07-26 08:12:20 +0000
+++ database/replication/Makefile	2010-09-07 12:29:44 +0000
@@ -14,8 +14,9 @@
 # To test the staging rebuild script:
 #
 #  $ cd database/replication
-#  $ pg_dump --format=c launchpad_dev > launchpad.dump
-#  $ make stagingsetup STAGING_CONFIG=dev-staging STAGING_DUMP=launchpad.dump
+#  $ pg_dump --format=c launchpad_dev | bzip2 -c > launchpad.dump.bz2
+#  $ make stagingsetup \
+#        STAGING_CONFIG=dev-staging STAGING_DUMP=launchpad.dump.bz2
 #  $ make stagingswitch STAGING_CONFIG=dev-staging
 #
 # To restore a dogfood database:

=== modified file 'database/replication/slon_ctl.py'
--- database/replication/slon_ctl.py	2010-05-19 18:07:56 +0000
+++ database/replication/slon_ctl.py	2010-09-07 12:29:44 +0000
@@ -88,9 +88,11 @@
 
 
 def get_logfile(nickname):
+    logdir = config.database.replication_logdir
+    if not os.path.isabs(logdir):
+        logdir = os.path.normpath(os.path.join(config.root, logdir))
     return os.path.join(
-        config.root, 'database', 'replication',
-        'lpslon_%s_%s.log' % (nickname, config.instance_name))
+        logdir, 'lpslon_%s_%s.log' % (nickname, config.instance_name))
 
 
 def start(log, nodes, lag=None):

=== modified file 'lib/canonical/config/schema-lazr.conf'
--- lib/canonical/config/schema-lazr.conf	2010-08-30 00:51:55 +0000
+++ lib/canonical/config/schema-lazr.conf	2010-09-07 12:29:44 +0000
@@ -644,6 +644,11 @@
 # datatype: integer
 storm_cache_size: 500
 
+# Where database/replication/slon_ctl.py dumps its logs. Used for the
+# staging replication environment.
+# datatype: existing_directory
+replication_logdir: database/replication
+
 
 [diff]
 # The maximum size in bytes to read from the librarian to make available in

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to