[lxc-devel] [lxd/master] Adapt to changed dqlite.New() signature, not requiring NodeInfo anymore
freeekanayaka on Github
lxc-bot at linuxcontainers.org
Wed Aug 28 07:25:01 UTC 2019
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 456 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190828/99c2739e/attachment.bin>
-------------- next part --------------
From 91ea3ff6da80721478d7189f5f7d274fb371ab6d Mon Sep 17 00:00:00 2001
From: Free Ekanayaka <free.ekanayaka at canonical.com>
Date: Wed, 28 Aug 2019 09:06:38 +0200
Subject: [PATCH] Adapt to changed dqlite.New() signature, not requiring
NodeInfo anymore
Signed-off-by: Free Ekanayaka <free.ekanayaka at canonical.com>
---
lxd/cluster/gateway.go | 3 ++-
lxd/db/testing.go | 3 +--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lxd/cluster/gateway.go b/lxd/cluster/gateway.go
index 13ce49aad8..1b83722abb 100644
--- a/lxd/cluster/gateway.go
+++ b/lxd/cluster/gateway.go
@@ -614,7 +614,8 @@ func (g *Gateway) init() error {
}
server, err := dqlite.New(
- raft.info,
+ raft.info.ID,
+ raft.info.Address,
dir,
options...,
)
diff --git a/lxd/db/testing.go b/lxd/db/testing.go
index 8ed351af2f..8b5fae4ab5 100644
--- a/lxd/db/testing.go
+++ b/lxd/db/testing.go
@@ -115,9 +115,8 @@ func NewTestDqliteServer(t *testing.T) (string, driver.NodeStore, func()) {
err = os.Mkdir(filepath.Join(dir, "global"), 0755)
require.NoError(t, err)
- info := driver.NodeInfo{ID: uint64(1), Address: address}
server, err := dqlite.New(
- info, filepath.Join(dir, "global"), dqlite.WithBindAddress(address))
+ uint64(1), address, filepath.Join(dir, "global"), dqlite.WithBindAddress(address))
require.NoError(t, err)
err = server.Start()
More information about the lxc-devel
mailing list