zkfan / tungsten-replicator

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

tungsten-installer should be able to accept properties values #138

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. To which tool/application/daemon will this feature apply?

./tools/tungsten-installer

2. Describe the feature in general

There are features that can only be set by changing the properties file. For 
example, 
replicator.backup.agents=
replicator.backup.default=

3. Describe the feature interface

add an option to tungsten-installer:

--properties=name=value

this option should be accepted multiple times.

4. Give an idea (if applicable) of a possible implementation

The installer should scan the properties given through the --properties option, 
check if such properties exist in the options file, and replace the default 
options with the ones passed at the command line.
It should fail if one or more options do not exist

5. Describe pros and cons of this feature.

5a. Why the world will be a better place with this feature.

This enhancement makes scripted installation easier and more robust.

5b. What hardship will the human race have to endure if this feature is
implemented.

N/A

6. Notes

This feature could replace the one requested with Issue#137

Original issue reported on code.google.com by g.maxia on 29 Jun 2011 at 11:18

GoogleCodeExporter commented 9 years ago

Original comment by jeffm...@gmail.com on 4 Jul 2011 at 4:03

GoogleCodeExporter commented 9 years ago
How was this issue fixed?

./tools/tungsten-installer \
    --direct \
    --master-host=r1 \
    --slave-host=r4 \
    --master-user=tungsten \
    --slave-user=tungsten \
    --master-password=secret \
    --slave-password=secret \
    --service-name=Castor \
    --thl-port=21124 \
    --rmi-port=10000 \
    --channels=5 \
    --home-directory=$TUNGSTEN_BASE \
    --svc-parallelization-type=disk \
    --properties=replicator.global.buffer.size=100 \
    --start-and-report

ERROR >> invalid option for --direct: 
--properties=replicator.global.buffer.size=100

Original comment by g.maxia on 5 Jul 2011 at 7:11

GoogleCodeExporter commented 9 years ago
This was implemented as the '--property' argument.  Each time the argument is 
given represents a single property and thus the singular term was used.

Jeff-Maces-MacBook-Air:build jmace$ 
./tungsten-replicator-2.0.4/tools/tungsten-installer --direct -h
...
--property=key=value  Set the property key to the value in any file that is 
modified by the configure script
...

Original comment by jeffm...@gmail.com on 5 Jul 2011 at 10:59

GoogleCodeExporter commented 9 years ago
Possibly I am using the wrong key?

./tools/tungsten-installer \
    --direct \
    --master-host=r1 \
    --slave-host=r4 \
    --master-user=tungsten \
    --slave-user=tungsten \
    --master-password=secret \
    --slave-password=secret \
    --service-name=Castor \
    --thl-port=21124 \
    --rmi-port=10000 \
    --channels=5 \
    --home-directory=$TUNGSTEN_BASE \
    --svc-parallelization-type=disk \
    --property=replicator.global.buffer.size=100 \
    --start-and-report

ERROR >> Argument parsing failed: undefined method `count' for 
["replicator.global.buffer.size", "100"]:Array

Original comment by g.maxia on 5 Jul 2011 at 11:54

GoogleCodeExporter commented 9 years ago
The Array.count function is new to Ruby.  I've switched to Array.length which 
serves the same purpose.

Original comment by jeffm...@gmail.com on 5 Jul 2011 at 12:36