VOL-3479 Correct flow information in failed add flows logs
Change-Id: Ie41489a4d5c078e75b79f4876c1e8ad776731a5f
diff --git a/rw_core/core/device/logical_agent_flow.go b/rw_core/core/device/logical_agent_flow.go
index 53209a1..e9e53dd 100644
--- a/rw_core/core/device/logical_agent_flow.go
+++ b/rw_core/core/device/logical_agent_flow.go
@@ -20,6 +20,8 @@
"context"
"errors"
"fmt"
+ "strconv"
+
"github.com/gogo/protobuf/proto"
"github.com/opencord/voltha-go/rw_core/route"
coreutils "github.com/opencord/voltha-go/rw_core/utils"
@@ -29,7 +31,6 @@
"github.com/opencord/voltha-protos/v3/go/voltha"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
- "strconv"
)
// listLogicalDeviceFlows returns logical device flows
@@ -168,18 +169,18 @@
go func() {
// Wait for completion
if res := coreutils.WaitForNilOrErrorResponses(agent.defaultTimeout, respChannels...); res != nil {
- logger.Infow(ctx, "failed-to-add-flows-will-attempt-deletion", log.Fields{
+ logger.Infow(ctx, "failed-to-add-flow-will-attempt-deletion", log.Fields{
"errors": res,
"logical-device-id": agent.logicalDeviceID,
- "flows": flows,
+ "flow": flow,
"groups": groups,
})
// Revert added flows
if err := agent.revertAddedFlows(log.WithSpanFromContext(context.Background(), ctx), mod, flow, flowToReplace, deviceRules, toMetadata(flowMeterConfig)); err != nil {
- logger.Errorw(ctx, "failure-to-delete-flows-after-failed-addition", log.Fields{
+ logger.Errorw(ctx, "failure-to-delete-flow-after-failed-addition", log.Fields{
"error": err,
"logical-device-id": agent.logicalDeviceID,
- "flows": flows,
+ "flow": flow,
"groups": groups,
})
}