Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Explicitly unmanage veth interfaces (#701)" #705

Merged
merged 1 commit into from
Feb 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()))
}
}