Details
-
Bug
-
Resolution: Unresolved
-
Major
-
5.5.1
-
Untriaged
-
Unknown
Description
Looks like the data and index paths are recorded in /opt/couchbase/etc/couchdb/local.ini.
This causes recovery of a node and it's config to fail for scenarios like the following:
- Init a node with it's data_path set to '/mnt/data' (which is some NAS)
- Backup node configuration "/opt/couchbase/var/lib/couchbase" -> some volume or NAS
- Node fails and cannot be recovered
- Install couchbase on a new node (but don't start
export INSTALL_DONT_START_SERVER=1)
- Restore config
- Start couchbase server on recovered node
When node starts, the data and index path will be reset to default and not '/mnt/data'. Furthermore, the data path cannot be re-initialized because restoring the config will cause the node to assume it's already a part of the cluster.
Currently the way to deal with this is to back up both the couchdb config in etc and couchbase default config under 'var'. Ideally, we'd want to just backup the couchbase config and allow complete restore of all settings from there.
Admittedly this use-case may not be common on vms and bare-metal, but the kubernetes project now makes use of this scenario for recovering containers with persisted data mounts.