Skip to content
Snippets Groups Projects
Commit 899c0bef authored by Murat Kabilov's avatar Murat Kabilov Committed by GitHub
Browse files

Use warningf instead of warnf

parent a987ff39
Branches
Tags
No related merge requests found
...@@ -101,7 +101,7 @@ func (s *Server) Run(stopCh <-chan struct{}, wg *sync.WaitGroup) { ...@@ -101,7 +101,7 @@ func (s *Server) Run(stopCh <-chan struct{}, wg *sync.WaitGroup) {
defer cancel() defer cancel()
err := s.http.Shutdown(ctx) err := s.http.Shutdown(ctx)
if err == context.DeadlineExceeded { if err == context.DeadlineExceeded {
s.logger.Warnf("Shutdown timeout exceeded. closing http server") s.logger.Warningf("Shutdown timeout exceeded. closing http server")
s.http.Close() s.http.Close()
} else if err != nil { } else if err != nil {
s.logger.Errorf("Could not shutdown http server: %v", err) s.logger.Errorf("Could not shutdown http server: %v", err)
......
...@@ -294,7 +294,7 @@ func (c *Cluster) compareStatefulSetWith(statefulSet *v1beta1.StatefulSet) *comp ...@@ -294,7 +294,7 @@ func (c *Cluster) compareStatefulSetWith(statefulSet *v1beta1.StatefulSet) *comp
} }
if len(c.Statefulset.Spec.Template.Spec.Containers) == 0 { if len(c.Statefulset.Spec.Template.Spec.Containers) == 0 {
c.logger.Warnf("statefulset %q has no container", util.NameFromMeta(c.Statefulset.ObjectMeta)) c.logger.Warningf("statefulset %q has no container", util.NameFromMeta(c.Statefulset.ObjectMeta))
return &compareStatefulsetResult{} return &compareStatefulsetResult{}
} }
// In the comparisons below, the needsReplace and needsRollUpdate flags are never reset, since checks fall through // In the comparisons below, the needsReplace and needsRollUpdate flags are never reset, since checks fall through
...@@ -479,7 +479,7 @@ func (c *Cluster) Update(newSpec *spec.Postgresql) error { ...@@ -479,7 +479,7 @@ func (c *Cluster) Update(newSpec *spec.Postgresql) error {
} }
if c.Spec.PgVersion != newSpec.Spec.PgVersion { // PG versions comparison if c.Spec.PgVersion != newSpec.Spec.PgVersion { // PG versions comparison
c.logger.Warnf("postgresql version change(%q -> %q) is not allowed", c.logger.Warningf("postgresql version change(%q -> %q) is not allowed",
c.Spec.PgVersion, newSpec.Spec.PgVersion) c.Spec.PgVersion, newSpec.Spec.PgVersion)
//TODO: rewrite pg version in tpr spec //TODO: rewrite pg version in tpr spec
} }
......
...@@ -145,7 +145,7 @@ PATRONI_INITDB_PARAMS: ...@@ -145,7 +145,7 @@ PATRONI_INITDB_PARAMS:
} }
} }
default: default:
c.logger.Warnf("unsupported type for initdb configuration item %s: %T", defaultParam, defaultParam) c.logger.Warningf("unsupported type for initdb configuration item %s: %T", defaultParam, defaultParam)
continue PATRONI_INITDB_PARAMS continue PATRONI_INITDB_PARAMS
} }
} }
......
...@@ -199,7 +199,7 @@ func (c *Cluster) replaceStatefulSet(newStatefulSet *v1beta1.StatefulSet) error ...@@ -199,7 +199,7 @@ func (c *Cluster) replaceStatefulSet(newStatefulSet *v1beta1.StatefulSet) error
// check that all the previous replicas were picked up. // check that all the previous replicas were picked up.
if newStatefulSet.Spec.Replicas == oldStatefulset.Spec.Replicas && if newStatefulSet.Spec.Replicas == oldStatefulset.Spec.Replicas &&
createdStatefulset.Status.Replicas != oldStatefulset.Status.Replicas { createdStatefulset.Status.Replicas != oldStatefulset.Status.Replicas {
c.logger.Warnf("number of pods for the old and updated Statefulsets is not identical") c.logger.Warningf("number of pods for the old and updated Statefulsets is not identical")
} }
c.Statefulset = createdStatefulset c.Statefulset = createdStatefulset
......
...@@ -99,7 +99,7 @@ Users: ...@@ -99,7 +99,7 @@ Users:
case "inrole": case "inrole":
t.MemberOf = append(t.MemberOf, s) t.MemberOf = append(t.MemberOf, s)
default: default:
c.logger.Warnf("unknown key %q", p) c.logger.Warningf("unknown key %q", p)
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment