[VOL-4280] Document kv_store_data_prefix
Change-Id: I12891a41c04649452a1254bf8f8e08c774307501
diff --git a/Makefile b/Makefile
index 33b28d3..4f89b65 100644
--- a/Makefile
+++ b/Makefile
@@ -67,9 +67,9 @@
## Local Development Helpers
local-lib-go:
ifdef LOCAL_LIB_GO
- rm -rf vendor/github.com/opencord/voltha-lib-go/v5/pkg
- mkdir -p vendor/github.com/opencord/voltha-lib-go/v5/pkg
- cp -r ${LOCAL_LIB_GO}/pkg/* vendor/github.com/opencord/voltha-lib-go/v5/pkg/
+ rm -rf vendor/github.com/opencord/voltha-lib-go/v6/pkg
+ mkdir -p vendor/github.com/opencord/voltha-lib-go/v6/pkg
+ cp -r ${LOCAL_LIB_GO}/pkg/* vendor/github.com/opencord/voltha-lib-go/v6/pkg/
endif
build: local-lib-go
diff --git a/README.md b/README.md
index 1c195ff..7eab3a4 100644
--- a/README.md
+++ b/README.md
@@ -228,6 +228,27 @@
adapter-open-olt main
```
+If you do not see packages in your output it is possible you are not retrieving the data from the correct path in ``ETCD``.
+The data is stored according to the helm chart defined value for `kv_store_data_prefix`.
+
+If you deployed according to the README in the [voltha-helm-charts README]() the value for `kv_store_data_prefix` is
+`service/voltha/{{ .Release.Name }}_{{ .Values.global.stack_name }}`, e.g `service/voltha/voltha1_voltha1`.
+
+If you are unsure about the `kv_store_data_prefix` you can check through one of the pods, e.g. `rw-core`.
+Make sure to use the correct namespace for `-n` by checking it with `kubectl get pods -A` and then issue:
+```shell
+$ kubectl describe -n voltha1 $(kubectl -n voltha1 get pods -l app=rw-core -o name) | grep KV
+KV_STORE_DATAPATH_PREFIX: service/voltha/voltha1_voltha1
+```
+
+You can set the path for any `voltctl` command by exporting the `KV_STORE_DATAPATH_PREFIX` variable,
+e.g. `KV_STORE_DATAPATH_PREFIX=service/voltha/voltha1_voltha1`.
+
+A full example command is:
+```shell
+KV_STORE_DATAPATH_PREFIX=service/voltha/voltha1_voltha1 voltctl log package list adapter-open-olt
+```
+
### Configuring the message size
When you run VOLTHA with a high number of OLTs/ONUs is possible that the gRPC response exceeds the default 4MB in size.
diff --git a/go.mod b/go.mod
index cc9b221..7c87dcc 100644
--- a/go.mod
+++ b/go.mod
@@ -9,7 +9,7 @@
github.com/imdario/mergo v0.3.7 // indirect
github.com/jessevdk/go-flags v1.4.0
github.com/jhump/protoreflect v1.5.0
- github.com/opencord/voltha-lib-go/v5 v5.0.5
+ github.com/opencord/voltha-lib-go/v6 v6.0.2
github.com/opencord/voltha-protos/v4 v4.2.0
github.com/stretchr/testify v1.4.0
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 // indirect
diff --git a/go.sum b/go.sum
index 0f2f9a7..9c21b34 100644
--- a/go.sum
+++ b/go.sum
@@ -158,8 +158,8 @@
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v0.0.0-20190113212917-5533ce8a0da3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/onsi/gomega v1.4.2/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
-github.com/opencord/voltha-lib-go/v5 v5.0.5 h1:S3m984EaHNGJY68Hrv9LOf0rwd92UiVLFBBbTaL+fNg=
-github.com/opencord/voltha-lib-go/v5 v5.0.5/go.mod h1:i1fwPMicFccG38L200+IQAlfHSbszWg//jF1pDQxTPQ=
+github.com/opencord/voltha-lib-go/v6 v6.0.2 h1:eZLymLeojoPPu+uEyMVpUrKMSbsmcBmSCRclIyiKlAs=
+github.com/opencord/voltha-lib-go/v6 v6.0.2/go.mod h1:Uc1IjN1JnocQxxtO1gjOxLuE2v1X4enByjsYd6rvvpY=
github.com/opencord/voltha-protos/v4 v4.2.0 h1:QJZqHPRKa1E1xh40F3UA4xSjBI+6EmW7OfIcJqPNc4A=
github.com/opencord/voltha-protos/v4 v4.2.0/go.mod h1:wNzWqmTwe7+DbYbpmOX6eMlglREtMkNxIDv3lyI2bco=
github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU=
diff --git a/internal/pkg/commands/log.go b/internal/pkg/commands/log.go
index 44eb582..ecd3e5f 100644
--- a/internal/pkg/commands/log.go
+++ b/internal/pkg/commands/log.go
@@ -25,9 +25,9 @@
flags "github.com/jessevdk/go-flags"
"github.com/opencord/voltctl/pkg/format"
"github.com/opencord/voltctl/pkg/model"
- "github.com/opencord/voltha-lib-go/v5/pkg/config"
- "github.com/opencord/voltha-lib-go/v5/pkg/db/kvstore"
- "github.com/opencord/voltha-lib-go/v5/pkg/log"
+ "github.com/opencord/voltha-lib-go/v6/pkg/config"
+ "github.com/opencord/voltha-lib-go/v6/pkg/db/kvstore"
+ "github.com/opencord/voltha-lib-go/v6/pkg/log"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/clientcmd"
diff --git a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/config/common.go b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/config/common.go
similarity index 94%
rename from vendor/github.com/opencord/voltha-lib-go/v5/pkg/config/common.go
rename to vendor/github.com/opencord/voltha-lib-go/v6/pkg/config/common.go
index 606d18c..66a866e 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/config/common.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/config/common.go
@@ -16,7 +16,7 @@
package config
import (
- "github.com/opencord/voltha-lib-go/v5/pkg/log"
+ "github.com/opencord/voltha-lib-go/v6/pkg/log"
)
var logger log.CLogger
diff --git a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/config/configmanager.go b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/config/configmanager.go
similarity index 97%
rename from vendor/github.com/opencord/voltha-lib-go/v5/pkg/config/configmanager.go
rename to vendor/github.com/opencord/voltha-lib-go/v6/pkg/config/configmanager.go
index f5efa36..27c6426 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/config/configmanager.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/config/configmanager.go
@@ -22,14 +22,14 @@
"strings"
"time"
- "github.com/opencord/voltha-lib-go/v5/pkg/db"
- "github.com/opencord/voltha-lib-go/v5/pkg/db/kvstore"
- "github.com/opencord/voltha-lib-go/v5/pkg/log"
+ "github.com/opencord/voltha-lib-go/v6/pkg/db"
+ "github.com/opencord/voltha-lib-go/v6/pkg/db/kvstore"
+ "github.com/opencord/voltha-lib-go/v6/pkg/log"
)
const (
defaultkvStoreConfigPath = "config"
- defaultkvStoreDataPathPrefix = "service/voltha_voltha"
+ defaultkvStoreDataPathPrefix = "service/voltha/voltha1_voltha1"
kvStorePathSeparator = "/"
)
diff --git a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/config/logcontroller.go b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/config/logcontroller.go
similarity index 99%
rename from vendor/github.com/opencord/voltha-lib-go/v5/pkg/config/logcontroller.go
rename to vendor/github.com/opencord/voltha-lib-go/v6/pkg/config/logcontroller.go
index 68bfb32..914ea25 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/config/logcontroller.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/config/logcontroller.go
@@ -26,7 +26,7 @@
"crypto/md5"
"encoding/json"
"errors"
- "github.com/opencord/voltha-lib-go/v5/pkg/log"
+ "github.com/opencord/voltha-lib-go/v6/pkg/log"
"os"
"sort"
"strings"
diff --git a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/config/logfeaturescontroller.go b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/config/logfeaturescontroller.go
similarity index 99%
rename from vendor/github.com/opencord/voltha-lib-go/v5/pkg/config/logfeaturescontroller.go
rename to vendor/github.com/opencord/voltha-lib-go/v6/pkg/config/logfeaturescontroller.go
index 95c5bde..8e3b9fa 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/config/logfeaturescontroller.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/config/logfeaturescontroller.go
@@ -19,7 +19,7 @@
import (
"context"
"errors"
- "github.com/opencord/voltha-lib-go/v5/pkg/log"
+ "github.com/opencord/voltha-lib-go/v6/pkg/log"
"os"
"strings"
)
diff --git a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/db/backend.go b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/db/backend.go
similarity index 98%
rename from vendor/github.com/opencord/voltha-lib-go/v5/pkg/db/backend.go
rename to vendor/github.com/opencord/voltha-lib-go/v6/pkg/db/backend.go
index ff0b5b7..431970d 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/db/backend.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/db/backend.go
@@ -23,8 +23,8 @@
"sync"
"time"
- "github.com/opencord/voltha-lib-go/v5/pkg/db/kvstore"
- "github.com/opencord/voltha-lib-go/v5/pkg/log"
+ "github.com/opencord/voltha-lib-go/v6/pkg/db/kvstore"
+ "github.com/opencord/voltha-lib-go/v6/pkg/log"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
diff --git a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/db/common.go b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/db/common.go
similarity index 94%
rename from vendor/github.com/opencord/voltha-lib-go/v5/pkg/db/common.go
rename to vendor/github.com/opencord/voltha-lib-go/v6/pkg/db/common.go
index 4bc92b1..422740b 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/db/common.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/db/common.go
@@ -16,7 +16,7 @@
package db
import (
- "github.com/opencord/voltha-lib-go/v5/pkg/log"
+ "github.com/opencord/voltha-lib-go/v6/pkg/log"
)
var logger log.CLogger
diff --git a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/db/kvstore/client.go b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/db/kvstore/client.go
similarity index 100%
rename from vendor/github.com/opencord/voltha-lib-go/v5/pkg/db/kvstore/client.go
rename to vendor/github.com/opencord/voltha-lib-go/v6/pkg/db/kvstore/client.go
diff --git a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/db/kvstore/common.go b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/db/kvstore/common.go
similarity index 94%
rename from vendor/github.com/opencord/voltha-lib-go/v5/pkg/db/kvstore/common.go
rename to vendor/github.com/opencord/voltha-lib-go/v6/pkg/db/kvstore/common.go
index b8509db..a0edae1 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/db/kvstore/common.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/db/kvstore/common.go
@@ -16,7 +16,7 @@
package kvstore
import (
- "github.com/opencord/voltha-lib-go/v5/pkg/log"
+ "github.com/opencord/voltha-lib-go/v6/pkg/log"
)
var logger log.CLogger
diff --git a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/db/kvstore/etcdclient.go b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/db/kvstore/etcdclient.go
similarity index 99%
rename from vendor/github.com/opencord/voltha-lib-go/v5/pkg/db/kvstore/etcdclient.go
rename to vendor/github.com/opencord/voltha-lib-go/v6/pkg/db/kvstore/etcdclient.go
index 96ffc2f..88b5b45 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/db/kvstore/etcdclient.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/db/kvstore/etcdclient.go
@@ -19,7 +19,7 @@
"context"
"errors"
"fmt"
- "github.com/opencord/voltha-lib-go/v5/pkg/log"
+ "github.com/opencord/voltha-lib-go/v6/pkg/log"
v3Client "go.etcd.io/etcd/clientv3"
v3rpcTypes "go.etcd.io/etcd/etcdserver/api/v3rpc/rpctypes"
"os"
diff --git a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/db/kvstore/etcdpool.go b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/db/kvstore/etcdpool.go
similarity index 98%
rename from vendor/github.com/opencord/voltha-lib-go/v5/pkg/db/kvstore/etcdpool.go
rename to vendor/github.com/opencord/voltha-lib-go/v6/pkg/db/kvstore/etcdpool.go
index 6af7d3d..7ac2511 100644
--- a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/db/kvstore/etcdpool.go
+++ b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/db/kvstore/etcdpool.go
@@ -19,7 +19,7 @@
"container/list"
"context"
"errors"
- "github.com/opencord/voltha-lib-go/v5/pkg/log"
+ "github.com/opencord/voltha-lib-go/v6/pkg/log"
"go.etcd.io/etcd/clientv3"
"sync"
"time"
diff --git a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/db/kvstore/kvutils.go b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/db/kvstore/kvutils.go
similarity index 100%
rename from vendor/github.com/opencord/voltha-lib-go/v5/pkg/db/kvstore/kvutils.go
rename to vendor/github.com/opencord/voltha-lib-go/v6/pkg/db/kvstore/kvutils.go
diff --git a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/log/common.go b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/log/common.go
similarity index 100%
rename from vendor/github.com/opencord/voltha-lib-go/v5/pkg/log/common.go
rename to vendor/github.com/opencord/voltha-lib-go/v6/pkg/log/common.go
diff --git a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/log/log.go b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/log/log.go
similarity index 100%
rename from vendor/github.com/opencord/voltha-lib-go/v5/pkg/log/log.go
rename to vendor/github.com/opencord/voltha-lib-go/v6/pkg/log/log.go
diff --git a/vendor/github.com/opencord/voltha-lib-go/v5/pkg/log/utils.go b/vendor/github.com/opencord/voltha-lib-go/v6/pkg/log/utils.go
similarity index 100%
rename from vendor/github.com/opencord/voltha-lib-go/v5/pkg/log/utils.go
rename to vendor/github.com/opencord/voltha-lib-go/v6/pkg/log/utils.go
diff --git a/vendor/modules.txt b/vendor/modules.txt
index b39091d..b465e75 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -71,12 +71,12 @@
github.com/modern-go/concurrent
# github.com/modern-go/reflect2 v1.0.1
github.com/modern-go/reflect2
-# github.com/opencord/voltha-lib-go/v5 v5.0.5
+# github.com/opencord/voltha-lib-go/v6 v6.0.2
## explicit
-github.com/opencord/voltha-lib-go/v5/pkg/config
-github.com/opencord/voltha-lib-go/v5/pkg/db
-github.com/opencord/voltha-lib-go/v5/pkg/db/kvstore
-github.com/opencord/voltha-lib-go/v5/pkg/log
+github.com/opencord/voltha-lib-go/v6/pkg/config
+github.com/opencord/voltha-lib-go/v6/pkg/db
+github.com/opencord/voltha-lib-go/v6/pkg/db/kvstore
+github.com/opencord/voltha-lib-go/v6/pkg/log
# github.com/opencord/voltha-protos/v4 v4.2.0
## explicit
github.com/opencord/voltha-protos/v4/go/common