launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #16920
[Merge] lp:~wgrant/launchpad/ppa-reset-2.0-db into lp:launchpad/db-devel
William Grant has proposed merging lp:~wgrant/launchpad/ppa-reset-2.0-db into lp:launchpad/db-devel.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~wgrant/launchpad/ppa-reset-2.0-db/+merge/223395
Add new database columns to implement the Launchpad virtual builder reset protocol 2.0 for Scalingstack (described in https://docs.google.com/a/canonical.com/document/d/1SfJ9jA0_l_8iryANEkhe2HE5mMTRy-zcz6t_UBce7Vw/edit). VM resets in the new protocol are no longer synchronous during dispatching, but asynchronous before a dispatch is even considered, so we need to persist additional state.
A new protocol version enum column has been added, as well as a clean_status column to track whether a slave is currently CLEAN, DIRTY or CLEANING. Wherever the cleanliness is in question, it fails safe to DIRTY. There's also a timestamp of the most recent clean_status change, to let us more easily track when things are stuck.
https://code.launchpad.net/~wgrant/launchpad/ppa-reset-2.0-model/+merge/223396 has the initial model code, and https://code.launchpad.net/~wgrant/launchpad/ppa-reset-2.0-basics/+merge/223397 ports the virt 1.1 and non-virt protocols to the new model.
--
https://code.launchpad.net/~wgrant/launchpad/ppa-reset-2.0-db/+merge/223395
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~wgrant/launchpad/ppa-reset-2.0-db into lp:launchpad/db-devel.
=== added file 'database/schema/patch-2209-57-0.sql'
--- database/schema/patch-2209-57-0.sql 1970-01-01 00:00:00 +0000
+++ database/schema/patch-2209-57-0.sql 2014-06-17 12:41:31 +0000
@@ -0,0 +1,12 @@
+-- Copyright 2014 Canonical Ltd. This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+ALTER TABLE builder
+ ADD COLUMN clean_status integer NOT NULL DEFAULT 1,
+ ADD COLUMN vm_reset_protocol integer,
+ ADD COLUMN date_clean_status_changed timestamp without time zone
+ NOT NULL DEFAULT (CURRENT_TIMESTAMP AT TIME ZONE 'UTC');
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2209, 57, 0);
Follow ups