Skip to content

Commit

Permalink
Remove veth cleanup code
Browse files Browse the repository at this point in the history
This is panicking because the veth name doesn't match the name in the
container. It also leaks the network namespace, and isn't necessary once
firecracker-microvm/firecracker-go-sdk#428 is
in.
  • Loading branch information
protochron committed Aug 10, 2022
1 parent 8c700cb commit 61f17a5
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions driver/handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (
"github.com/hashicorp/nomad/client/stats"
"github.com/hashicorp/nomad/plugins/drivers"
"github.com/shirou/gopsutil/process"
"github.com/vishvananda/netlink"
)

var (
Expand Down Expand Up @@ -220,11 +219,6 @@ func (h *taskHandle) Signal(sig string) error {
// shutdown shuts down the container, with `timeout` grace period
// before shutdown vm
func (h *taskHandle) shutdown(timeout time.Duration) error {
vnic, _ := netlink.LinkByName(h.Info.Vnic)
err := netlink.LinkDel(vnic)
if err != nil {
h.logger.Error("unable to remove veth ", h.Info.Vnic, " from ", h.taskConfig.ID)
}
time.Sleep(timeout)
h.MachineInstance.StopVMM()
return nil
Expand Down

0 comments on commit 61f17a5

Please sign in to comment.