Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Commit

Permalink
Merge pull request #377 from aledbf/remove-unused-dependency
Browse files Browse the repository at this point in the history
Remove unused dependency
  • Loading branch information
bprashanth committed Jan 26, 2016
2 parents 3fe92da + 6acf003 commit e185ee0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 5 additions & 0 deletions keepalived-vip/keepalived.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ type keepalived struct {
useUnicast bool
}

// WriteCfg creates a new keepalived configuration file.
// In case of an error with the generation it returns the error
func (k *keepalived) WriteCfg(svcs []vip) error {
w, err := os.Create("/etc/keepalived/keepalived.conf")
if err != nil {
Expand Down Expand Up @@ -129,6 +131,8 @@ func (k *keepalived) WriteCfg(svcs []vip) error {
return t.Execute(w, conf)
}

// Start starts a keepalived process in foreground.
// In case of any error it will terminate the execution with a fatal error
func (k *keepalived) Start() {
cmd := exec.Command("keepalived",
"--dont-fork",
Expand All @@ -148,6 +152,7 @@ func (k *keepalived) Start() {
}
}

// Reload sends SIGHUP to keepalived to reload the configuration.
func (k *keepalived) Reload() error {
glog.Info("reloading keepalived")
_, err := k8sexec.New().Command("killall", "-1", "keepalived").CombinedOutput()
Expand Down
3 changes: 0 additions & 3 deletions keepalived-vip/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"github.com/golang/glog"
flag "github.com/spf13/pflag"

"github.com/openshift/origin/pkg/util/proc"
"k8s.io/kubernetes/pkg/client/unversioned"
kubectl_util "k8s.io/kubernetes/pkg/kubectl/cmd/util"
"k8s.io/kubernetes/pkg/util"
Expand Down Expand Up @@ -85,8 +84,6 @@ func main() {
glog.Fatalf("Terminating execution: %v", err)
}

proc.StartReaper()

glog.Info("starting LVS configuration")
if *useUnicast {
glog.Info("keepalived will use unicast to sync the nodes")
Expand Down

0 comments on commit e185ee0

Please sign in to comment.