Repository navigation
feat(extensions): skip image extension paths missing from the image - #11652
Merged
Merged
Conversation
Contributor
|
❗ By default, the pull request is configured to backport to all release branches.
|
gbartolini
force-pushed
the
dev/11650
branch
2 times, most recently
from
October 14, 2026 16:39
54977a8 to
f408442
Compare
Contributor
|
I tested it with the previous example and I correctly got: Given that this is a Postgres module, the extension_control_path GUC does not include it like before. |
gbartolini
approved these changes
Oct 14, 2026
Contributor
|
/test |
Contributor
|
@leonardoce, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/38713081182 |
Member
Author
|
/test |
Contributor
|
@armru, here's the link to the E2E on CNPG workflow run: https://github.com/cloudnative-pg/cloudnative-pg/actions/runs/38765119075 |
Image extensions contributed their directories to `extension_control_path` and `dynamic_library_path` unconditionally, so an image shipping only `lib` still added a `share` entry pointing to a non-existent directory. This made the effective configuration misleading and relied on PostgreSQL silently ignoring missing entries. The instance manager now adds a directory only when it exists in the mounted image volume. This applies to both the default `share` and `lib` directories and to custom paths. Image volumes cannot change during the life of a Pod, so the generated configuration stays stable. Closes #11650 Signed-off-by: Armando Ruocco <[email protected]>
…ance manager The existence check lived in `pkg/postgres`, a pure configuration builder that otherwise never touches the filesystem, and it treated every `stat` error as a missing directory. Resolve the `extension_control_path` and `dynamic_library_path` entries in `pkg/utils/extensions`, next to the `LD_LIBRARY_PATH` and `PATH` ones, and check their existence in the instance manager, which owns the mounts. A path below a file counts as missing, while any other error now fails the configuration refresh instead of being ignored. Signed-off-by: Armando Ruocco <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Leonardo Cecchi <[email protected]>
…ed images Skipping the extension directories missing from the image made the configuration hash depend on the Pod's filesystem. When an extension is added to an existing Cluster, the Pods that don't mount its image yet report a different hash from the rolled out ones, and the rolling update waits forever for every Pod to load the same configuration. Compute the hash on the directories requested by the Cluster, and remove the missing ones only from the file written in the Pod. Image volumes are immutable for the life of a Pod, so the file still changes only when the hash does. Signed-off-by: Armando Ruocco <[email protected]>
leonardoce
approved these changes
Oct 16, 2026
cnpg-bot
pushed a commit
that referenced
this pull request
Oct 16, 2026
…11652) Image extensions contributed their directories to `extension_control_path` and `dynamic_library_path` unconditionally, so an image shipping only `lib` still added a `share` entry pointing to a non-existent directory. This made the effective configuration misleading and relied on PostgreSQL silently ignoring missing entries. The instance manager now adds a directory only when it exists in the mounted image volume. This applies to both the default `share` and `lib` directories and to custom paths. Image volumes cannot change during the life of a Pod, so the generated configuration stays stable. Closes #11650 Signed-off-by: Armando Ruocco <[email protected]> Signed-off-by: Gabriele Bartolini <[email protected]> Signed-off-by: Leonardo Cecchi <[email protected]> Co-authored-by: Gabriele Bartolini <[email protected]> Co-authored-by: Leonardo Cecchi <[email protected]> (cherry picked from commit e8420dd)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Image extensions contributed their directories to
extension_control_pathanddynamic_library_pathunconditionally, so an image shipping onlylibstill added ashareentry pointing to a non-existent directory. This made the effective configuration misleading and relied on PostgreSQL silently ignoring missing entries.The instance manager now adds a directory only when it exists in the mounted image volume. This applies to both the default
shareandlibdirectories and to custom paths. Image volumes cannot change during the life of a Pod, so the generated configuration stays stable.Closes #11650