[VOL-5402]-VGC all fixes till date from jan 2024
Change-Id: I2857e0ef9b1829a28c6e3ad04da96b826cb900b6
Signed-off-by: Akash Soni <akash.soni@radisys.com>
diff --git a/internal/pkg/vpagent/connection.go b/internal/pkg/vpagent/connection.go
index 4c274d4..971b8b4 100644
--- a/internal/pkg/vpagent/connection.go
+++ b/internal/pkg/vpagent/connection.go
@@ -23,7 +23,6 @@
"voltha-go-controller/log"
"github.com/golang/protobuf/ptypes/empty"
- "github.com/opencord/voltha-lib-go/v7/pkg/probe"
"github.com/opencord/voltha-protos/v5/go/voltha"
"google.golang.org/grpc"
)
@@ -31,11 +30,7 @@
// GrpcMaxSize Max size of grpc message
const GrpcMaxSize int = 17455678
-func (vpa *VPAgent) establishConnectionToVoltha(ctx context.Context, p *probe.Probe) error {
- if p != nil {
- p.UpdateStatus(ctx, "voltha", probe.ServiceStatusPreparing)
- }
-
+func (vpa *VPAgent) establishConnectionToVoltha(ctx context.Context) error {
if vpa.volthaConnection != nil {
vpa.volthaConnection.Close()
}
@@ -55,9 +50,6 @@
})
vpa.volthaConnection = conn
vpa.volthaClient.Set(svc)
- if p != nil {
- p.UpdateStatus(ctx, "voltha", probe.ServiceStatusRunning)
- }
vpa.events <- vpaEventVolthaConnected
return nil
}
@@ -75,9 +67,6 @@
time.Sleep(vpa.ConnectionRetryDelay)
}
}
- if p != nil {
- p.UpdateStatus(ctx, "voltha", probe.ServiceStatusFailed)
- }
return errors.New("failed-to-connect-to-voltha")
}
diff --git a/internal/pkg/vpagent/volthaprotoagent.go b/internal/pkg/vpagent/volthaprotoagent.go
index 3d962ef..893f69d 100644
--- a/internal/pkg/vpagent/volthaprotoagent.go
+++ b/internal/pkg/vpagent/volthaprotoagent.go
@@ -26,7 +26,6 @@
"voltha-go-controller/log"
- "github.com/opencord/voltha-lib-go/v7/pkg/probe"
ofp "github.com/opencord/voltha-protos/v5/go/openflow_13"
"github.com/opencord/voltha-protos/v5/go/voltha"
"google.golang.org/grpc"
@@ -137,12 +136,6 @@
log.Fields{
"voltha-endpoint": vpa.VolthaAPIEndPoint})
- // If the context contains a k8s probe then register services
- p := probe.GetProbeFromContext(ctx)
- if p != nil {
- p.RegisterService(ctx, "voltha")
- }
-
vpa.events <- vpaEventStart
/*
@@ -185,7 +178,7 @@
// connection to voltha
state = vpaStateConnecting
go func() {
- if err := vpa.establishConnectionToVoltha(hdlCtx, p); err != nil {
+ if err := vpa.establishConnectionToVoltha(hdlCtx); err != nil {
logger.Fatalw(ctx, "voltha-connection-failed", log.Fields{"error": err})
}
}()
@@ -204,9 +197,6 @@
}
case vpaEventVolthaDisconnected:
- if p != nil {
- p.UpdateStatus(ctx, "voltha", probe.ServiceStatusNotReady)
- }
logger.Debug(ctx, "vpagent-voltha-disconnect-event")
if state == vpaStateConnected {
state = vpaStateDisconnected
@@ -218,7 +208,7 @@
state = vpaStateConnecting
go func() {
hdlCtx, hdlDone = context.WithCancel(context.Background())
- if err := vpa.establishConnectionToVoltha(hdlCtx, p); err != nil {
+ if err := vpa.establishConnectionToVoltha(hdlCtx); err != nil {
logger.Fatalw(ctx, "voltha-connection-failed", log.Fields{"error": err})
}
}()