diff --git a/pkg/ingress/annotations/redirect/redirect.go b/pkg/ingress/annotations/redirect/redirect.go index 5fd64a2ee..41074ca7c 100644 --- a/pkg/ingress/annotations/redirect/redirect.go +++ b/pkg/ingress/annotations/redirect/redirect.go @@ -49,7 +49,7 @@ func NewParser() parser.IngressAnnotation { // Parse parses the annotations contained in the ingress // rule used to create a redirect in the paths defined in the rule. -// If the Ingress containes both annotations the execution order is +// If the Ingress contains both annotations the execution order is // temporal and then permanent func (a redirect) Parse(ing *extensions.Ingress) (interface{}, error) { r3w, _ := parser.GetBoolAnnotation(www, ing) diff --git a/pkg/ingress/controller/nginx.go b/pkg/ingress/controller/nginx.go index c41509456..c3bba6867 100644 --- a/pkg/ingress/controller/nginx.go +++ b/pkg/ingress/controller/nginx.go @@ -643,7 +643,7 @@ func (n *NGINXController) OnUpdate(ingressCfg ingress.Configuration) error { // Do not use defer to remove the temporal file. // This is helpful when there is an error in the // temporal configuration (we can manually inspect the file). - // Only remove the file when no error occured. + // Only remove the file when no error occurred. os.Remove(tmpfile.Name()) } } diff --git a/pkg/ingress/controller/process/nginx.go b/pkg/ingress/controller/process/nginx.go index df1861e4a..326b7ca48 100644 --- a/pkg/ingress/controller/process/nginx.go +++ b/pkg/ingress/controller/process/nginx.go @@ -54,6 +54,11 @@ func WaitUntilPortIsAvailable(port int) { conn.Close() // kill nginx worker processes fs, err := proc.NewFS("/proc") + if err != nil { + glog.Errorf("unexpected error reading /proc information: %v", err) + continue + } + procs, _ := fs.FS.AllProcs() for _, p := range procs { pn, err := p.Comm() diff --git a/pkg/net/net_test.go b/pkg/net/net_test.go index 830b52af3..6ab4223ca 100644 --- a/pkg/net/net_test.go +++ b/pkg/net/net_test.go @@ -44,7 +44,7 @@ func TestIsIPV6(t *testing.T) { func TestIsPortAvailable(t *testing.T) { if !IsPortAvailable(0) { - t.Fatal("expected port 0 to be avilable (random port) but returned false") + t.Fatal("expected port 0 to be available (random port) but returned false") } ln, err := net.Listen("tcp", ":0")