Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid shutting down the instance manager if it is not needed #4670

Merged
merged 2 commits into from
May 28, 2024

Conversation

leonardoce
Copy link
Contributor

@leonardoce leonardoce commented May 24, 2024

If we restart PostgreSQL but don't manage to connect to it, we should proceed with the instance manager's shutdown logic instead of quitting immediately with exit code 1.

This is especially important when PG shuts down because of missing disk space and when PG is up but trying to reach a consistent state.

Closes: #4063

@leonardoce leonardoce requested a review from a team as a code owner May 24, 2024 12:33
@leonardoce leonardoce changed the title fix: avoid immediately the instance manager if it is not needed fix: avoid shutting down the instance manager if it is not needed May 24, 2024
@github-actions github-actions bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.21 release-1.22 release-1.23 labels May 24, 2024
Copy link
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

@leonardoce
Copy link
Contributor Author

leonardoce and others added 2 commits May 28, 2024 13:34
If we restarted PostgreSQL, but we don't manage to connect to it, we
should proceed with the shutdown logic of the instance manager instead
of quitting immediately with exit code 1.

This is specially important when PG shut down because of missing disk
space and when PG is up but trying to reach a consistent state.

Closes: cloudnative-pg#4669

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
@leonardoce
Copy link
Contributor Author

/ok-to-merge tests are fine

@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label May 28, 2024
@leonardoce leonardoce merged commit 99b1ba4 into cloudnative-pg:main May 28, 2024
25 of 26 checks passed
cnpg-bot pushed a commit that referenced this pull request May 28, 2024
)

If we restart PostgreSQL but don't manage to connect to it, we should
proceed with the instance manager's shutdown logic instead of quitting
immediately with exit code 1.

This is especially important when PG shuts down because of missing disk
space and when PG is up but trying to reach a consistent state.

Closes: #4063

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
(cherry picked from commit 99b1ba4)
cnpg-bot pushed a commit that referenced this pull request May 28, 2024
)

If we restart PostgreSQL but don't manage to connect to it, we should
proceed with the instance manager's shutdown logic instead of quitting
immediately with exit code 1.

This is especially important when PG shuts down because of missing disk
space and when PG is up but trying to reach a consistent state.

Closes: #4063

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
(cherry picked from commit 99b1ba4)
cnpg-bot pushed a commit that referenced this pull request May 28, 2024
)

If we restart PostgreSQL but don't manage to connect to it, we should
proceed with the instance manager's shutdown logic instead of quitting
immediately with exit code 1.

This is especially important when PG shuts down because of missing disk
space and when PG is up but trying to reach a consistent state.

Closes: #4063

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
(cherry picked from commit 99b1ba4)
@mnencia
Copy link
Member

mnencia commented May 29, 2024

The issue linked in the PR description is wrong. This should have closed #4669.

dougkirkley pushed a commit to dougkirkley/cloudnative-pg that referenced this pull request Jun 11, 2024
…oudnative-pg#4670)

If we restart PostgreSQL but don't manage to connect to it, we should
proceed with the instance manager's shutdown logic instead of quitting
immediately with exit code 1.

This is especially important when PG shuts down because of missing disk
space and when PG is up but trying to reach a consistent state.

Closes: cloudnative-pg#4063

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Signed-off-by: Douglass Kirkley <dkirkley@eitccorp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-requested ◀️ This pull request should be backported to all supported releases ok to merge 👌 This PR can be merged release-1.21 release-1.22 release-1.23
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants