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

Bugfix/oracle crb #775

Merged
merged 5 commits into from
Sep 28, 2024
Merged

Bugfix/oracle crb #775

merged 5 commits into from
Sep 28, 2024

Conversation

dschlenk
Copy link
Contributor

Description

When using a newer Chef than exists in docker, installation of package perl-IPC-run (required to build the pg gem) fails on oracle linux 9. For example, kitchen suite access-14-oraclelinux-9 fails to converge without this patch with error:

       Recipe: <Dynamically Defined Resource>
         * dnf_package[libpq5] action install
           - install version 0:16.4-42PGDG.rhel9.x86_64 of package libpq5
         * dnf_package[perl-IPC-Run] action install
           * No candidate version available for perl-IPC-Run
           ================================================================================
           Error executing action `install` on resource 'dnf_package[perl-IPC-Run]'
           ================================================================================

           Chef::Exceptions::Package
           -------------------------
           No candidate version available for perl-IPC-Run

           Cookbook Trace: (most recent call first)
           ----------------------------------------
           /opt/kitchen/cache/cookbooks/postgresql/libraries/sql/_connection.rb:91:in `install_pg_gem'
           /opt/kitchen/cache/cookbooks/postgresql/libraries/sql/_connection.rb:122:in `pg_client'
           /opt/kitchen/cache/cookbooks/postgresql/libraries/sql/_connection.rb:182:in `execute_sql_params'
           /opt/kitchen/cache/cookbooks/postgresql/libraries/sql/role.rb:46:in `pg_role?'
           /opt/kitchen/cache/cookbooks/postgresql/resources/role.rb:87:in `block in class_from_file'

           Resource Declaration:
           ---------------------
           # In /opt/kitchen/cache/cookbooks/postgresql/libraries/sql/_connection.rb

            91:               declare_resource(:package, 'perl-IPC-Run') do
            92:                 compile_time(true)
            93:                 options('--enablerepo=crb')
            94:               end
            95:             end

           Compiled Resource:
           ------------------
           # Declared in /opt/kitchen/cache/cookbooks/postgresql/libraries/sql/_connection.rb:91:in `install_pg_gem'

           dnf_package("perl-IPC-Run") do
             package_name "perl-IPC-Run"
             action [:install]
             default_guard_interpreter :default
             declared_type :package
             flush_cache {:before=>false, :after=>false}
             compile_time true
             options ["--enablerepo=crb"]
           end

           System Info:
           ------------
           chef_version=18.5.0
           platform=oracle
           platform_version=9.4
           ruby=ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux]
           program_name=/opt/cinc/bin/cinc-client
           executable=/opt/cinc/bin/cinc-client


         ================================================================================
         Error executing action `create` on resource 'postgresql_user[sous_chef]'
         ================================================================================

         Chef::Exceptions::Package
         -------------------------
         dnf_package[perl-IPC-Run] (/opt/kitchen/cache/cookbooks/postgresql/libraries/sql/_connection.rb line 91) had an error: Chef::Exceptions::Package: No candidate version available for perl-IPC-Run

         Cookbook Trace: (most recent call first)
         ----------------------------------------
         /opt/kitchen/cache/cookbooks/postgresql/libraries/sql/_connection.rb:91:in `install_pg_gem'
         /opt/kitchen/cache/cookbooks/postgresql/libraries/sql/_connection.rb:122:in `pg_client'
         /opt/kitchen/cache/cookbooks/postgresql/libraries/sql/_connection.rb:182:in `execute_sql_params'
         /opt/kitchen/cache/cookbooks/postgresql/libraries/sql/role.rb:46:in `pg_role?'
         /opt/kitchen/cache/cookbooks/postgresql/resources/role.rb:87:in `block in class_from_file'

         Resource Declaration:
         ---------------------
         suppressed sensitive resource output

         Compiled Resource:
         ------------------
         suppressed sensitive resource output

         System Info:
         ------------
         chef_version=18.5.0
         platform=oracle
         platform_version=9.4
         ruby=ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux]
         program_name=/opt/cinc/bin/cinc-client
         executable=/opt/cinc/bin/cinc-client

Technically it still fails with this patch, because newer Chef doesn't have MD2 compiled into the embedded openssl (since 3263a96), which the system-provided libldap.so.2 expects because it is present in the system openssl. That is being addressed in RHEL-59715, and installing a patched openldap package after create but prior to verifying does result in success.

To work around the lack of a newer Chef in docker, I'm using the following environment variables in this branch with cinc workstation 24.8.1068:

CHEF_IMAGE=cincproject/cinc
CHEF_BINARY=/opt/cinc/bin/cinc-client
CHEF_VERSION=18.5.0

Check List

  • A summary of changes made is included in the CHANGELOG under ## Unreleased
  • New functionality includes testing.
  • New functionality has been documented in the README if applicable.

@dschlenk dschlenk requested a review from a team as a code owner September 25, 2024 22:08
@bmhughes bmhughes added Bug Something isn't working Release: Minor Release to Chef Supermarket as a minor release when merged labels Sep 27, 2024
@bmhughes bmhughes merged commit 2f11eea into sous-chefs:main Sep 28, 2024
163 of 228 checks passed
@kitchen-porter
Copy link
Contributor

Released as: 11.11.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Release: Minor Release to Chef Supermarket as a minor release when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants