Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
postgres-operator
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
zalando
postgres-operator
Commits
a8ed1e25
Commit
a8ed1e25
authored
8 years ago
by
Oleksii Kliukin
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Avoid re-creating master pod if it is empty during sync. (#58)
Fixes #59
parent
00150711
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pkg/cluster/pod.go
+7
-7
7 additions, 7 deletions
pkg/cluster/pod.go
with
7 additions
and
7 deletions
pkg/cluster/pod.go
+
7
−
7
View file @
a8ed1e25
...
@@ -140,8 +140,7 @@ func (c *Cluster) recreatePods() error {
...
@@ -140,8 +140,7 @@ func (c *Cluster) recreatePods() error {
}
}
if
masterPod
.
Name
==
""
{
if
masterPod
.
Name
==
""
{
c
.
logger
.
Warningln
(
"No master pod in the cluster"
)
c
.
logger
.
Warningln
(
"No master pod in the cluster"
)
}
}
else
{
//TODO: do manual failover
//TODO: do manual failover
//TODO: specify master, leave new master empty
//TODO: specify master, leave new master empty
c
.
logger
.
Infof
(
"Recreating master pod '%s'"
,
util
.
NameFromMeta
(
masterPod
.
ObjectMeta
))
c
.
logger
.
Infof
(
"Recreating master pod '%s'"
,
util
.
NameFromMeta
(
masterPod
.
ObjectMeta
))
...
@@ -149,6 +148,7 @@ func (c *Cluster) recreatePods() error {
...
@@ -149,6 +148,7 @@ func (c *Cluster) recreatePods() error {
if
err
:=
c
.
recreatePod
(
masterPod
);
err
!=
nil
{
if
err
:=
c
.
recreatePod
(
masterPod
);
err
!=
nil
{
return
fmt
.
Errorf
(
"could not recreate master pod '%s': %v"
,
util
.
NameFromMeta
(
masterPod
.
ObjectMeta
),
err
)
return
fmt
.
Errorf
(
"could not recreate master pod '%s': %v"
,
util
.
NameFromMeta
(
masterPod
.
ObjectMeta
),
err
)
}
}
}
return
nil
return
nil
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment