Bug 361 - resubscribe node flat out doesn't work
Summary: resubscribe node flat out doesn't work
Status: RESOLVED INVALID
Alias: None
Product: Slony-I
Classification: Unclassified
Component: stored procedures (show other bugs)
Version: 2.0
Hardware: PC Mac OS
: low enhancement
Assignee: Steve Singer
URL:
Depends on:
Blocks:
 
Reported: 2015-10-06 08:32 UTC by Tom Tignor
Modified: 2020-05-12 01:48 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tignor 2015-10-06 08:32:31 UTC
I am developing with slony1-2.2.4. I have setup two nodes replicating from a single producer and I'm simply trying to make one of the current subscribers replicate from the other. I understand the single purpose of the RESUBSCRIBE NODE operation is to make this happen. So I have created a resubscribe node script but everywhere I run it returns the error "subscribeSet() must be called on origin." Eventually I discovered that even while running on the origin host, slonik reaches out to the new provider host to generate the error (See the session below. I recreated the function on the new provider with "YYY" markup.) I am completely blocked with the resubscribe operation now. Thanks in advance for any insights.

root@ams9.nss1.tn:/tmp# cat doresub-2.slk 
cluster name = ams_cluster;
node 1 admin
      conninfo='dbname=ams
      host=198.18.102.35
      user=ams_slony
      sslmode=verify-ca
      sslcert=/usr/local/akamai/.ams_certs/complete-ams_slony.crt
      sslkey=/usr/local/akamai/.ams_certs/ams_slony.private_key
      sslrootcert=/usr/local/akamai/etc/ssl_ca/canonical_ca_roots.pem';
node 3 admin
      conninfo='dbname=ams
      host=198.18.102.35
      user=ams_slony
      sslmode=verify-ca
      sslcert=/usr/local/akamai/.ams_certs/complete-ams_slony.crt
      sslkey=/usr/local/akamai/.ams_certs/ams_slony.private_key
      sslrootcert=/usr/local/akamai/etc/ssl_ca/canonical_ca_roots.pem';

resubscribe node (origin = 1, provider = 3, receiver = 2);
root@ams9.nss1.tn:/tmp# 
root@ams9.nss1.tn:/tmp# slonik doresub-2.slk      
doresub-2.slk:19: PGRES_FATAL_ERROR lock table "_ams_cluster".sl_event_lock, "_ams_cluster".sl_config_lock;select "_ams_cluster".resubscribeNode(1, 3, 2);  - ERROR:  Slony-I: subscribeSet() YYY must be called on origin
root@ams9.nss1.tn:/tmp# 
root@ams9.nss1.tn:/tmp# emacs doresub-2.slk 
root@ams9.nss1.tn:/tmp# cat doresub-2.slk 
cluster name = ams_cluster;
node 1 admin
      conninfo='dbname=ams
      host=198.18.102.35
      user=ams_slony
      sslmode=verify-ca
      sslcert=/usr/local/akamai/.ams_certs/complete-ams_slony.crt
      sslkey=/usr/local/akamai/.ams_certs/ams_slony.private_key
      sslrootcert=/usr/local/akamai/etc/ssl_ca/canonical_ca_roots.pem';

resubscribe node (origin = 1, provider = 3, receiver = 2);
root@ams9.nss1.tn:/tmp# 
root@ams9.nss1.tn:/tmp# slonik doresub-2.slk      
doresub-2.slk:11: ERROR: no admin conninfo for node 3
root@ams9.nss1.tn:/tmp#
Comment 1 Steve Singer 2015-10-06 17:02:08 UTC
If you add a 

node 2 admin conninfo='....'

statement to the top of your script does it do anything differently?
Comment 2 Tom Tignor 2015-10-07 20:07:28 UTC
	Ouch. Now that I look again, I see I misconfigured the node 1 path as the
node 3, which explains a lot.
	After fixing that, slonik returns "ERROR: no admin conninfo for node 2,²
and after applying your suggestion, the resubscribe goes through. Sorry to
bother!

	Tom    :-)
Comment 3 Steve Singer 2020-05-12 01:43:11 UTC
I think this bug can be closed.