Skip to content

Commit

Permalink
Delete ovs bridge when forwarder stop
Browse files Browse the repository at this point in the history
Related issue: networkservicemesh/sdk-ovs#276
Related PR: networkservicemesh/sdk-ovs#279

Signed-off-by: Laszlo Kiraly <laszlo.kiraly@est.tech>
  • Loading branch information
ljkiraly committed Nov 10, 2023
1 parent fea3792 commit f5254d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ FROM go as build
WORKDIR /build
COPY go.mod go.sum ./
COPY . .
COPY ./local ./local
RUN go build -o /bin/forwarder .

FROM build as test
Expand Down
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2021-2022 Nordix Foundation.
// Copyright (c) 2021-2023 Nordix Foundation.
//
// Copyright (c) 2023 Cisco Foundation.
//
Expand Down Expand Up @@ -198,6 +198,7 @@ func main() {
if err != nil {
logrus.Fatalf("error configuring forwarder endpoint: %+v", err)
}
defer func() { ovsutil.DeleteBridge(ctx, config.BridgeName) }()
log.FromContext(ctx).WithField("duration", time.Since(now)).Info("completed phase 4: create ovsxconnect network service endpoint")

// ********************************************************************************
Expand Down

0 comments on commit f5254d1

Please sign in to comment.