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

Move ulimit workaround into yum reqs func #1961

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions conda_smithy/configure_feedstock.py
Original file line number Diff line number Diff line change
Expand Up @@ -1357,12 +1357,20 @@ def generate_yum_requirements(forge_config, forge_dir):
yum_build_setup = textwrap.dedent(
"""\

# Install the yum requirements defined canonically in the
# "recipe/yum_requirements.txt" file. After updating that file,
# run "conda smithy rerender" and this line will be updated
# automatically.
/usr/bin/sudo -n yum install -y {}

(
# Due to https://bugzilla.redhat.com/show_bug.cgi?id=1537564 old
# versions of rpm are drastically slowed down when the number of
# file descriptors is very high. This can be visible during a
# `yum install` step of a feedstock build.
# => Set a lower limit in a subshell for the `yum install`s only.
Comment on lines +1361 to +1365
Copy link
Member

Choose a reason for hiding this comment

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

Let's keep this explanation in conda-smithy. No need to propagate it to each and every feedstock.

Copy link
Member

Choose a reason for hiding this comment

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

@jakirkham thoughts?

ulimit -n 1024

# Install the yum requirements defined canonically in the
# "recipe/yum_requirements.txt" file. After updating that file,
# run "conda smithy rerender" and this line will be updated
# automatically.
/usr/bin/sudo -n yum install -y {}
)

""".format(
" ".join(requirements)
Expand Down
9 changes: 1 addition & 8 deletions conda_smithy/templates/build_steps.sh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,7 @@ setup_conda_rc "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
{% if build_setup -%}
{{ build_setup }}{% endif -%}
{% if yum_build_setup is defined -%}
(
# Due to https://bugzilla.redhat.com/show_bug.cgi?id=1537564 old versions of rpm
# are drastically slowed down when the number of file descriptors is very high.
# This can be visible during a `yum install` step of a feedstock build.
# => Set a lower limit in a subshell for the `yum install`s only.
ulimit -n 1024
{{ yum_build_setup }}
){% endif -%}
{{ yum_build_setup }}{% endif -%}

# make the build number clobber
make_build_number "${FEEDSTOCK_ROOT}" "${RECIPE_ROOT}" "${CONFIG_FILE}"
Expand Down
2 changes: 1 addition & 1 deletion news/1958_yum_fix_ulimit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* Changed the build_steps.sh template so that it sets the number of maximum file
descriptors to 1024. This is done to mitigate a bug in old rpm versions (such
as the one shipped with the Centos7 container) that cause the yum install step
to take tremendously longer than necessary. See https://bugzilla.redhat.com/show_bug.cgi?id=1537564
to take tremendously longer than necessary. See https://bugzilla.redhat.com/show_bug.cgi?id=1537564 (#1960) (#1961)

**Deprecated:**

Expand Down
Loading