~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to database/replication/new-slave.py

  • Committer: Aaron Bentley
  • Date: 2010-07-08 20:50:49 UTC
  • mfrom: (11095 launchpad)
  • mto: This revision was merged to the branch mainline in revision 11215.
  • Revision ID: aaron@canonical.com-20100708205049-74zvsyu5ugkj5cke
Merged stable into force-aptitude.

Show diffs side-by-side

added added

removed removed

Lines of Context:
188
188
 
189
189
    script += dedent("""\
190
190
        } on error { echo 'Failed.'; exit 1; }
 
191
 
 
192
        echo 'You may need to restart the Slony daemons now. If the first';
 
193
        echo 'of the following syncs passes then there is no need.';
191
194
        """)
192
195
 
193
196
    full_sync = []
200
203
            wait for event (
201
204
                origin = @%(nickname)s, confirmed=ALL,
202
205
                wait on = @%(nickname)s, timeout=0);
 
206
            echo 'Ok. Replication syncing fine with new node.';
203
207
            """ % {'nickname': nickname}))
204
208
    full_sync = '\n'.join(full_sync)
205
209
    script += full_sync
210
214
        subscribe set (
211
215
            id=%d, provider=@master_node, receiver=@new_node, forward=yes);
212
216
        echo 'Waiting for subscribe to start processing.';
 
217
        echo 'This will block on long running transactions.';
213
218
        sync (id = @master_node);
214
219
        wait for event (
215
220
            origin = @master_node, confirmed = ALL,