Open oybed opened 8 years ago
@oybed I ran through a fresh repository clone and did not run into this issue.
Could it possibly be an issue with the name of your key?
@sabre1041 @JaredBurck finally got a chance to look into this a bit more and I believe it's the if-statement with the double brackets causing the discrepancy (see below). And it could be because maybe we're running different shells or versions of the shell. In my case it is:
>> $SHELL --version
GNU bash, version 4.2.46(1)-release (x86_64-redhat-linux-gnu)
The issue is that the if condition below doesn't work right in my case - i.e.: "-1 > 0" evaluates to true.
if [[ $num_etcd_instances > 0 ]]; then
I'd suggest changing this to the following to make it a bit more robust for various shells / versions:
if [ "${num_etcd_instances}" -gt "0" ]; then
... or, alternatively, the following is also A_OK, but I prefer the above:
if (("${num_etcd_instances}" > "0")); then
Running a plain "osc-provision" fails if the --num-etcd parameter isn't supplied. By default it should work the same way as it used to (i.e.: one etcd on the master) and don't error out.
Below is an example run: