[Bucardo-general] Failed validation
Michelle Sullivan
michelle at sorbs.net
Fri Jan 24 01:37:53 UTC 2014
Was patching this but found another issue...
Here's the patch...
--- Bucardo-4.99.10_1/Bucardo.pm 2013-12-02 06:35:34.000000000 +0000
+++ Bucardo-patched/Bucardo.pm 2014-01-24 00:46:17.000000000 +0000
@@ -6318,12 +6318,15 @@
## Carve out some known exceptions (but still warn
about them)
## Allowed: varchar == text
## Allowed: timestamp* == timestamp*
+ ## Allowed: varchar(x) = varchar(y) where x > y
if (
($scol->{ftype} eq 'character varying' and
$fcol->{ftype} eq 'text')
or
($scol->{ftype} eq 'text' and $fcol->{ftype} eq
'character varying')
or
($scol->{ftype} =~ /^timestamp/ and
$fcol->{ftype} =~ /^timestamp/)
+ or
+ ($scol->{ftype} =~ /^character varying\((\d+)\)/
and $fcol->{ftype} =~ /^character varying\((\d+)\)/ and $1 > $2)
) {
my $msg = qq{Source database for sync
"$syncname" has column "$colname" of table "$t" as type
"$scol->{ftype}", but target database "$dbname" has a type of
"$fcol->{ftype}". You should really fix that.};
$self->glog("Warning: $msg", LOG_WARN);
michelle at corkscrew:~$ bucardo validate sync rt3db
Validating sync rt3db ... OK
michelle at corkscrew:~$ bucardo activate rt3db
Activating sync rt3db
michelle at corkscrew:~$ bucardo reload rt3db
.
.
(28433) [Fri Jan 24 01:10:01 2014] MCP Cannot reload: sync "rt3db" is
not active
.
michelle at corkscrew:~$ sudo bucardo stop
[sudo] password for michelle:
Creating /sorbs/bucardo/bucardo.stop ... Done
michelle at corkscrew:~$ sudo bucardo start
Checking for existing processes
Removing /sorbs/bucardo/bucardo.stop
Starting Bucardo
.
.
(29015) [Fri Jan 24 01:14:04 2014] MCP Activating sync "rt3db"
(29015) [Fri Jan 24 01:14:04 2014] MCP Running validate_sync on "rt3db"
(29015) [Fri Jan 24 01:14:04 2014] MCP Connecting to database
"rt3_corkscrew" (source)
(29015) [Fri Jan 24 01:14:04 2014] MCP DSN:
dbi:Pg:dbname=rt3;host=corkscrew.sorbs.net
(29015) [Fri Jan 24 01:14:04 2014] MCP DB "rt3_corkscrew" Local epoch:
1390526044.86759 DB epoch: 1390526044.86762
(29015) [Fri Jan 24 01:14:04 2014] MCP DB "rt3_corkscrew" Local time:
Fri Jan 24 01:14:04 2014 DB time: 2014-01-24 01:14:04.867617+00
(29015) [Fri Jan 24 01:14:04 2014] MCP DB "rt3_corkscrew" Local
timezone: UTC (+0000) DB timezone: UTC
(29015) [Fri Jan 24 01:14:04 2014] MCP DB "rt3_corkscrew" Postgres
version: 80410
(29015) [Fri Jan 24 01:14:04 2014] MCP DB "rt3_corkscrew" Database port:
5432
(29015) [Fri Jan 24 01:14:04 2014] MCP DB "rt3_corkscrew" Database host:
corkscrew.sorbs.net
(29015) [Fri Jan 24 01:14:04 2014] MCP Connecting to database
"rt4br_corkscrew" (target)
(29015) [Fri Jan 24 01:14:04 2014] MCP DSN:
dbi:Pg:dbname=rt4;host=corkscrew.sorbs.net
(29015) [Fri Jan 24 01:14:04 2014] MCP DB "rt4br_corkscrew" Local epoch:
1390526044.87601 DB epoch: 1390526044.87603
(29015) [Fri Jan 24 01:14:04 2014] MCP DB "rt4br_corkscrew" Local time:
Fri Jan 24 01:14:04 2014 DB time: 2014-01-24 01:14:04.876034+00
(29015) [Fri Jan 24 01:14:04 2014] MCP DB "rt4br_corkscrew" Local
timezone: UTC (+0000) DB timezone: UTC
(29015) [Fri Jan 24 01:14:04 2014] MCP DB "rt4br_corkscrew" Postgres
version: 80410
(29015) [Fri Jan 24 01:14:04 2014] MCP DB "rt4br_corkscrew" Database
port: 5432
(29015) [Fri Jan 24 01:14:04 2014] MCP DB "rt4br_corkscrew" Database
host: corkscrew.sorbs.net
(29015) [Fri Jan 24 01:14:04 2014] MCP Connecting to database
"rt4br_galaxi" (target)
(29015) [Fri Jan 24 01:14:04 2014] MCP DSN:
dbi:Pg:dbname=rt4;host=galaxi.sorbs.net
(29015) [Fri Jan 24 01:14:05 2014] MCP DB "rt4br_galaxi" Local epoch:
1390526045.48699 DB epoch: 1390526197.75905
(29015) [Fri Jan 24 01:14:05 2014] MCP DB "rt4br_galaxi" Local time: Fri
Jan 24 01:14:05 2014 DB time: 2014-01-24 01:16:37.759051+00
(29015) [Fri Jan 24 01:14:05 2014] MCP DB "rt4br_galaxi" Local timezone:
UTC (+0000) DB timezone: UTC
(29015) [Fri Jan 24 01:14:05 2014] MCP DB "rt4br_galaxi" Postgres
version: 80410
(29015) [Fri Jan 24 01:14:05 2014] MCP DB "rt4br_galaxi" Database port: 5432
(29015) [Fri Jan 24 01:14:05 2014] MCP DB "rt4br_galaxi" Database host:
galaxi.sorbs.net
(29015) [Fri Jan 24 01:14:05 2014] MCP Connecting to database
"rt4br_gemini" (target)
(29015) [Fri Jan 24 01:14:05 2014] MCP DSN:
dbi:Pg:dbname=rt4;host=gemini.sorbs.net
(29015) [Fri Jan 24 01:14:06 2014] MCP DB "rt4br_gemini" Local epoch:
1390526046.40031 DB epoch: 1390526118.05991
(29015) [Fri Jan 24 01:14:06 2014] MCP DB "rt4br_gemini" Local time: Fri
Jan 24 01:14:06 2014 DB time: 2014-01-24 01:15:18.059912+00
(29015) [Fri Jan 24 01:14:06 2014] MCP DB "rt4br_gemini" Local timezone:
UTC (+0000) DB timezone: UTC
(29015) [Fri Jan 24 01:14:06 2014] MCP DB "rt4br_gemini" Postgres
version: 80410
(29015) [Fri Jan 24 01:14:06 2014] MCP DB "rt4br_gemini" Database port: 5432
(29015) [Fri Jan 24 01:14:06 2014] MCP DB "rt4br_gemini" Database host:
gemini.sorbs.net
(29015) [Fri Jan 24 01:14:06 2014] MCP Connecting to database
"rt4br_helix" (target)
(29015) [Fri Jan 24 01:14:06 2014] MCP DSN:
dbi:Pg:dbname=rt4;host=helix.sorbs.net
(29015) [Fri Jan 24 01:14:06 2014] MCP DB "rt4br_helix" Local epoch:
1390526046.7106 DB epoch: 1390526046.71072
(29015) [Fri Jan 24 01:14:06 2014] MCP DB "rt4br_helix" Local time: Fri
Jan 24 01:14:06 2014 DB time: 2014-01-24 01:14:06.710721+00
(29015) [Fri Jan 24 01:14:06 2014] MCP DB "rt4br_helix" Local timezone:
UTC (+0000) DB timezone: UTC
(29015) [Fri Jan 24 01:14:06 2014] MCP DB "rt4br_helix" Postgres
version: 80410
(29015) [Fri Jan 24 01:14:06 2014] MCP DB "rt4br_helix" Database port: 5432
(29015) [Fri Jan 24 01:14:06 2014] MCP DB "rt4br_helix" Database host:
helix.sorbs.net
(29015) [Fri Jan 24 01:14:16 2014] MCP Inspecting source table
"public.customfields" on database "rt3_corkscrew"
(29015) [Fri Jan 24 01:14:16 2014] MCP Inspecting target table
"public.customfields" on database "rt4br_corkscrew"
(29015) [Fri Jan 24 01:14:16 2014] MCP Warning: Source database for sync
"rt3db" has column "pattern" of table "public.customfields" as type
"character varying(255)", but target database "rt4br_corkscrew" has a
type of "character varying(65536)". You should really fix that.
(29015) [Fri Jan 24 01:14:16 2014] MCP Warning: Target database has
column "basedon" on table "public.customfields", but source database
does not
(29015) [Fri Jan 24 01:14:16 2014] MCP Warning: Target database has
column "rendertype" on table "public.customfields", but source database
does not
(29015) [Fri Jan 24 01:14:16 2014] MCP Warning: Target database has
column "valuesclass" on table "public.customfields", but source database
does not
(29015) [Fri Jan 24 01:14:16 2014] MCP Inspecting target table
"public.customfields" on database "rt4br_galaxi"
(29015) [Fri Jan 24 01:14:16 2014] MCP Warning: Source database for sync
"rt3db" has column "pattern" of table "public.customfields" as type
"character varying(255)", but target database "rt4br_galaxi" has a type
of "character varying(65536)". You should really fix that.
(29015) [Fri Jan 24 01:14:16 2014] MCP Warning: Target database has
column "basedon" on table "public.customfields", but source database
does not
(29015) [Fri Jan 24 01:14:16 2014] MCP Warning: Target database has
column "rendertype" on table "public.customfields", but source database
does not
(29015) [Fri Jan 24 01:14:16 2014] MCP Warning: Target database has
column "valuesclass" on table "public.customfields", but source database
does not
(29015) [Fri Jan 24 01:14:16 2014] MCP Inspecting target table
"public.customfields" on database "rt4br_gemini"
(29015) [Fri Jan 24 01:14:16 2014] MCP Warning: Source database for sync
"rt3db" has column "pattern" of table "public.customfields" as type
"character varying(255)", but target database "rt4br_gemini" has a type
of "character varying(65536)". You should really fix that.
(29015) [Fri Jan 24 01:14:16 2014] MCP Warning: Target database has
column "basedon" on table "public.customfields", but source database
does not
(29015) [Fri Jan 24 01:14:16 2014] MCP Warning: Target database has
column "rendertype" on table "public.customfields", but source database
does not
(29015) [Fri Jan 24 01:14:16 2014] MCP Warning: Target database has
column "valuesclass" on table "public.customfields", but source database
does not
(29015) [Fri Jan 24 01:14:17 2014] MCP Inspecting target table
"public.customfields" on database "rt4br_helix"
(29015) [Fri Jan 24 01:14:17 2014] MCP Warning: Source database for sync
"rt3db" has column "pattern" of table "public.customfields" as type
"character varying(255)", but target database "rt4br_helix" has a type
of "character varying(65536)". You should really fix that.
(29015) [Fri Jan 24 01:14:17 2014] MCP Warning: Target database has
column "basedon" on table "public.customfields", but source database
does not
(29015) [Fri Jan 24 01:14:17 2014] MCP Warning: Target database has
column "rendertype" on table "public.customfields", but source database
does not
(29015) [Fri Jan 24 01:14:17 2014] MCP Warning: Target database has
column "valuesclass" on table "public.customfields", but source database
does not
(29015) [Fri Jan 24 01:14:17 2014] MCP Inspecting source table
"public.cachedgroupmembers" on database "rt3_corkscrew"
(29015) [Fri Jan 24 01:14:17 2014] MCP Inspecting target table
"public.cachedgroupmembers" on database "rt4br_corkscrew"
(29015) [Fri Jan 24 01:14:17 2014] MCP Inspecting target table
"public.cachedgroupmembers" on database "rt4br_galaxi"
(29015) [Fri Jan 24 01:14:17 2014] MCP Inspecting target table
"public.cachedgroupmembers" on database "rt4br_gemini"
(29015) [Fri Jan 24 01:14:18 2014] MCP Inspecting target table
"public.cachedgroupmembers" on database "rt4br_helix"
(29015) [Fri Jan 24 01:14:18 2014] MCP Inspecting source table
"public.attributes" on database "rt3_corkscrew"
(29015) [Fri Jan 24 01:14:18 2014] MCP Inspecting target table
"public.attributes" on database "rt4br_corkscrew"
(29015) [Fri Jan 24 01:14:18 2014] MCP Inspecting target table
"public.attributes" on database "rt4br_galaxi"
(29015) [Fri Jan 24 01:14:18 2014] MCP Inspecting target table
"public.attributes" on database "rt4br_gemini"
(29015) [Fri Jan 24 01:14:19 2014] MCP Inspecting target table
"public.attributes" on database "rt4br_helix"
(29015) [Fri Jan 24 01:14:19 2014] MCP Inspecting source table
"public.attachments" on database "rt3_corkscrew"
(29015) [Fri Jan 24 01:14:19 2014] MCP Inspecting target table
"public.attachments" on database "rt4br_corkscrew"
(29015) [Fri Jan 24 01:14:19 2014] MCP Inspecting target table
"public.attachments" on database "rt4br_galaxi"
(29015) [Fri Jan 24 01:14:19 2014] MCP Inspecting target table
"public.attachments" on database "rt4br_gemini"
(29015) [Fri Jan 24 01:14:20 2014] MCP Inspecting target table
"public.attachments" on database "rt4br_helix"
(29015) [Fri Jan 24 01:14:20 2014] MCP Inspecting source table
"public.acl" on database "rt3_corkscrew"
(29015) [Fri Jan 24 01:14:20 2014] MCP Inspecting target table
"public.acl" on database "rt4br_corkscrew"
(29015) [Fri Jan 24 01:14:20 2014] MCP Warning: Source database for sync
"rt3db" has column "delegatedby" of table "public.acl", but target
database "rt4br_corkscrew" does not
(29015) [Fri Jan 24 01:14:20 2014] MCP Warning: Source database for sync
"rt3db" has column "delegatedfrom" of table "public.acl", but target
database "rt4br_corkscrew" does not
(29015) [Fri Jan 24 01:14:20 2014] MCP Warning: Target database has
column "created" on table "public.acl", but source database does not
(29015) [Fri Jan 24 01:14:20 2014] MCP Warning: Target database has
column "creator" on table "public.acl", but source database does not
(29015) [Fri Jan 24 01:14:20 2014] MCP Warning: Target database has
column "lastupdated" on table "public.acl", but source database does not
(29015) [Fri Jan 24 01:14:20 2014] MCP Warning: Target database has
column "lastupdatedby" on table "public.acl", but source database does not
(29015) [Fri Jan 24 01:14:20 2014] MCP Validation of sync rt3db FAILED
..The bug (two fold) was that the validate returned 'OK' when it clearly
isn't... not to mention that a reload returns 'Not Active' in the log
and just hangs on the command line...
..and, one would think that extra cols (when 'strict_checking' is false)
would not fail the sync... The log shows 'Warning' which would suggest
the same... Perhaps 'Error' would be more appropriate...?
The table defs for the target:
rt4=# \d customfields;
Table "public.customfields"
Column | Type
| Modifiers
---------------+-----------------------------+-------------------------------------------------------------------
id | integer | not null default
nextval(('customfields_id_seq'::text)::regclass)
name | character varying(200) |
type | character varying(200) |
maxvalues | integer | not null default 0
repeated | integer | not null default 0
pattern | character varying(65536) |
lookuptype | character varying(255) | not null
description | character varying(255) |
sortorder | integer | not null default 0
creator | integer | not null default 0
created | timestamp without time zone |
lastupdatedby | integer | not null default 0
lastupdated | timestamp without time zone |
disabled | integer | not null default 0
basedon | integer |
rendertype | character varying(64) |
valuesclass | character varying(64) |
Indexes:
"customfields_pkey" PRIMARY KEY, btree (id)
Triggers:
bucardo_delta AFTER INSERT OR DELETE OR UPDATE ON customfields FOR
EACH ROW EXECUTE PROCEDURE bucardo.delta_public_customfields()
bucardo_note_trunc_rt4db AFTER TRUNCATE ON customfields FOR EACH
STATEMENT EXECUTE PROCEDURE bucardo.bucardo_note_truncation('rt4db')
Triggers firing always:
bucardo_kick_rt4db AFTER INSERT OR DELETE OR UPDATE OR TRUNCATE ON
customfields FOR EACH STATEMENT EXECUTE PROCEDURE
bucardo.bucardo_kick_rt4db()
rt4=# \d acl
Table "public.acl"
Column | Type |
Modifiers
---------------+-----------------------------+----------------------------------------------------------
id | integer | not null default
nextval(('acl_id_seq'::text)::regclass)
principaltype | character varying(25) | not null
principalid | integer | not null
rightname | character varying(25) | not null
objecttype | character varying(25) | not null
objectid | integer | not null default 0
creator | integer | not null default 0
created | timestamp without time zone |
lastupdatedby | integer | not null default 0
lastupdated | timestamp without time zone |
Indexes:
"acl_pkey" PRIMARY KEY, btree (id)
"acl1" btree (rightname, objecttype, objectid, principaltype,
principalid)
Triggers:
bucardo_delta AFTER INSERT OR DELETE OR UPDATE ON acl FOR EACH ROW
EXECUTE PROCEDURE bucardo.delta_public_acl()
bucardo_note_trunc_rt4db AFTER TRUNCATE ON acl FOR EACH STATEMENT
EXECUTE PROCEDURE bucardo.bucardo_note_truncation('rt4db')
Triggers firing always:
bucardo_kick_rt4db AFTER INSERT OR DELETE OR UPDATE OR TRUNCATE ON
acl FOR EACH STATEMENT EXECUTE PROCEDURE bucardo.bucardo_kick_rt4db()
rt3=# \d customfields;
Table "public.customfields"
Column | Type
| Modifiers
---------------+-----------------------------+-------------------------------------------------------------------
id | integer | not null default
nextval(('customfields_id_seq'::text)::regclass)
name | character varying(200) |
type | character varying(200) |
maxvalues | integer | not null default 0
repeated | integer | not null default 0
pattern | character varying(255) |
lookuptype | character varying(255) | not null
description | character varying(255) |
sortorder | integer | not null default 0
creator | integer | not null default 0
created | timestamp without time zone |
lastupdatedby | integer | not null default 0
lastupdated | timestamp without time zone |
disabled | integer | not null default 0
Indexes:
"customfields_pkey" PRIMARY KEY, btree (id)
Triggers firing always:
bucardo_delta AFTER INSERT OR DELETE OR UPDATE ON customfields FOR
EACH ROW EXECUTE PROCEDURE bucardo.delta_public_customfields()
bucardo_kick_rt3db AFTER INSERT OR DELETE OR UPDATE OR TRUNCATE ON
customfields FOR EACH STATEMENT EXECUTE PROCEDURE
bucardo.bucardo_kick_rt3db()
bucardo_note_trunc_rt3db AFTER TRUNCATE ON customfields FOR EACH
STATEMENT EXECUTE PROCEDURE bucardo.bucardo_note_truncation('rt3db')
rt3=# \d acl
Table "public.acl"
Column | Type |
Modifiers
---------------+-----------------------+----------------------------------------------------------
id | integer | not null default
nextval(('acl_id_seq'::text)::regclass)
principaltype | character varying(25) | not null
principalid | integer | not null
rightname | character varying(25) | not null
objecttype | character varying(25) | not null
objectid | integer | not null default 0
delegatedby | integer | not null default 0
delegatedfrom | integer | not null default 0
Indexes:
"acl_pkey" PRIMARY KEY, btree (id)
"acl1" btree (rightname, objecttype, objectid, principaltype,
principalid)
Triggers firing always:
bucardo_delta AFTER INSERT OR DELETE OR UPDATE ON acl FOR EACH ROW
EXECUTE PROCEDURE bucardo.delta_public_acl()
bucardo_kick_rt3db AFTER INSERT OR DELETE OR UPDATE OR TRUNCATE ON
acl FOR EACH STATEMENT EXECUTE PROCEDURE bucardo.bucardo_kick_rt3db()
bucardo_note_trunc_rt3db AFTER TRUNCATE ON acl FOR EACH STATEMENT
EXECUTE PROCEDURE bucardo.bucardo_note_truncation('rt3db')
Regards,
Michelle
Michelle Sullivan wrote:
> Seeing this:
>
> (4985) [Thu Jan 23 15:33:23 2014] MCP Inspecting source table
> "public.customfields" on database "rt3_corkscrew"
> (4985) [Thu Jan 23 15:33:23 2014] MCP Inspecting target table
> "public.customfields" on database "rt4br_corkscrew"
> (4985) [Thu Jan 23 15:33:23 2014] MCP Warning: Source database for sync
> "rt3db" has column "pattern" of table "public.customfields" as type
> "character varying(255)", but target database "rt4br_corkscrew" has a
> type of "character varying(65536)"
> (4985) [Thu Jan 23 15:33:23 2014] MCP Warning: Target database has
> column "basedon" on table "public.customfields", but source database
> does not
> (4985) [Thu Jan 23 15:33:23 2014] MCP Warning: Target database has
> column "rendertype" on table "public.customfields", but source database
> does not
> (4985) [Thu Jan 23 15:33:23 2014] MCP Warning: Target database has
> column "valuesclass" on table "public.customfields", but source database
> does not
> (4985) [Thu Jan 23 15:33:23 2014] MCP Validation of sync rt3db FAILED
>
> Now the cause is obvious, but is there a way to ignore it and make the
> sync work as going from VARCHAR(255) to VARCHAR(65535) (all the
> VARCHAR(65535) tables are targets only) is going to work without a
> problem...
>
> Thanks,
>
> Michelle
>
>
--
Michelle Sullivan
http://www.mhix.org/
More information about the Bucardo-general
mailing list