Skip to content

Buildtime dependencies installed incorrectly on runtime environment #7583

@balazsbme

Description

@balazsbme

Description
When using one-deploy many buildtime dependencies are installed on RHEL 9.

For example these ones from the CodeReady Builder repo.

[root@frontend ~]# dnf list installed | grep codeready
augeas-devel.x86_64                           1.14.1-3.el9                                       @codeready-builder-for-rhel-9-x86_64-rpms
freerdp-devel.x86_64                          2:2.11.7-1.el9_7.1                                 @codeready-builder-for-rhel-9-x86_64-rpms
libnsl2-devel.x86_64                          2.0.0-1.el9                                        @codeready-builder-for-rhel-9-x86_64-rpms
libogg-devel.x86_64                           2:1.3.4-6.el9                                      @codeready-builder-for-rhel-9-x86_64-rpms
libtirpc-devel.x86_64                         1.3.3-9.el9                                        @codeready-builder-for-rhel-9-x86_64-rpms
libvorbis-devel.x86_64                        1:1.3.7-5.el9                                      @codeready-builder-for-rhel-9-x86_64-rpms
libwinpr-devel.x86_64                         2:2.11.7-1.el9_7.1                                 @codeready-builder-for-rhel-9-x86_64-rpms
mysql-devel.x86_64                            8.0.44-1.el9_7                                     @codeready-builder-for-rhel-9-x86_64-rpms
protobuf-compiler.x86_64                      3.14.0-16.el9                                      @codeready-builder-for-rhel-9-x86_64-rpms
protobuf-devel.x86_64                         3.14.0-16.el9                                      @codeready-builder-for-rhel-9-x86_64-rpms
python3-wheel.noarch                          1:0.36.2-8.el9                                     @codeready-builder-for-rhel-9-x86_64-rpms
uuid-devel.x86_64                             1.6.2-55.el9                                       @codeready-builder-for-rhel-9-x86_64-rpms
xmlrpc-c-c++.x86_64                           1.51.0-16.el9_0                                    @codeready-builder-for-rhel-9-x86_64-rpms
xmlrpc-c-client++.x86_64                      1.51.0-16.el9_0                                    @codeready-builder-for-rhel-9-x86_64-rpms
xmlrpc-c-devel.x86_64                         1.51.0-16.el9_0                                    @codeready-builder-for-rhel-9-x86_64-rpms

And on hypervisor:

[root@hypervisor ~]# dnf list installed | grep codeready
mysql-libs.x86_64                             8.0.43-1.el9_6                      @codeready-builder-for-rhel-9-x86_64-eus-rpms
python3-ruamel-yaml.x86_64                    0.16.6-7.el9.1                      @codeready-builder-for-rhel-9-x86_64-eus-rpms

Tracing this in the dnf logs in /var/log/dnf.log this specified that the build time requirements is also deployed:

<<TIMESTAMP>> DDEBUG Extra commands: ['builddep', '-y', 'https://downloads.opennebula.io/repo/7.0/RedHat/9/x86_64/opennebula-7.0.1-1-amd64/src/opennebula-7
.0.1-1.el9.src.rpm']

The dependencies are specifically listed as build time only in here: https://github.com/OpenNebula/packages/blob/4c815dcebef26ff01aaa8020e13c6fe54dc74017/templates/rpm_common/opennebula.spec.m4#L130

Why this matters is because RH warns about not relying these in runtime, so we should understand clearly if any of these packages are actually needed during runtime. See e.g. this RH blogpost

To Reproduce
Deploy a opennebula with one-deploy

Expected behavior
Only the runtime dependencies should be installed with one-deploy

Details

  • Affected Component: one-deploy or any of its dependencies or incorrectly by the runtime RPM
  • Hypervisor: KVM
  • Version: OpenNebula 7.0.1, RedHat 9.6, one-deploy (approx OpenNebula/one-deploy@13d0343 ), python 3.9.25 on FE

Followup
After removing the build time dependencies install trigger, lets review if all of these from the codeready builders repo are indeed needed during runtime.

Progress Status

  • Code committed
  • Testing - QA
  • Documentation (Release notes - resolved issues, compatibility, known issues)

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions