Your message dated Sat, 09 Jul 2016 23:48:45 +0000
with message-id <e1bm1zj-0005yv...@franck.debian.org>
and subject line Bug#830656: fixed in golang-github-docker-libnetwork 
0.7.2~rc.1+dfsg-1
has caused the Debian Bug report #830656,
regarding src:golang-github-docker-libnetwork: FTBFS due to libkv changes
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
830656: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=830656
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: src:golang-github-docker-libnetwork
Version: 0.7.0~rc.6+dfsg-2
Severity: serious

The newest upload of "docker-libkv" changed the API slightly, causing
the current libnetwork version to FTBFS.

| # github.com/docker/libnetwork/datastore
| src/github.com/docker/libnetwork/datastore/cache.go:47: undefined:
boltdb.ErrBoltBucketNotFound

https://github.com/docker/libnetwork/commit/b6b3642560f59f930d1ecf49d2991d74077d05f9
(https://github.com/docker/libnetwork/pull/1120) from upstream appears
to be the appropriate fix.

I've done a build test with the attached patch (downloaded via
https://github.com/docker/libnetwork/commit/b6b3642560f59f930d1ecf49d2991d74077d05f9.patch
and only DEP-3 headers modified), and it appears to resolve the issue.

♥,
- Tianon
  4096R / B42F 6819 007F 00F8 8E36  4FD4 036A 9C25 BF35 7DD4
Subject: Remove kvstore deps from datastore package
Author: Jana Radhakrishnan <mrj...@docker.com>
Applied-Upstream: https://github.com/docker/libnetwork/commit/b6b3642560f59f930d1ecf49d2991d74077d05f9, https://github.com/docker/libnetwork/pull/1120, v0.8.0-dev.2

diff --git a/bitseq/sequence_test.go b/bitseq/sequence_test.go
index d435329..339f592 100644
--- a/bitseq/sequence_test.go
+++ b/bitseq/sequence_test.go
@@ -8,6 +8,7 @@ import (
 	"time"
 
 	"github.com/docker/libkv/store"
+	"github.com/docker/libkv/store/boltdb"
 	"github.com/docker/libnetwork/datastore"
 	_ "github.com/docker/libnetwork/testutils"
 )
@@ -16,6 +17,10 @@ const (
 	defaultPrefix = "/tmp/libnetwork/test/bitseq"
 )
 
+func init() {
+	boltdb.Register()
+}
+
 func randomLocalStore() (datastore.DataStore, error) {
 	tmp, err := ioutil.TempFile("", "libnetwork-")
 	if err != nil {
diff --git a/datastore/cache.go b/datastore/cache.go
index 08c8ac4..2d00038 100644
--- a/datastore/cache.go
+++ b/datastore/cache.go
@@ -5,7 +5,6 @@ import (
 	"sync"
 
 	"github.com/docker/libkv/store"
-	"github.com/docker/libkv/store/boltdb"
 )
 
 type kvMap map[string]KVObject
@@ -42,9 +41,7 @@ func (c *cache) kmap(kvObject KVObject) (kvMap, error) {
 
 	kvList, err := c.ds.store.List(keyPrefix)
 	if err != nil {
-		// In case of BoltDB it may return ErrBoltBucketNotFound when no writes
-		// have ever happened on the db bucket. So check for both err codes
-		if err == store.ErrKeyNotFound || err == boltdb.ErrBoltBucketNotFound {
+		if err == store.ErrKeyNotFound {
 			// If the store doesn't have anything then there is nothing to
 			// populate in the cache. Just bail out.
 			goto out
diff --git a/datastore/datastore.go b/datastore/datastore.go
index c15cd62..49affc7 100644
--- a/datastore/datastore.go
+++ b/datastore/datastore.go
@@ -9,10 +9,6 @@ import (
 
 	"github.com/docker/libkv"
 	"github.com/docker/libkv/store"
-	"github.com/docker/libkv/store/boltdb"
-	"github.com/docker/libkv/store/consul"
-	"github.com/docker/libkv/store/etcd"
-	"github.com/docker/libkv/store/zookeeper"
 	"github.com/docker/libnetwork/discoverapi"
 	"github.com/docker/libnetwork/types"
 )
@@ -148,13 +144,6 @@ func makeDefaultScopes() map[string]*ScopeCfg {
 var defaultRootChain = []string{"docker", "network", "v1.0"}
 var rootChain = defaultRootChain
 
-func init() {
-	consul.Register()
-	zookeeper.Register()
-	etcd.Register()
-	boltdb.Register()
-}
-
 // DefaultScopes returns a map of default scopes and it's config for clients to use.
 func DefaultScopes(dataDir string) map[string]*ScopeCfg {
 	if dataDir != "" {
@@ -411,6 +400,9 @@ func (ds *datastore) PutObjectAtomic(kvObject KVObject) error {
 
 	_, pair, err = ds.store.AtomicPut(Key(kvObject.Key()...), kvObjValue, previous, nil)
 	if err != nil {
+		if err == store.ErrKeyExists {
+			return ErrKeyModified
+		}
 		return err
 	}
 
@@ -571,6 +563,9 @@ func (ds *datastore) DeleteObjectAtomic(kvObject KVObject) error {
 	}
 
 	if _, err := ds.store.AtomicDelete(Key(kvObject.Key()...), previous); err != nil {
+		if err == store.ErrKeyExists {
+			return ErrKeyModified
+		}
 		return err
 	}
 
diff --git a/drivers/bridge/bridge_store.go b/drivers/bridge/bridge_store.go
index eca72bd..de96352 100644
--- a/drivers/bridge/bridge_store.go
+++ b/drivers/bridge/bridge_store.go
@@ -6,7 +6,6 @@ import (
 	"net"
 
 	"github.com/Sirupsen/logrus"
-	"github.com/docker/libkv/store/boltdb"
 	"github.com/docker/libnetwork/datastore"
 	"github.com/docker/libnetwork/discoverapi"
 	"github.com/docker/libnetwork/netlabel"
@@ -35,7 +34,7 @@ func (d *driver) initStore(option map[string]interface{}) error {
 
 func (d *driver) populateNetworks() error {
 	kvol, err := d.store.List(datastore.Key(bridgePrefix), &networkConfiguration{})
-	if err != nil && err != datastore.ErrKeyNotFound && err != boltdb.ErrBoltBucketNotFound {
+	if err != nil && err != datastore.ErrKeyNotFound {
 		return fmt.Errorf("failed to get bridge network configurations from store: %v", err)
 	}
 
diff --git a/drivers/ipvlan/ipvlan_store.go b/drivers/ipvlan/ipvlan_store.go
index f6746da..c643083 100644
--- a/drivers/ipvlan/ipvlan_store.go
+++ b/drivers/ipvlan/ipvlan_store.go
@@ -5,7 +5,6 @@ import (
 	"fmt"
 
 	"github.com/Sirupsen/logrus"
-	"github.com/docker/libkv/store/boltdb"
 	"github.com/docker/libnetwork/datastore"
 	"github.com/docker/libnetwork/discoverapi"
 	"github.com/docker/libnetwork/netlabel"
@@ -60,7 +59,7 @@ func (d *driver) initStore(option map[string]interface{}) error {
 // populateNetworks is invoked at driver init to recreate persistently stored networks
 func (d *driver) populateNetworks() error {
 	kvol, err := d.store.List(datastore.Key(ipvlanPrefix), &configuration{})
-	if err != nil && err != datastore.ErrKeyNotFound && err != boltdb.ErrBoltBucketNotFound {
+	if err != nil && err != datastore.ErrKeyNotFound {
 		return fmt.Errorf("failed to get ipvlan network configurations from store: %v", err)
 	}
 	// If empty it simply means no ipvlan networks have been created yet
diff --git a/drivers/macvlan/macvlan_store.go b/drivers/macvlan/macvlan_store.go
index 492ea93..5f92fea 100644
--- a/drivers/macvlan/macvlan_store.go
+++ b/drivers/macvlan/macvlan_store.go
@@ -5,7 +5,6 @@ import (
 	"fmt"
 
 	"github.com/Sirupsen/logrus"
-	"github.com/docker/libkv/store/boltdb"
 	"github.com/docker/libnetwork/datastore"
 	"github.com/docker/libnetwork/discoverapi"
 	"github.com/docker/libnetwork/netlabel"
@@ -60,7 +59,7 @@ func (d *driver) initStore(option map[string]interface{}) error {
 // populateNetworks is invoked at driver init to recreate persistently stored networks
 func (d *driver) populateNetworks() error {
 	kvol, err := d.store.List(datastore.Key(macvlanPrefix), &configuration{})
-	if err != nil && err != datastore.ErrKeyNotFound && err != boltdb.ErrBoltBucketNotFound {
+	if err != nil && err != datastore.ErrKeyNotFound {
 		return fmt.Errorf("failed to get macvlan network configurations from store: %v", err)
 	}
 	// If empty it simply means no macvlan networks have been created yet
diff --git a/ipam/allocator.go b/ipam/allocator.go
index 70fe06e..8b4896f 100644
--- a/ipam/allocator.go
+++ b/ipam/allocator.go
@@ -6,6 +6,7 @@ import (
 	"sync"
 
 	log "github.com/Sirupsen/logrus"
+	"github.com/docker/libkv/store/boltdb"
 	"github.com/docker/libnetwork/bitseq"
 	"github.com/docker/libnetwork/datastore"
 	"github.com/docker/libnetwork/discoverapi"
@@ -25,6 +26,10 @@ const (
 	dsDataKey   = "ipam/" + ipamapi.DefaultIPAM + "/data"
 )
 
+func init() {
+	boltdb.Register()
+}
+
 // Allocator provides per address space ipv4/ipv6 book keeping
 type Allocator struct {
 	// Predefined pools for default address spaces
diff --git a/store.go b/store.go
index 2c439dc..0e7ec19 100644
--- a/store.go
+++ b/store.go
@@ -4,9 +4,20 @@ import (
 	"fmt"
 
 	log "github.com/Sirupsen/logrus"
+	"github.com/docker/libkv/store/boltdb"
+	"github.com/docker/libkv/store/consul"
+	"github.com/docker/libkv/store/etcd"
+	"github.com/docker/libkv/store/zookeeper"
 	"github.com/docker/libnetwork/datastore"
 )
 
+func registerKVStores() {
+	consul.Register()
+	zookeeper.Register()
+	etcd.Register()
+	boltdb.Register()
+}
+
 func (c *controller) initScopedStore(scope string, scfg *datastore.ScopeCfg) error {
 	store, err := datastore.NewDataStore(scope, scfg)
 	if err != nil {
@@ -20,6 +31,8 @@ func (c *controller) initScopedStore(scope string, scfg *datastore.ScopeCfg) err
 }
 
 func (c *controller) initStores() error {
+	registerKVStores()
+
 	c.Lock()
 	if c.cfg == nil {
 		c.Unlock()

--- End Message ---
--- Begin Message ---
Source: golang-github-docker-libnetwork
Source-Version: 0.7.2~rc.1+dfsg-1

We believe that the bug you reported is fixed in the latest version of
golang-github-docker-libnetwork, which is due to be installed in the Debian FTP 
archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 830...@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Dmitry Smirnov <only...@debian.org> (supplier of updated 
golang-github-docker-libnetwork package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmas...@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sun, 10 Jul 2016 09:38:37 +1000
Source: golang-github-docker-libnetwork
Binary: golang-github-docker-libnetwork-dev
Architecture: source all
Version: 0.7.2~rc.1+dfsg-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Go Packaging Team 
<pkg-go-maintainers@lists.alioth.debian.org>
Changed-By: Dmitry Smirnov <only...@debian.org>
Description:
 golang-github-docker-libnetwork-dev - Docker Networking
Closes: 830656
Changes:
 golang-github-docker-libnetwork (0.7.2~rc.1+dfsg-1) unstable; urgency=medium
 .
   [ Paul Tagliamonte ]
   * Use a secure transport for the Vcs-Git and Vcs-Browser URL
 .
   [ Dmitry Smirnov ]
   * New upstream version.
   * New patch to fix FTBFS with libkv v0.2.0 (Closes: #830656).
     Thanks, Tianon Gravi.
Checksums-Sha1:
 9668d60b7a766568f49400d9f253ed6aa5b43bd5 2854 
golang-github-docker-libnetwork_0.7.2~rc.1+dfsg-1.dsc
 6d9b2bbd911ba09cc06c471bca9f8438c0bf065e 290340 
golang-github-docker-libnetwork_0.7.2~rc.1+dfsg.orig.tar.xz
 7aa752df9d1e29240351773cd906f9a7a9a26321 10920 
golang-github-docker-libnetwork_0.7.2~rc.1+dfsg-1.debian.tar.xz
 3364f7e633e683abfe25c5953b0cc70b0c1957c8 258830 
golang-github-docker-libnetwork-dev_0.7.2~rc.1+dfsg-1_all.deb
Checksums-Sha256:
 bb8a7f481214b675cb9c0d1c7475a485ac7899ef0b9a3172de46b31e5249bf18 2854 
golang-github-docker-libnetwork_0.7.2~rc.1+dfsg-1.dsc
 7f23a765700ca453cc46dcd23b0663e59bd2e0e7201a6ae053538e4d78579f14 290340 
golang-github-docker-libnetwork_0.7.2~rc.1+dfsg.orig.tar.xz
 5107f2ee30aa7ec28af238880accaf765423ecb1138db8e2f04e8b526ee67d97 10920 
golang-github-docker-libnetwork_0.7.2~rc.1+dfsg-1.debian.tar.xz
 85de824e27c6a91631d9f32f75cc0180b6cbe9f5c0b12039bd7ae8e2f315c3a1 258830 
golang-github-docker-libnetwork-dev_0.7.2~rc.1+dfsg-1_all.deb
Files:
 6e2a37c1a7b1754e8128f25c5865300e 2854 devel extra 
golang-github-docker-libnetwork_0.7.2~rc.1+dfsg-1.dsc
 05ac8163b8bad6bdbaa391320210e522 290340 devel extra 
golang-github-docker-libnetwork_0.7.2~rc.1+dfsg.orig.tar.xz
 b5ce48364bf36bced62f347012d50bca 10920 devel extra 
golang-github-docker-libnetwork_0.7.2~rc.1+dfsg-1.debian.tar.xz
 a247c026a1c75f960b31d60291dc4f60 258830 devel extra 
golang-github-docker-libnetwork-dev_0.7.2~rc.1+dfsg-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJXgYw6AAoJEFK2u9lTlo0bVeEP/1LYwjOt+aIIBDluQSh2Ys4x
LiUg9IXIcYmN/Y0umg7XQfMh3rfY/UwFuNcd5dOR9+tu89K2kYCh3TIVJKOmUNDU
Bg3OfzxzMD3fzVh7nzk4E/L0pTDiqxwV7/P0DqXqwVT7akcZsN7CLFdyTtlAtl0P
0PlC4kQf58U+m4kt0tpASdTcBZT1MxDEw061aXQjqW46xe6oVchfpEw+xctFXVS+
ofdJNgl+EdIFyHu29r6VKMldzb1f95E1LmfqrEYQh/FNL5N+LGi0vorAbkVycrft
pCufYKoaXBHoUypdoX5l41TqFJFw/vxMVTH9Y2AYUy68x7qKQ/zSyAWAMj8dNpXc
C0cQorP/k271WAPiK+WJaG/pkwaeUEhH82TUbQmfAg2OzIi++HUm/B1yrLmMrXOU
wop4C80G822F7OMQvkpjJwx6eqSQTZ3k9tBfBuAspSBR8m6aJ773G7wxzHab7939
1X5qlbkAtdAVhknI4qSM8LwvPOVGEBNEeddgVjNSZ5aLrvaZcnpyJrI5AZSuHaNB
QKMYATFKvUNnxHgL4R/ASsYB6b/pbPTYOUboxYm1fN8tMADD+cxbsw39yUPDv4Sj
SLFbcURHHC6jf7WikaBzLjYrlG0cB3/FaOhEmxV0kmtQnYa6VB078lOD8atg+6Lu
Swb3E8qFZy8yojQRAHxb
=X+m4
-----END PGP SIGNATURE-----

--- End Message ---
_______________________________________________
Pkg-go-maintainers mailing list
Pkg-go-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-go-maintainers

Reply via email to