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

Commit e185ee0

Browse files
committed
Merge pull request #377 from aledbf/remove-unused-dependency
Remove unused dependency
2 parents 3fe92da + 6acf003 commit e185ee0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

keepalived-vip/keepalived.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ type keepalived struct {
100100
useUnicast bool
101101
}
102102

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

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

155+
// Reload sends SIGHUP to keepalived to reload the configuration.
151156
func (k *keepalived) Reload() error {
152157
glog.Info("reloading keepalived")
153158
_, err := k8sexec.New().Command("killall", "-1", "keepalived").CombinedOutput()

keepalived-vip/main.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import (
2323
"github.com/golang/glog"
2424
flag "github.com/spf13/pflag"
2525

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

88-
proc.StartReaper()
89-
9087
glog.Info("starting LVS configuration")
9188
if *useUnicast {
9289
glog.Info("keepalived will use unicast to sync the nodes")

0 commit comments

Comments
 (0)