Put replication set check in test suite

Bug #626584 reported by Stuart Bishop
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

When we add a new table, it needs to be linked by foreign key constraints to existing replicated tables or it needs to be added to one of the _SEED lists in database/replication/helpers.py.

If this is not done, the staging rebuild explodes. This is a problem now we are only doing a full staging rebuild once per week.

We can do the same check in our test suite, catching this error at check in time.

# Setup replication
make _replicate LPCONFIG=staging-setup LAG="0 seconds" \
           _MASTER=lpmain_staging_new _SLAVE=lpmain_staging_slave_new \
           _SLAVE_TABLESPACE=pg_default
make[1]: Entering directory `/srv/staging.launchpad.net/staging/launchpad/database/replication'
LPCONFIG currently staging-setup
# Start the slon daemon for the master.
./slon_ctl.py --lag="0 seconds" start \
                node1_node "dbname=lpmain_staging_new user=slony"
2010-08-28 19:02:17 INFO Starting node1_node slon daemon.
# Initialize the cluster and create replication sets.
./initialize.py
2010-08-28 19:02:22 ERROR public.suggestivepotemplate not in any replication set.
2010-08-28 19:02:22 CRITICAL 1 errors in replication set definitions.
make[1]: *** [_replicate] Error 1
make[1]: Leaving directory `/srv/staging.launchpad.net/staging/launchpad/database/replication'
make: *** [stagingsetup] Error 2
make: Leaving directory `/srv/staging.launchpad.net/staging/launchpad/database/replication'
Sat Aug 28 20:02:22 BST 2010 There was a problem running the stagingsetup target

Gary Poster (gary)
Changed in launchpad-foundations:
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.