zxs / tungsten-replicator

Automatically exported from code.google.com/p/tungsten-replicator
0 stars 0 forks source link

Unable to set --property values for a specific host in dataservice when the all-master or fan-in topology is used #763

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

./tools/tpm configure defaults --reset \
....
--property=replicator.global.buffer.size=6

./tools/tpm configure all \
--master-services=alpha,bravo,charlie \
--masters=db1,db2,db3 \
--topology=all-masters

./tools/tpm configure bravo \
--master=db2 \
--members=db1,db2,db3 \
--property=replicator.global.buffer.size=12

./tools/tpm configure bravo --hosts=db3 \
--property=replicator.global.buffer.size=18

What is the expected output?

The bravo service on db3 has replicator.global.buffer.size=18
The bravo service on db1,db2 have replicator.global.buffer.size=12
All other services have replicator.global.buffer.size=6

What do you see instead?

A mix of values for replicator.global.buffer.size

What is the possible cause?

This call doesn't make it possible to distinguish between all hosts in the 
bravo service and the bravo replication service running on each host.

./tools/tpm configure bravo \
--master=db2 \
--members=db1,db2,db3 \
--property=replicator.global.buffer.size=12

What is the proposed solution?

TBD

Additional information

...

Use labels and text to provide additional information.

Original issue reported on code.google.com by jeff.m...@continuent.com on 21 Nov 2013 at 8:55

GoogleCodeExporter commented 9 years ago
The expected result can be achieved by running 

./tools/tpm configure bravo --hosts=db1,db2,db3 \
--master=db2 \
--members=db1,db2,db3 \
--property=replicator.global.buffer.size=12

Original comment by jeff.m...@continuent.com on 21 Nov 2013 at 9:03

GoogleCodeExporter commented 9 years ago
The primary example has been resolved. I am going to add some features to INI 
parsing to support for '[host.cdb3]' and '[bravo.cdb3]' sections to allow for 
specific overrides to be put in place and still have the same INI file across 
all servers.

Original comment by jeff.m...@continuent.com on 29 Jan 2014 at 10:24

GoogleCodeExporter commented 9 years ago
In addition to specify --property for a single host on the command line, you 
can now give INI entries for a single host. The INI file may now include any of 
the following headers, each section will be parsed in the order it appears in 
the file.

[defaults]
[defaults.replicator]
[defaults@<hostname>]
[<service>]
[<service>@<hostname>]

Original comment by jeff.m...@continuent.com on 30 Jan 2014 at 9:20

GoogleCodeExporter commented 9 years ago

Original comment by jeff.m...@continuent.com on 31 Jan 2014 at 1:56

GoogleCodeExporter commented 9 years ago
This needs some work in order to make sure settings can be applied for each 
service in a multi-service topology. That isn't critical so I'm going to delay 
it. When starting up again, apply this diff as the starting point. The issue is 
that an all-master topology is evaluated based on the alias service rather than 
the actual replication service name. That is why tpm fails to find settings 
during validation.

Index: builder/extra/tools/ruby-tpm/configure/configure_deployment_handler.rb
===================================================================
--- 
builder/extra/tools/ruby-tpm/configure/configure_deployment_handler.rb  (revision
 2035)
+++ 
builder/extra/tools/ruby-tpm/configure/configure_deployment_handler.rb  (working 
copy)
@@ -195,7 +195,6 @@
         debug("Validate configuration values for #{@config.getProperty(HOST)}")

         # Validate the values in the configuration file against the prompt validation
-        prompt_handler.save_system_defaults()
         prompt_handler.validate()

         add_remote_result(prompt_handler.get_remote_result())
Index: builder/extra/tools/ruby-tpm/configure/commands/load_single_config.rb
===================================================================
--- 
builder/extra/tools/ruby-tpm/configure/commands/load_single_config.rb   (revision 
2035)
+++ 
builder/extra/tools/ruby-tpm/configure/commands/load_single_config.rb   (working 
copy)
@@ -44,7 +44,6 @@
     debug("Validate configuration values for #{@config.getProperty(HOST)}")

     # Validate the values in the configuration file against the prompt validation
-    prompt_handler.save_system_defaults()
     prompt_handler.validate()

     add_remote_result(prompt_handler.get_remote_result())
Index: builder/extra/tools/ruby-tpm/properties.rb
===================================================================
--- builder/extra/tools/ruby-tpm/properties.rb  (revision 2035)
+++ builder/extra/tools/ruby-tpm/properties.rb  (working copy)
@@ -131,6 +131,7 @@
     old_trap = trap("INT") {
       interrupted = true;
     }
+    @props.delete(SYSTEM)

     # Write.
     File.open(properties_filename, 'w') do |file|

Original comment by jeff.m...@continuent.com on 5 Feb 2014 at 12:38

GoogleCodeExporter commented 9 years ago

Original comment by jeff.m...@continuent.com on 14 May 2014 at 8:18

GoogleCodeExporter commented 9 years ago
Will not use third version digit for normal releases anymore. It will only be 
increment for maintenance ones.

Original comment by linas.vi...@continuent.com on 26 May 2014 at 5:01

GoogleCodeExporter commented 9 years ago

Original comment by linas.vi...@continuent.com on 19 Jan 2015 at 2:20