This repository was archived by the owner on Apr 17, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff 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
103105func (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
132136func (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.
151156func (k * keepalived ) Reload () error {
152157 glog .Info ("reloading keepalived" )
153158 _ , err := k8sexec .New ().Command ("killall" , "-1" , "keepalived" ).CombinedOutput ()
Original file line number Diff line number Diff 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" )
You can’t perform that action at this time.
0 commit comments