Why is 'rename' even available in the couchbase API?

I have a 4-node cluster running couchbase 2.2 community edition.

The first node in the cluster contains an IP address. I would like all of my cluster members to report FQDNs.

I’ve read the official couchbase admin guide a few times and it seems that my options are:

1.) Remove IP host and rebalance
2.) Add FQDN (same host) and rebalance.

This causes all data to be lost on the host and it doesn’t seem to require the rename API at all.

The rename feature of the API never succeeds because my IP host is part of the cluster. (Even after I remove the host and rebalance, ‘ClusterMembership’ is still ‘Active’.

Why is rename available via API (‘http://{host}:{port}/node/controller/rename’)? What function does it even serve?

Is there any way to get my host renamed without being so destructive? Should do a swap rebalance with --server-remove=IP and --server-add=hostname? I wouldn’t expect that to work.

Any help is greatly appreciated!

Thank you!

Reference: http://docs.couchbase.com/couchbase-manual-2.2/#using-hostnames-with-couchbase-server


Is it possible to rename a couchbase member of a cluster from IP to FQDN without remove/rebalance/add/rebalance?

(The rename API always reports the host is part of a cluster if it has been added to a cluster previously, at least for v2.2 community addition).

No, as per the documentation you cannot rename a node which is already in a cluster.

The reason for the rename REST API endpoint is for nodes which are either in a single-node cluster or are not yet a member of a cluster.

Ah, got it. Thank you.

(I wish it was possible because of how the first node is always added as an IP address, but alas).

In any case, thanks again. I’ll just remove/rebalance/add/rebalance.