Bug 1117004
| Summary: | Use of "pgrep -F" in the bash SDK is unreliable | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Brenton Leanhardt <bleanhar> |
| Component: | Containers | Assignee: | Miciah Dashiel Butler Masters <mmasters> |
| Status: | CLOSED ERRATA | QA Contact: | libra bugs <libra-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 2.1.0 | CC: | adellape, agrimm, anli, cryan, gpei, jhonce, jialiu, jokerman, libra-bugs, libra-onpremise-devel, lmeyer, mmasters, mmccomas |
| Target Milestone: | --- | Keywords: | Upstream |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | rubygem-openshift-origin-node-1.23.9.12-1 | Doc Type: | Bug Fix |
| Doc Text: |
Often when a cartridge starts a runtime in a gear, the cartridge stores the pid of the runtime's process in a pidfile. Later, the cartridge may use the process_running function to determine whether that process is still running in the gear by checking whether any running process has a pid matching the pid saved in the pidfile. However, if the runtime's process had terminated and the operating system had subsequently assigned the same pid to a new process, the process_running function could return a false positive, interfering with cartridge control actions. This bug fix updates the process_running function to use the pgrep command with the -u option to restrict its search to processes belonging to the gear. As a result, the process_running function now has a much lower probability of returning a false positive.
|
Story Points: | --- |
| Clone Of: | 1116135 | Environment: | |
| Last Closed: | 2014-08-04 13:27:40 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1116135 | ||
| Bug Blocks: | |||
|
Description
Brenton Leanhardt
2014-07-07 19:30:35 UTC
Verified and pass in puddle-2-1-2014-07-18 The bug can be recreated at puddle-2014-05-29.3 [bztest-hanli1dom.example.com 53ccdba3d42d02f3a70d3f50]\> gear start Starting gear... Could not start Postgres An error occurred executing 'gear start' (exit code: 70) Error message: CLIENT_ERROR: Failed to execute: 'control start' for /var/lib/openshift/53ccdba3d42d02f3a70d3f50/postgresql Execute same steps in puddle-2-1-2014-07-18, No error was reported and app was started. [bztest-hanli1dom.example.com 53ccda324cfeff7254000015]\> echo 20400 >> postgresql/pid/postgres.pid [bztest-hanli1dom.example.com 53ccda324cfeff7254000015]\> gear start Starting gear... Starting Postgres cartridge Postgres started Starting NodeJS cartridge Mon Jul 21 2014 05:27:17 GMT-0400 (EDT): Starting application 'bztest' ... Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-0999.html |