Skip to content
This repository was archived by the owner on Jul 28, 2018. It is now read-only.
This repository was archived by the owner on Jul 28, 2018. It is now read-only.

BCDB module need to use a ZDB client not a ZDB server #45

@zaibon

Description

@zaibon

Currently the bcdb module relies on the existence of a zdb server instance to work:

def get(self, instance):
s = j.servers.zdb.get(instance=instance)
data = {}
data["zdb_adminsecret_"] = s.config.data["adminsecret_"]
data["zdb_port"] = str(s.config.data["port"])
bcdb = self._child_class(instance=instance, data=data, parent=self, interactive=False)
bcdb.server = s
return bcdb

Then in the bcdb code, the zdb server instance is used to get a client to zdb:

self.db = self.bcdb.server.client_get(namespace=self.name, secret=s.config.data["adminsecret_"])

Which mean we actually don't need to pass by a zdb server instance at all. The current implementation also disallow to use a remote zdb since the zdb server instance has only a notion of port and not of address. So it is silently suppsed tha zdb is running locally.

So to fix this, I'll change bcdb module to requires a zdb client.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions