Skip to content

feat(instance-manager): warn on deprecated or unsupported OS versions#8601

Merged
mnencia merged 6 commits intocloudnative-pg:mainfrom
leonardoce:os-release
Sep 25, 2025
Merged

feat(instance-manager): warn on deprecated or unsupported OS versions#8601
mnencia merged 6 commits intocloudnative-pg:mainfrom
leonardoce:os-release

Conversation

@leonardoce
Copy link
Contributor

@leonardoce leonardoce commented Sep 18, 2025

The instance manager now reads /etc/os-release and logs a warning if the detected OS version is deprecated or unsupported, according to the official CNPG postgres-containers project.

A table of known distributions is maintained internally. If the distribution is unknown, or if /etc/os-release is missing or unreadable, the check is skipped.

Closes: #8575

@leonardoce leonardoce requested a review from a team as a code owner September 18, 2025 15:23
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 18, 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 Sep 18, 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 enhancement 🪄 New feature or request label Sep 18, 2025
@gbartolini
Copy link
Contributor

/test

@github-actions
Copy link
Contributor

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

@gbartolini
Copy link
Contributor

gbartolini commented Sep 18, 2025

I tried with Bullseye:

{
  "level": "info",
  "ts": "2025-09-18T19:47:35.40050725Z",
  "msg": "OS distribution is deprecated; consider upgrading",
  "logger": "instance-manager",
  "logging_pod": "cluster-example-1",
  "entry": {
    "version": "11 (bullseye)",
    "supportedUntil": "2024-08-14T00:00:00Z",
    "deprecatedFrom": "2026-08-31T00:00:00Z"
  }
}

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Sep 18, 2025
@gbartolini gbartolini changed the title feat: warn users if running a deprecated or unsupported OS version feat(instance-manager): warn on deprecated or unsupported OS versions Sep 18, 2025
@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Sep 18, 2025
leonardoce and others added 5 commits September 25, 2025 11:44
The instance manager now reads the `/etc/os-release` file and issues a warning
if the detected operating system version is deprecated or unsupported.

A table of known distributions is maintained in the instance manager. If the
distribution is unknown, or if `/etc/os-release` is missing or unreadable,
the check is skipped.

Closes: cloudnative-pg#8575

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
@mnencia mnencia merged commit 319f9b0 into cloudnative-pg:main Sep 25, 2025
30 of 31 checks passed
cnpg-bot pushed a commit that referenced this pull request Sep 25, 2025
…#8601)

The instance manager now reads `/etc/os-release` and logs a warning if
the detected OS version is deprecated or unsupported, according to the
official CNPG `postgres-containers` project.

A table of known distributions is maintained internally. If the
distribution is unknown, or if `/etc/os-release` is missing or
unreadable, the check is skipped.

Closes: #8575

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
(cherry picked from commit 319f9b0)
cnpg-bot pushed a commit that referenced this pull request Sep 25, 2025
…#8601)

The instance manager now reads `/etc/os-release` and logs a warning if
the detected OS version is deprecated or unsupported, according to the
official CNPG `postgres-containers` project.

A table of known distributions is maintained internally. If the
distribution is unknown, or if `/etc/os-release` is missing or
unreadable, the check is skipped.

Closes: #8575

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
(cherry picked from commit 319f9b0)
cnpg-bot pushed a commit that referenced this pull request Sep 25, 2025
…#8601)

The instance manager now reads `/etc/os-release` and logs a warning if
the detected OS version is deprecated or unsupported, according to the
official CNPG `postgres-containers` project.

A table of known distributions is maintained internally. If the
distribution is unknown, or if `/etc/os-release` is missing or
unreadable, the check is skipped.

Closes: #8575

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
(cherry picked from commit 319f9b0)
rossigee pushed a commit to rossigee/cloudnative-pg that referenced this pull request Oct 2, 2025
…cloudnative-pg#8601)

The instance manager now reads `/etc/os-release` and logs a warning if
the detected OS version is deprecated or unsupported, according to the
official CNPG `postgres-containers` project.

A table of known distributions is maintained internally. If the
distribution is unknown, or if `/etc/os-release` is missing or
unreadable, the check is skipped.

Closes: cloudnative-pg#8575

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
THE-BRAHMA pushed a commit to THE-BRAHMA/cloudnative-pg that referenced this pull request Oct 30, 2025
…cloudnative-pg#8601)

The instance manager now reads `/etc/os-release` and logs a warning if
the detected OS version is deprecated or unsupported, according to the
official CNPG `postgres-containers` project.

A table of known distributions is maintained internally. If the
distribution is unknown, or if `/etc/os-release` is missing or
unreadable, the check is skipped.

Closes: cloudnative-pg#8575

Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Signed-off-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Co-authored-by: Gabriele Bartolini <gabriele.bartolini@enterprisedb.com>
Co-authored-by: Niccolò Fei <niccolo.fei@enterprisedb.com>
Signed-off-by: theBrahma <office.utpal.brahma@gmail.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 enhancement 🪄 New feature or request lgtm This PR has been approved by a maintainer ok to merge 👌 This PR can be merged release-1.25 release-1.26 release-1.27 size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: warn users if running a deprecated/unsupported Debian version

5 participants