Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1814538 - [RFE] Add Golang bindings for libnbd
Summary: [RFE] Add Golang bindings for libnbd
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: libnbd
Version: 8.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 8.0
Assignee: Richard W.M. Jones
QA Contact: liuzi
Depends On:
TreeView+ depends on / blocked
Reported: 2020-03-18 07:28 UTC by Fabien Dupont
Modified: 2020-11-14 04:42 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-04-06 11:03:46 UTC
Type: Feature Request
Target Upstream Version:

Attachments (Terms of Use)

Description Fabien Dupont 2020-03-18 07:28:37 UTC
Description of problem:

We would like to use libnbd in an Kubernetes operator written in Golang. So, we would need bindings to use libnbd natively.

Comment 1 Richard W.M. Jones 2020-03-18 09:36:32 UTC
Preliminary patches were posted upstream, but they still need a bit of work:


Comment 2 Richard W.M. Jones 2020-03-24 13:40:23 UTC
v3 posted:

Generated bindings here:

Comment 4 Richard W.M. Jones 2020-04-01 12:48:44 UTC
Full list of commits required is:

For RHEL AV I don't believe there is a way to package these bindings.
What I anticipate will happen (but don't approve) is that anyone using
these bindings will need to copy out the golang/src/ directory from
the libnbd sources.

[*VERY IMPORTANT NOTE* You MUST do this after compiling libnbd, since
most files in this directory are generated.  Just copying it from git
will NOT WORK.]

They will then bundle the bindings with their package.  It will be
compiled and linked statically into their final program (that is,
the golang bindings of libnbd, not libnbd itself).

As a result I don't think there's anything else we need to do on this
bug, and we can now close it.

Comment 5 Richard W.M. Jones 2020-04-06 11:03:46 UTC
Closing per comment 4.  It is assumed that the bindings will be
distributed ("vendored") in the package which consumes them.

Note You need to log in before you can comment on or make changes to this bug.