File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 13
13
# See the License for the specific language governing permissions and
14
14
# limitations under the License.
15
15
16
- # Maybe join to a cluster
17
- if [[ -z " $( $RIAK_ADMIN cluster status | grep $HOSTNAME ) " && ${COORDINATOR_NODE} != ${HOSTNAME} * && ${HOSTNAME} != ${COORDINATOR_NODE} * ]]; then
18
- # if [[ -z "$($RIAK_ADMIN cluster status | grep $COORDINATOR_NODE_HOST)" && ${HOSTNAME} != ${COORDINATOR_NODE}* ]]; then
19
- # Not already in this cluster and not the coordinator itself, so join
16
+ # If not coordinator, join it to form a cluster
17
+ # TODO: restart of coordinator node leaves it outside the cluster
18
+ if [[ ${COORDINATOR_NODE} != ${HOSTNAME} * && ${HOSTNAME} != ${COORDINATOR_NODE} * ]]; then
20
19
echo " Connecting to cluster coordinator $COORDINATOR_NODE "
21
- ping -c 1 $COORDINATOR_NODE
20
+ curl -s http:// $COORDINATOR_NODE : $RK_MFN1_SERVICE_PORT_HTTP > /dev/null
22
21
$RIAK_ADMIN cluster join riak@$COORDINATOR_NODE
23
22
if [[ ! -z " ($RIAK_ADMIN cluster status | grep ${HOSTNAME} | grep 'joining')" ]]; then
24
23
if [[ -z " $( $RIAK_ADMIN cluster plan | grep ' There are no staged changes' ) " ]]; then
You can’t perform that action at this time.
0 commit comments