LCB_TYPE_CLUSTER requires bucket or "default"

I am experimenting to create a lcb instance of type LCB_TYPE_CLUSTER for using REST API commands to a cluster, like checking cluster health, etc. This to avoid managing a separate HTTP connection.
As the management connection should be independent of the a bucket, I was expecting the lcb_create() and lcb_connect() to work with just the IP address(es) and credentials, but found that it either needs the name of an existing bucket, or without bucket it requires the ‘default’ bucket to be present in the cluster.

I.e.:

c_opts.version       = 3;
c_opts.v.v3.connstr  = "127.0.0.1";
c_opts.v.v3.username = "Administrator";
c_opts.v.v3.passwd   = "admin123";
c_opts.v.v3.type     = LCB_TYPE_CLUSTER;
c_opts.v.v3.io       = con->io_opts;
res = lcb_create(&con->couch_hndl, &c_opts);

Only works if the cluster has a bucket ‘default’

c_opts.version       = 3;
c_opts.v.v3.connstr  = "127.0.0.1/myStore";
c_opts.v.v3.username = "Administrator";
c_opts.v.v3.passwd   = "admin123";
c_opts.v.v3.type     = LCB_TYPE_CLUSTER;
c_opts.v.v3.io       = con->io_opts;
res = lcb_create(&con->couch_hndl, &c_opts);

Works if the cluster has a bucket ‘myStore’ instead of ‘default’.

Why is the ‘cluster’ connection tied to a specific bucket? Is there a way around that?
(The behaviour seems to be the same on 2.4.7, 2.7.4 and 2.7.5)

Without a bucket ‘default’ in the cluster, wget on /pools/default works just fine and reports the cluster status and stats.

It was done for simplicity historically, and next release will have improvements in this area. You can take a look at this patch: http://review.couchbase.org/77554

We need the name of a bucket in order to fetch the configuration.

Note that :8091 connections are not reused/pooled anyway, though I suppose that could change in theory (we could add a pool). In general, libcouchbase does not make a great general purpose HTTP client.

If you are determined to use libcouchbase as a dumb HTTP client, you might be able to use LCB_HTTP_TYPE_RAW as the type, and then ‘bootstrap’ using memcached bootstrap. Memcached bootstrap is unsupported for normal use, but is the easiest way to “just get a client”. Of course in this configuration you’d need to input the node yourself. This way you won’t need to link to another HTTP library.

https://developer.couchbase.com/documentation/server/4.6/sdk/python/client-settings.html – scroll all the way to the bottom for Memcached bootstrap.

The reason for using memcached bootstrap is that in this case there is no bootstrapping at all necessary.