Skip to content

feat(plugin): add configurable timeout flag for status command#9201

Merged
mnencia merged 1 commit intomainfrom
dev/9164
Nov 20, 2025
Merged

feat(plugin): add configurable timeout flag for status command#9201
mnencia merged 1 commit intomainfrom
dev/9164

Conversation

@armru
Copy link
Member

@armru armru commented Nov 17, 2025

Add a new --timeout flag to the kubectl cnpg status command to allow users to configure the timeout for operations that access the pod filesystem (e.g., du for calculating cluster size, cat for reading configuration files).

The timeout parameter:

  • Defaults to 10 seconds to maintain backward compatibility
  • Can be adjusted using --timeout/-t flag (e.g., --timeout 45s)
  • Is applied to all timeout-based operations in the status command

This addresses issues with large clusters (e.g., >1TB) where filesystem operations may exceed the previous hardcoded 10-second timeout, causing "context deadline exceeded" errors.

Closes #9164

@armru armru requested review from a team and jsilvela as code owners November 17, 2025 15:35
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Nov 17, 2025
@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.25 release-1.26 release-1.27 labels Nov 17, 2025
@github-actions
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

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 17, 2025
@mnencia
Copy link
Member

mnencia commented Nov 18, 2025

/test

@github-actions
Copy link
Contributor

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

@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Nov 18, 2025
@leonardoce leonardoce force-pushed the dev/9164 branch 2 times, most recently from a481c0b to 66f0276 Compare November 20, 2025 08:20
Add a new --timeout flag to the `kubectl cnpg status` command to allow
users to configure the timeout for operations that access the pod
filesystem (e.g., `du` for calculating cluster size, `cat` for reading
configuration files).

The timeout parameter:
- Defaults to 10 seconds to maintain backward compatibility
- Can be adjusted using --timeout/-t flag (e.g., --timeout 45s)
- Is applied to all timeout-based operations in the status command

This addresses issues with large clusters (e.g., >1TB) where filesystem
operations may exceed the previous hardcoded 10-second timeout, causing
"context deadline exceeded" errors.

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
@mnencia mnencia merged commit d07d01d into main Nov 20, 2025
34 checks passed
@mnencia mnencia deleted the dev/9164 branch November 20, 2025 14:35
cnpg-bot pushed a commit that referenced this pull request Nov 20, 2025
Add a new `--timeout` flag to the `kubectl cnpg status` command to allow
users to configure the timeout for operations that access the pod
filesystem (e.g., `du` for calculating cluster size, `cat` for reading
configuration files).

The timeout parameter:
- Defaults to 10 seconds to maintain backward compatibility
- Can be adjusted using `--timeout`/`-t` flag (e.g., `--timeout 45s`)
- Is applied to all timeout-based operations in the status command

This addresses issues with large clusters (e.g., >1TB) where filesystem
operations may exceed the previous hardcoded 10-second timeout, causing
"context deadline exceeded" errors.

Closes #9164

Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
(cherry picked from commit d07d01d)
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 enhancement 🪄 New feature or request lgtm This PR has been approved by a maintainer ok to merge 👌 This PR can be merged release-1.27 size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Context deadline exceeded when running "du" via the plugin

5 participants