Skip to content

Commit

Permalink
Revert "Explicitly unmanage veth interfaces (nmstate#701)"
Browse files Browse the repository at this point in the history
This reverts commit f717775.

Signed-off-by: Petr Horáček <[email protected]>
  • Loading branch information
phoracek authored and kubevirt-bot committed Feb 26, 2021
1 parent d6330e1 commit ab8fbf1
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 28 deletions.
6 changes: 0 additions & 6 deletions build/bin/unmanaged-veth

This file was deleted.

6 changes: 0 additions & 6 deletions deploy/handler/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ spec:
volumeMounts:
- name: dbus-socket
mountPath: /run/dbus/system_bus_socket
- name: networkmanager-config
mountPath: /host/etc/NetworkManager/conf.d
- name: nmstate-lock
mountPath: /var/k8s_nmstate
securityContext:
Expand All @@ -164,10 +162,6 @@ spec:
hostPath:
path: /run/dbus/system_bus_socket
type: Socket
- name: networkmanager-config
hostPath:
path: /etc/NetworkManager/conf.d
type: Directory
- name: nmstate-lock
hostPath:
path: /var/k8s_nmstate
Expand Down
16 changes: 0 additions & 16 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ limitations under the License.
package main

import (
"bytes"
"flag"
"fmt"
"net/http"
_ "net/http/pprof"
"os"
"os/exec"
"time"

"k8s.io/apimachinery/pkg/runtime"
Expand All @@ -47,8 +45,6 @@ import (
"github.com/nmstate/kubernetes-nmstate/pkg/webhook"
)

const unmanagedVethCommand = "unmanaged-veth"

type ProfilerConfig struct {
EnableProfiler bool `envconfig:"ENABLE_PROFILER"`
ProfilerPort string `envconfig:"PROFILER_PORT" default:"6060"`
Expand Down Expand Up @@ -85,8 +81,6 @@ func main() {
}
defer handlerLock.Unlock()
setupLog.Info("Successfully took nmstate exclusive lock")

setVethInterfacesAsUnmanaged()
}

ctrlOptions := ctrl.Options{
Expand Down Expand Up @@ -220,13 +214,3 @@ func lockHandler() (lockfile.Lockfile, error) {
})
return handlerLock, err
}

func setVethInterfacesAsUnmanaged() {
cmd := exec.Command(unmanagedVethCommand)
var stdout, stderr bytes.Buffer
cmd.Stdout = &stdout
cmd.Stderr = &stderr
if err := cmd.Run(); err != nil {
setupLog.Info(fmt.Sprintf("failed to execute %s: '%v', '%s', '%s'", unmanagedVethCommand, err, stdout.String(), stderr.String()))
}
}

0 comments on commit ab8fbf1

Please sign in to comment.