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

Upgrade version of the pg_dump binary in dotcms docker image #24689

Closed
yolabingo opened this issue Apr 19, 2023 · 3 comments
Closed

Upgrade version of the pg_dump binary in dotcms docker image #24689

yolabingo opened this issue Apr 19, 2023 · 3 comments

Comments

@yolabingo
Copy link
Contributor

yolabingo commented Apr 19, 2023

Parent Issue

No response

Problem Statement

/api/v1/maintenance/_downloadDb yields a file containing only a pg_dump error when run against Postgres servers running versions > 13

The pg-base Dockerfile installs Postgres 13, this should be updated to Postgres 15 as pg_dump v13 cannot run against Postgres server versions > 13:

Steps to Reproduce

Try to run pg_dump in our docker-compose example which runs Postgres 15

mkdir pgdump
cd pgdump
wget https://raw.githubusercontent.com/dotCMS/core/master/docker/docker-compose-examples/single-node/docker-compose.yml
docker-compose up -d

Log in to backend, then request /api/v1/maintenance/_downloadDb

The downloaded file contains the error:

pg_dump: error: server version: 15.1 (Debian 15.1-1.pgdg110+1); pg_dump version: 13.5 (Ubuntu 13.5-2.pgdg20.04+1)
pg_dump: error: aborting because of server version mismatch

Alternately, run pg_dump directly to see the same error

docker exec -it pgdump-dotcms-1 pg_dump -h db -U dotcmsdbuser -d dotcms --exclude-table-data=*

Acceptance Criteria

pg_dump client version 15 is available in our dotcms container and /api/v1/maintenance/_downloadDb succeeds.

There are several steps required to get this change into the dotcms Dockerhub image.

  1. update postgres to v15 - edit BOTH instances of ARG PG_VERSION=13 in pg-base/Dockerfile
  2. build both amd64 and arm64 pg-base images and push to Dockerhub with a new tag
  3. update the pg-base image tag in main dotcms image Dockerfile
  4. rebuild and upload new dotcms images using the updated dotcms Dockerfile

We may want this in the latest LTS as well.

dotCMS Version

22.03

Proposed Objective

Please Select

Proposed Priority

Please Select

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

No response

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

@dsilvam
Copy link
Contributor

dsilvam commented May 19, 2023

Passed Internal QA: Able to generate the dump against a postgres 15 image. Tested on master and got the error, then 23.06 and it succeeded.

@bryanboza
Copy link
Member

Fixed, tested on release-23.06 following the provided steps and this is working as expected

@erickgonzalez erickgonzalez added LTS : Next Ticket that will be added to LTS Priority : 2 High labels Jan 20, 2024
@erickgonzalez erickgonzalez added Next LTS Release and removed LTS : Next Ticket that will be added to LTS labels Jan 30, 2024
@erickgonzalez
Copy link
Contributor

Need this one as well #27537

@erickgonzalez erickgonzalez added LTS : Next Ticket that will be added to LTS and removed Next LTS Release labels Feb 9, 2024
@erickgonzalez erickgonzalez added Next LTS Release Shortlisted of issues that will be included in the upcoming LTS LTS: Excluded Ticket that has been excluded from at least one LTS and removed LTS : Next Ticket that will be added to LTS Next LTS Release Shortlisted of issues that will be included in the upcoming LTS labels Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

5 participants