Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolving bug where the placement info that gets allocated to a maste…
…r/tserver is off by one respect to the command line argument. Summary: The placement info that gets allocated to a master/tserver is off by one with respect to the command line arguments passed. This was because of the fact that master/tserver index starts from 1 and not 0. Test Plan: Tested that the placement info is passed down in the correct order as expected. Command: `bin/yb-ctl --rf 4 create --placement_info "cloud1.region1.zone1,cloud2.region2.zone2"` Output: ```2018-03-08 16:45:14,333 INFO: Starting master-1 with: /Users/ayushsengupta/code/yugabyte/build/debug-clang-dynamic-enterprise/bin/yb-master --fs_data_dirs "/tmp/yugabyte-local-cluster/node-1/disk-1,/tmp/yugabyte-local-cluster/node-1/disk-2" --webserver_interface 127.0.0.1 --rpc_bind_addresses 127.0.0.1 --v 0 --version_file_json_path=/Users/ayushsengupta/code/yugabyte/build/debug-clang-dynamic-enterprise --callhome_enabled=false --replication_factor=4 --master_addresses 127.0.0.1:7100,127.0.0.2:7100,127.0.0.3:7100,127.0.0.4:7100 --placement_cloud cloud1 --placement_region region1 --placement_zone zone1 >"/tmp/yugabyte-local-cluster/node-1/disk-1/master.out" 2>"/tmp/yugabyte-local-cluster/node-1/disk-1/master.err" & 2018-03-08 16:45:14,362 INFO: Starting master-2 with: /Users/ayushsengupta/code/yugabyte/build/debug-clang-dynamic-enterprise/bin/yb-master --fs_data_dirs "/tmp/yugabyte-local-cluster/node-2/disk-1,/tmp/yugabyte-local-cluster/node-2/disk-2" --webserver_interface 127.0.0.2 --rpc_bind_addresses 127.0.0.2 --v 0 --version_file_json_path=/Users/ayushsengupta/code/yugabyte/build/debug-clang-dynamic-enterprise --callhome_enabled=false --replication_factor=4 --master_addresses 127.0.0.1:7100,127.0.0.2:7100,127.0.0.3:7100,127.0.0.4:7100 --placement_cloud cloud2 --placement_region region2 --placement_zone zone2 >"/tmp/yugabyte-local-cluster/node-2/disk-1/master.out" 2>"/tmp/yugabyte-local-cluster/node-2/disk-1/master.err" & 2018-03-08 16:45:14,388 INFO: Starting master-3 with: /Users/ayushsengupta/code/yugabyte/build/debug-clang-dynamic-enterprise/bin/yb-master --fs_data_dirs "/tmp/yugabyte-local-cluster/node-3/disk-1,/tmp/yugabyte-local-cluster/node-3/disk-2" --webserver_interface 127.0.0.3 --rpc_bind_addresses 127.0.0.3 --v 0 --version_file_json_path=/Users/ayushsengupta/code/yugabyte/build/debug-clang-dynamic-enterprise --callhome_enabled=false --replication_factor=4 --master_addresses 127.0.0.1:7100,127.0.0.2:7100,127.0.0.3:7100,127.0.0.4:7100 --placement_cloud cloud1 --placement_region region1 --placement_zone zone1 >"/tmp/yugabyte-local-cluster/node-3/disk-1/master.out" 2>"/tmp/yugabyte-local-cluster/node-3/disk-1/master.err" & 2018-03-08 16:45:14,414 INFO: Starting master-4 with: /Users/ayushsengupta/code/yugabyte/build/debug-clang-dynamic-enterprise/bin/yb-master --fs_data_dirs "/tmp/yugabyte-local-cluster/node-4/disk-1,/tmp/yugabyte-local-cluster/node-4/disk-2" --webserver_interface 127.0.0.4 --rpc_bind_addresses 127.0.0.4 --v 0 --version_file_json_path=/Users/ayushsengupta/code/yugabyte/build/debug-clang-dynamic-enterprise --callhome_enabled=false --replication_factor=4 --master_addresses 127.0.0.1:7100,127.0.0.2:7100,127.0.0.3:7100,127.0.0.4:7100 --placement_cloud cloud2 --placement_region region2 --placement_zone zone2 >"/tmp/yugabyte-local-cluster/node-4/disk-1/master.out" 2>"/tmp/yugabyte-local-cluster/node-4/disk-1/master.err" & 2018-03-08 16:45:14,461 INFO: Starting tserver-1 with: /Users/ayushsengupta/code/yugabyte/build/debug-clang-dynamic-enterprise/bin/yb-tserver --fs_data_dirs "/tmp/yugabyte-local-cluster/node-1/disk-1,/tmp/yugabyte-local-cluster/node-1/disk-2" --webserver_interface 127.0.0.1 --rpc_bind_addresses 127.0.0.1 --v 0 --version_file_json_path=/Users/ayushsengupta/code/yugabyte/build/debug-clang-dynamic-enterprise --callhome_enabled=false --tserver_master_addrs 127.0.0.1:7100,127.0.0.2:7100,127.0.0.3:7100,127.0.0.4:7100 --memory_limit_hard_bytes 1073741824 --yb_num_shards_per_tserver 2 --redis_proxy_bind_address 127.0.0.1 --cql_proxy_bind_address 127.0.0.1 --local_ip_for_outbound_sockets 127.0.0.1 --use_cassandra_authentication=false --placement_cloud cloud1 --placement_region region1 --placement_zone zone1 >"/tmp/yugabyte-local-cluster/node-1/disk-1/tserver.out" 2>"/tmp/yugabyte-local-cluster/node-1/disk-1/tserver.err" & 2018-03-08 16:45:14,570 INFO: Starting tserver-2 with: /Users/ayushsengupta/code/yugabyte/build/debug-clang-dynamic-enterprise/bin/yb-tserver --fs_data_dirs "/tmp/yugabyte-local-cluster/node-2/disk-1,/tmp/yugabyte-local-cluster/node-2/disk-2" --webserver_interface 127.0.0.2 --rpc_bind_addresses 127.0.0.2 --v 0 --version_file_json_path=/Users/ayushsengupta/code/yugabyte/build/debug-clang-dynamic-enterprise --callhome_enabled=false --tserver_master_addrs 127.0.0.1:7100,127.0.0.2:7100,127.0.0.3:7100,127.0.0.4:7100 --memory_limit_hard_bytes 1073741824 --yb_num_shards_per_tserver 2 --redis_proxy_bind_address 127.0.0.2 --cql_proxy_bind_address 127.0.0.2 --local_ip_for_outbound_sockets 127.0.0.2 --use_cassandra_authentication=false --placement_cloud cloud2 --placement_region region2 --placement_zone zone2 >"/tmp/yugabyte-local-cluster/node-2/disk-1/tserver.out" 2>"/tmp/yugabyte-local-cluster/node-2/disk-1/tserver.err" & 2018-03-08 16:45:14,702 INFO: Starting tserver-3 with: /Users/ayushsengupta/code/yugabyte/build/debug-clang-dynamic-enterprise/bin/yb-tserver --fs_data_dirs "/tmp/yugabyte-local-cluster/node-3/disk-1,/tmp/yugabyte-local-cluster/node-3/disk-2" --webserver_interface 127.0.0.3 --rpc_bind_addresses 127.0.0.3 --v 0 --version_file_json_path=/Users/ayushsengupta/code/yugabyte/build/debug-clang-dynamic-enterprise --callhome_enabled=false --tserver_master_addrs 127.0.0.1:7100,127.0.0.2:7100,127.0.0.3:7100,127.0.0.4:7100 --memory_limit_hard_bytes 1073741824 --yb_num_shards_per_tserver 2 --redis_proxy_bind_address 127.0.0.3 --cql_proxy_bind_address 127.0.0.3 --local_ip_for_outbound_sockets 127.0.0.3 --use_cassandra_authentication=false --placement_cloud cloud1 --placement_region region1 --placement_zone zone1 >"/tmp/yugabyte-local-cluster/node-3/disk-1/tserver.out" 2>"/tmp/yugabyte-local-cluster/node-3/disk-1/tserver.err" & 2018-03-08 16:45:14,854 INFO: Starting tserver-4 with: /Users/ayushsengupta/code/yugabyte/build/debug-clang-dynamic-enterprise/bin/yb-tserver --fs_data_dirs "/tmp/yugabyte-local-cluster/node-4/disk-1,/tmp/yugabyte-local-cluster/node-4/disk-2" --webserver_interface 127.0.0.4 --rpc_bind_addresses 127.0.0.4 --v 0 --version_file_json_path=/Users/ayushsengupta/code/yugabyte/build/debug-clang-dynamic-enterprise --callhome_enabled=false --tserver_master_addrs 127.0.0.1:7100,127.0.0.2:7100,127.0.0.3:7100,127.0.0.4:7100 --memory_limit_hard_bytes 1073741824 --yb_num_shards_per_tserver 2 --redis_proxy_bind_address 127.0.0.4 --cql_proxy_bind_address 127.0.0.4 --local_ip_for_outbound_sockets 127.0.0.4 --use_cassandra_authentication=false --placement_cloud cloud2 --placement_region region2 --placement_zone zone2 >"/tmp/yugabyte-local-cluster/node-4/disk-1/tserver.out" 2>"/tmp/yugabyte-local-cluster/node-4/disk-1/tserver.err" &``` Reviewers: bogdan Reviewed By: bogdan Subscribers: ybase Differential Revision: https://phabricator.dev.yugabyte.com/D4314
- Loading branch information