Show
Ignore:
Timestamp:
12/24/09 14:49:13 (4 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1261666153 +0000
git-parent:

[9eeace24af3f59a0bb51a448c5b6cf0713cc1d20]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1261666153 +0000
Message:

refs #226

This implements the change, but does not improve upon the stratcon config.
The stratcon config is still inserted with 0.0.0.0 as the remote_address
and now furthers the underachievement by using "" as the common name.

This should be fixed as a part of this ticket as well.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sql/sprocs/stratcon.update_config.sql

    r4bd41da rf4a87ed  
    33-- 
    44 
    5 CREATE FUNCTION stratcon.update_config(v_remote_address_in inet, v_node_type_in text, v_whence_in timestamp with time zone, v_config_in xml) RETURNS void 
     5CREATE FUNCTION stratcon.update_config(v_remote_address_in inet, v_remote_cn_in text, v_node_type_in text, v_whence_in timestamp with time zone, v_config_in xml) RETURNS void 
    66    AS $$ 
    77DECLARE 
     
    99BEGIN 
    1010    select config into v_config from stratcon.current_node_config 
    11      where remote_address = v_remote_address_in 
     11     where remote_cn = v_remote_cn_in 
    1212       and node_type = v_node_type_in; 
    1313    IF FOUND THEN 
     
    1616        END IF; 
    1717        delete from stratcon.current_node_config 
    18               where remote_address = v_remote_address_in 
     18              where remote_cn = v_remote_cn_in 
    1919                and node_type = v_node_type_in; 
    2020    END IF; 
    2121    insert into stratcon.current_node_config 
    22                 (remote_address, node_type, whence, config) 
    23          values (v_remote_address_in, v_node_type_in, v_whence_in, v_config_in); 
     22                (remote_cn, remote_address, node_type, whence, config) 
     23         values (v_remote_cn_in, v_remote_address_in, v_node_type_in, v_whence_in, v_config_in); 
    2424    insert into stratcon.current_node_config_changelog 
    25                 (remote_address, node_type, whence, config) 
    26          values (v_remote_address_in, v_node_type_in, v_whence_in, v_config_in); 
     25                (remote_cn, remote_address, node_type, whence, config) 
     26         values (v_remote_cn_in, v_remote_address_in, v_node_type_in, v_whence_in, v_config_in); 
    2727END 
    2828$$ 
     
    3131; 
    3232 
    33 ALTER FUNCTION stratcon.update_config(v_remote_address_in inet, v_node_type_in text, v_whence_in timestamp with time zone, v_config_in xml) OWNER TO reconnoiter; 
     33ALTER FUNCTION stratcon.update_config(v_remote_address_in inet, v_remote_cn_in text, v_node_type_in text, v_whence_in timestamp with time zone, v_config_in xml) OWNER TO reconnoiter; 
    3434 
    35 GRANT EXECUTE ON FUNCTION stratcon.update_config(inet, text, timestamp with time zone, xml) TO stratcon; 
     35GRANT EXECUTE ON FUNCTION stratcon.update_config(inet, text, text, timestamp with time zone, xml) TO stratcon; 
    3636 
  • sql/tables/stratcon.current_node_config.sql

    ra34bc12 rf4a87ed  
    2020 
    2121CREATE TABLE current_node_config ( 
     22    remote_cn text NOT NULL, 
     23    node_type text NOT NULL, 
    2224    remote_address inet NOT NULL, 
    23     node_type text NOT NULL, 
    2425    whence timestamp with time zone NOT NULL, 
    2526    config xml NOT NULL 
     
    3435 
    3536ALTER TABLE ONLY current_node_config 
    36     ADD CONSTRAINT current_node_config_pkey PRIMARY KEY (remote_address, node_type); 
    37  
     37    ADD CONSTRAINT current_node_config_pkey PRIMARY KEY (remote_cn, node_type); 
    3838 
    3939-- 
  • sql/tables/stratcon.current_node_config_changelog.sql

    r4bd41da rf4a87ed  
    11CREATE TABLE stratcon.current_node_config_changelog ( 
     2    remote_cn text NOT NULL, 
     3    node_type text NOT NULL, 
    24    remote_address inet NOT NULL, 
    3     node_type text NOT NULL, 
    45    whence timestamp with time zone NOT NULL, 
    56    config xml NOT NULL 
     
    1415 
    1516ALTER TABLE ONLY stratcon.current_node_config_changelog 
    16     ADD CONSTRAINT current_node_config_changelog_pkey PRIMARY KEY (remote_address, node_type, whence); 
     17    ADD CONSTRAINT current_node_config_changelog_pkey PRIMARY KEY (remote_cn, node_type, whence); 
    1718 
    1819--