-
Notifications
You must be signed in to change notification settings - Fork 79
Increase resource limits to prevent crashes #887
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
Conversation
Thank you for contributing to the Leapp project!Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergeable.
To launch regression testing public members of oamg organization can leave the following comment:
Please open ticket in case you experience technical problem with the CI. (RH internal only) Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please consider rerunning the CI by commenting leapp-ci build (might require several comments). If the problem persists, contact leapp-infra. |
|
/packit copr-build |
|
/packit retest-failed |
1 similar comment
|
/packit retest-failed |
|
/packit build |
Steps to reproduce the original issue, for reviewers
Results in: |
1f67c62 to
51e485b
Compare
51e485b to
656e7b9
Compare
656e7b9 to
82d31b8
Compare
Originally the version of the leapp module has been defined inside `leapp/__init__.py` module which has been loaded when building the leapp python module/package. Part of the `leapp/__init__.py` file is also load and application of workarounds right now, which is unsafe and adding new workarounds can lead to crash of the build process as the required runtime python modules do not have to be installed on the system that time. Moving the definition into the separate `leapp/__version__.py` file which could be used safely during the build time. Note that nowadays suggested python way requires Python 3.8+ but this project is going to support Python3.6 for another years, so we go this old way still.
82d31b8 to
128d210
Compare
If Leapp was run with low resource limits, a crash would occur. This commit adjusts the resource limits to higher values to prevent such crashes: * The first limit increased is the maximum number of open file descriptors. * The second is the limit for the maximum writable file size. Resolves: RHEL-26459 and RHEL-16881
128d210 to
0b774e3
Compare
| except ValueError as err: | ||
| raise FrameworkInitializationError( | ||
| 'Unable to set the required soft limit of resource due to system restrictions. ' | ||
| 'This limit is necessary to prevent the program from crashin. ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 'This limit is necessary to prevent the program from crashin. ' | |
| 'This limit is necessary to prevent the program from crashing. ' |
Testing the PR - fsizeLeapp without the changes introduced by this PRUsing the reproducer provided in my earlier comment on the current (main) version of leapp, we get: This PR's version of leapp
|
Testing limit on the number of opened file descriptorsI have added the following code to the function The patch works as expected - without it I get an error, with it everything goes smoothly. Also note that we do not need to set the limit on the number of opened file descriptors. This issue has been encountered previously, because we were leaking file descriptors, not because the system had low limits. |
|
The e2e tests are failing because 9.2 is not a valid target. I will merge this in a second, while my own 8.10 > 9.6 upgrade finishes. |
## Announce This is the last Python 2.7 compatible release. Putting Py2 on its earned rest, all the code is going to keep Python 3.6 compatibility. In the same time we are going to stop the testing and building on RHEL 7. ## Packaging - Bump leapp-framework to 6.0 (oamg#870) - Bump leapp-framework-dependencies to 6 (oamg#870) - Require PyAML (on RHEL 7) and python3-PyYAML (on RHEL 8) packages (oamg#870) - Introduce /etc/leapp/actor_conf.d/ in the leapp rpm (oamg#885) ## Framework ### Fixes - Increase soft limits on the number of opened file descriptors and maximum size of manipulated files during initialization (oamg#887) ### Enhancements - [Tech preview] Introduce configurability for leapp actors (oamg#870) ## Snactor ### Enhancements - snactor(run): allow using an existing execution context in used leapp.db (oamg#873) ## stdlib ### Enhancements - [Tech preview] Introduce `api.retrieve_config` function to obtain configuration for the actor based on the specified configuration schema (oamg#870)
## Announce This is the last Python 2.7 compatible release. Putting Py2 on its earned rest, all the code is going to keep Python 3.6 compatibility. In the same time we are going to stop the testing and building on RHEL 7. ## Packaging - Bump leapp-framework to 6.0 (oamg#870) - Bump leapp-framework-dependencies to 6 (oamg#870) - Require PyAML (on RHEL 7) and python3-PyYAML (on RHEL 8) packages (oamg#870) - Introduce /etc/leapp/actor_conf.d/ in the leapp rpm (oamg#885) ## Framework ### Fixes - Increase soft limits on the number of opened file descriptors and maximum size of manipulated files during initialization (oamg#887) ### Enhancements - [Tech preview] Introduce configurability for leapp actors (oamg#870) ## Snactor ### Enhancements - snactor(run): allow using an existing execution context in used leapp.db (oamg#873) ## stdlib ### Enhancements - [Tech preview] Introduce `api.retrieve_config` function to obtain configuration for the actor based on the specified configuration schema (oamg#870)
…rned rest, all the code is going to keep Python 3.6 compatibility. In the same time we are going to stop the testing and building on RHEL 7. - Bump leapp-framework to 6.0 (oamg#870) - Bump leapp-framework-dependencies to 6 (oamg#870) - Require PyAML (on RHEL 7) and python3-PyYAML (on RHEL 8) packages (oamg#870) - Introduce /etc/leapp/actor_conf.d/ in the leapp rpm (oamg#885) - Increase soft limits on the number of opened file descriptors and maximum size of manipulated files during initialization (oamg#887) - [Tech preview] Introduce configurability for leapp actors (oamg#870) - snactor(run): allow using an existing execution context in used leapp.db (oamg#873) - [Tech preview] Introduce `api.retrieve_config` function to obtain configuration for the actor based on the specified configuration schema (oamg#870)
## Announce This is the last Python 2.7 compatible release. Putting Py2 on its earned rest, all the code is going to keep Python 3.6 compatibility. In the same time we are going to stop the testing and building on RHEL 7. ## Packaging - Bump leapp-framework to 6.0 (oamg#870) - Bump leapp-framework-dependencies to 6 (oamg#870) - Require PyAML (on RHEL 7) and python3-PyYAML (on RHEL 8) packages (oamg#870) - Introduce /etc/leapp/actor_conf.d/ in the leapp rpm (oamg#885) ## Framework ### Fixes - Increase soft limits on the number of opened file descriptors and maximum size of manipulated files during initialization (oamg#887) ### Enhancements - [Tech preview] Introduce configurability for leapp actors (oamg#870) ## Snactor ### Enhancements - snactor(run): allow using an existing execution context in used leapp.db (oamg#873) ## stdlib ### Enhancements - [Tech preview] Introduce `api.retrieve_config` function to obtain configuration for the actor based on the specified configuration schema (oamg#870)
## Announce This is the last Python 2.7 compatible release. Putting Py2 on its earned rest, all the code is going to keep Python 3.6 compatibility. In the same time we are going to stop the testing and building on RHEL 7. ## Packaging - Bump leapp-framework to 6.0 (#870) - Bump leapp-framework-dependencies to 6 (#870) - Require PyAML (on RHEL 7) and python3-PyYAML (on RHEL 8) packages (#870) - Introduce /etc/leapp/actor_conf.d/ in the leapp rpm (#885) ## Framework ### Fixes - Increase soft limits on the number of opened file descriptors and maximum size of manipulated files during initialization (#887) ### Enhancements - [Tech preview] Introduce configurability for leapp actors (#870) ## Snactor ### Enhancements - snactor(run): allow using an existing execution context in used leapp.db (#873) ## stdlib ### Enhancements - [Tech preview] Introduce `api.retrieve_config` function to obtain configuration for the actor based on the specified configuration schema (#870)
If Leapp was run with low resource limits, a crash would occur. This commit adjusts the resource limits to higher values to prevent such crashes:
Note that this fix was first implemented into leapp-repository, but with fsize values being too low, the leapp tool started to crash, thats why it has to be implemented into the framework.
Successfully tested with very low fzise values (ulimit -f 1 && leapp preugrade passes).
Jira: RHEL-79411