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

Support for building and testing PSQL-16 on C10S replace nss-wrapper with nss-wrapper-libs #587

Merged
merged 13 commits into from
Sep 16, 2024

Conversation

phracek
Copy link
Member

@phracek phracek commented Aug 21, 2024

This pull request allows to build and test PSQL-16 on C10S

The pull request is separated into more commits:

  • Update dist-gen sources
  • dist-gen generated sources
  • update imagestreams for C10S
  • update build and push with postgresql-16-c10s
  • Do not fix /run/postgresql and even /var/run/postgresql dirs. The first one is %ghost directory and the second one does not exist

@phracek
Copy link
Member Author

phracek commented Aug 21, 2024

[test]

@phracek
Copy link
Member Author

phracek commented Sep 5, 2024

[test]

src/Dockerfile Outdated Show resolved Hide resolved
Copy link
Member

@hhorak hhorak left a comment

Choose a reason for hiding this comment

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

The only change that seems to be worth doing is simplifying INSTALL_PKGS definition and remove the rhscl specifics (brew links etc.) and since we have gettext-envsubst available in the RHEL-10/c10s, and nss_wrapper-libs everywhere now, we might simplify it to:

RUN {{ spec.environment_setup }}
{% if spec.prod in [ "rhel8", "rhel9", "c9s" ] %}
    INSTALL_PKGS="rsync tar gettext bind-utils nss_wrapper-libs {{ spec.pkgs }}" && \
{% else %}
    INSTALL_PKGS="rsync tar gettext-envsubst bind-utils nss_wrapper-libs {{ spec.pkgs }}" && \
{% endif %}

(have not tried yet, mentioning to better describe my intention)

@phracek
Copy link
Member Author

phracek commented Sep 5, 2024

RUN {{ spec.environment_setup }}

@hhorak It cannot be used because the module is unavailable for C10S.
See https://github.com/sclorg/postgresql-container/blob/master/specs/multispec.yml#L41

I will fix it good catch.

@phracek
Copy link
Member Author

phracek commented Sep 5, 2024

[test]

@phracek
Copy link
Member Author

phracek commented Sep 6, 2024

[test-all]

@phracek
Copy link
Member Author

phracek commented Sep 6, 2024

Fedora 15 has failed for this reason:

-----------------------------------------------
Running test run_s2i_enable_ssl_test (starting at 2024-09-06 13:36:21+00:00) ... 
-----------------------------------------------
3b84e71e4d32e2887d7750409d1485a852cc94cd06dee58693a5c6d632da0f6c
Created container 3b84e71e4d32e2887d7750409d1485a852cc94cd06dee58693a5c6d632da0f6c
double free or corruption (out)
/usr/libexec/check-container: line 27:    63 Aborted                 (core dumped) pg_isready -q -h 127.0.0.1 ${POSTGRESQL_USER+-U "$POSTGRESQL_USER"} ${POSTGRESQL_DATABASE+-d "$POSTGRESQL_DATABASE"} --timeout 0
double free or corruption (out)

==============================================
Tests were run for image quay.io/fedora/postgresql-15:0
==============================================
Test cases results:

 [FAILED] for 'postgresql-container_tests' run_s2i_enable_ssl_test (00:00:40)

CEntOS Stream 10 - 16 has failed for this reason:

-----------------------------------------------
Running test run_s2i_bake_data_test (starting at 2024-09-06 13:38:17+00:00) ... 
-----------------------------------------------
  ERROR: Failed to to build /tmp/tmp.ABtq1DrUYk/Dockerfile.7a8X
Trying to pull quay.io/sclorg/postgresql-16-c10s:1-bake_8gumrrdgqn...
Error: initializing source docker://quay.io/sclorg/postgresql-16-c10s:1-bake_8gumrrdgqn: reading manifest 1-bake_8gumrrdgqn in quay.io/sclorg/postgresql-16-c10s: unauthorized: access to the requested resource is not authorized
ERROR: Creation of container didn't succeed
cat: /tmp/tmp.QBX49KryMq/bake-data-test: No such file or directory
Error: name or ID cannot be empty
cat: /tmp/tmp.QBX49KryMq/bake-data-test: No such file or directory

The complete results for CentOS Stream 10 are:

==============================================
Tests were run for image quay.io/sclorg/postgresql-16-c10s:1
==============================================
Test cases results:

 [PASSED] for 'postgresql-container_tests' run_container_creation_tests (00:00:26)
 [PASSED] for 'postgresql-container_tests' run_general_tests (00:00:44)
 [PASSED] for 'postgresql-container_tests' run_change_password_test (00:00:09)
 [PASSED] for 'postgresql-container_tests' run_replication_test (00:00:05)
 [PASSED] for 'postgresql-container_tests' run_doc_test (00:00:01)
 [PASSED] for 'postgresql-container_tests' run_s2i_test (00:00:17)
 [PASSED] for 'postgresql-container_tests' run_test_cfg_hook (00:00:11)
 [FAILED] for 'postgresql-container_tests' run_s2i_bake_data_test (00:00:28)
 [PASSED] for 'postgresql-container_tests' run_s2i_enable_ssl_test (00:00:09)
 [PASSED] for 'postgresql-container_tests' run_upgrade_test (00:00:01)
 [PASSED] for 'postgresql-container_tests' run_migration_test (00:00:02)
 [PASSED] for 'postgresql-container_tests' run_pgaudit_test (00:00:03)
 [PASSED] for 'postgresql-container_tests' run_new_pgaudit_test (00:00:03)
 [PASSED] for 'postgresql-container_tests' run_logging_test (00:00:02)

@phracek
Copy link
Member Author

phracek commented Sep 10, 2024

The failure on C10S is:

+ psql -f /tmp/src/init/init.sql
CREATE TABLE
INSERT 0 1
waiting for server to shut down....+ pg_ctl stop
 done
server stopped
+ tar caf data.tar.xz -C /var/lib/pgsql/data/userdata .
/bin/sh: line 1: xz: command not found
tar: data.tar.xz: Wrote only 4096 of 10240 bytes

Signed-off-by: Petr "Stone" Hracek <[email protected]>
Signed-off-by: Petr "Stone" Hracek <[email protected]>
@phracek
Copy link
Member Author

phracek commented Sep 10, 2024

[test]

@phracek
Copy link
Member Author

phracek commented Sep 10, 2024

CentOS Stream 10 passed. We are GREEN.

@phracek
Copy link
Member Author

phracek commented Sep 11, 2024

[test]

@phracek
Copy link
Member Author

phracek commented Sep 11, 2024

@hhorak @SlouchyButton Ready to re-review and merge. C10S passed.

16/Dockerfile.c10s Outdated Show resolved Hide resolved
@phracek phracek force-pushed the support_c10s branch 2 times, most recently from ee38bbe to 2ecefea Compare September 13, 2024 10:12
@phracek
Copy link
Member Author

phracek commented Sep 13, 2024

[test]

Signed-off-by: Petr "Stone" Hracek <[email protected]>
@phracek
Copy link
Member Author

phracek commented Sep 13, 2024

[test]

@phracek
Copy link
Member Author

phracek commented Sep 13, 2024

Fix package dependencies
[test]

@phracek phracek changed the title Support for building and testing PSQL-16 on C10S Support for building and testing PSQL-16 on C10S replace nss-wrapper with nss-wrapper-libs Sep 16, 2024
Add PSQL_PKGS as alone variable

Signed-off-by: Petr "Stone" Hracek <[email protected]>
@phracek
Copy link
Member Author

phracek commented Sep 16, 2024

[test]

@phracek phracek merged commit a101cde into master Sep 16, 2024
13 of 14 checks passed
@phracek phracek deleted the support_c10s branch September 16, 2024 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants