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 to check backup container ID if pod container statuses are missing #4765

Merged
merged 11 commits into from
Jun 4, 2024

Conversation

gabriele-wolfox
Copy link
Contributor

@gabriele-wolfox gabriele-wolfox commented Jun 3, 2024

Closes #4767

@gabriele-wolfox gabriele-wolfox requested a review from a team as a code owner June 3, 2024 12:47
@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 Jun 3, 2024
Copy link
Contributor

github-actions bot commented Jun 3, 2024

❗ 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

Copy link
Collaborator

@jsilvela jsilvela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see other occurrences of ContainerStatuses[0], worth fixing while you're here.
And perhaps check for other [0]...

@gabriele-wolfox
Copy link
Contributor Author

I can see other occurrences of ContainerStatuses[0], worth fixing while you're here. And perhaps check for other [0]...

I put the focus on the error in the log, but It makes sense to fix them too.

tests/e2e/upgrade_test.go Outdated Show resolved Hide resolved
api/v1/backup_types.go Outdated Show resolved Hide resolved
@gabriele-wolfox gabriele-wolfox force-pushed the dev/4960 branch 2 times, most recently from 60f44c7 to 7ef24f9 Compare June 4, 2024 09:23
@jsilvela jsilvela self-requested a review June 4, 2024 10:18
@jsilvela
Copy link
Collaborator

jsilvela commented Jun 4, 2024

/test feature_type=backup-restore test_level=4

Copy link
Contributor

github-actions bot commented Jun 4, 2024

@jsilvela, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/9365377472

@github-actions github-actions bot added the ok to merge 👌 This PR can be merged label Jun 4, 2024
@jsilvela jsilvela removed the ok to merge 👌 This PR can be merged label Jun 4, 2024
@jsilvela
Copy link
Collaborator

jsilvela commented Jun 4, 2024

manually took out the ok-to-merge flag since I only tested the backup tests in the slash-test

Copy link
Contributor

@leonardoce leonardoce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this patch is fixing the underlying issue, we could easily prevent this specific bug from happening in the future, too.

We could change the signature of SetAsStarted to accept the pod name and the container ID, instead of accepting a pointer to the whole Pod. That would force us to actually check what is really happening.

internal/controller/backup_controller.go Outdated Show resolved Hide resolved
internal/controller/backup_controller.go Show resolved Hide resolved
… missing

Signed-off-by: Gabriele Quaresima <gabriele.quaresima@enterprisedb.com>
Signed-off-by: Gabriele Quaresima <gabriele.quaresima@enterprisedb.com>
gabriele-wolfox and others added 7 commits June 4, 2024 16:49
Signed-off-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Signed-off-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Signed-off-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Signed-off-by: Gabriele Quaresima <gabriele.quaresima@enterprisedb.com>
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@gmail.com>
@leonardoce leonardoce self-assigned this Jun 4, 2024
@leonardoce
Copy link
Contributor

Signed-off-by: Gabriele Quaresima <gabriele.quaresima@enterprisedb.com>
@leonardoce
Copy link
Contributor

/ok-to-merge Amazing!!! They're all green!!!

@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Jun 4, 2024
@leonardoce leonardoce merged commit 9515ee7 into cloudnative-pg:main Jun 4, 2024
24 of 25 checks passed
cnpg-bot pushed a commit that referenced this pull request Jun 4, 2024
…ng (#4765)

Closes #4767

Signed-off-by: Gabriele Quaresima <gabriele.quaresima@enterprisedb.com>
Signed-off-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@gmail.com>
Co-authored-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Co-authored-by: Leonardo Cecchi <leonardo.cecchi@gmail.com>
(cherry picked from commit 9515ee7)
leonardoce pushed a commit that referenced this pull request Jun 4, 2024
…ng (#4765)

Closes #4767

Signed-off-by: Gabriele Quaresima <gabriele.quaresima@enterprisedb.com>
Signed-off-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@gmail.com>
Co-authored-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Co-authored-by: Leonardo Cecchi <leonardo.cecchi@gmail.com>
(cherry picked from commit 9515ee7)
leonardoce pushed a commit that referenced this pull request Jun 4, 2024
…ng (#4765)

Closes #4767

Signed-off-by: Gabriele Quaresima <gabriele.quaresima@enterprisedb.com>
Signed-off-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@gmail.com>
Co-authored-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Co-authored-by: Leonardo Cecchi <leonardo.cecchi@gmail.com>
(cherry picked from commit 9515ee7)
dougkirkley pushed a commit to dougkirkley/cloudnative-pg that referenced this pull request Jun 11, 2024
…ng (cloudnative-pg#4765)

Closes cloudnative-pg#4767

Signed-off-by: Gabriele Quaresima <gabriele.quaresima@enterprisedb.com>
Signed-off-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@gmail.com>
Co-authored-by: Jaime Silvela <jaime.silvela@enterprisedb.com>
Co-authored-by: Leonardo Cecchi <leonardo.cecchi@gmail.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.

[Bug]: Panic while checking backup container ID if pod container statuses are missing
5 participants