| Summary: | jbossews setup script fails to correctly remove symlinked lib directory | ||
|---|---|---|---|
| Product: | OpenShift Online | Reporter: | Dan Mace <dmace> |
| Component: | Containers | Assignee: | Dan Mace <dmace> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 2.x | CC: | bmeng |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-09-19 16:49:00 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: | |
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/f2563d3d09c3dbd1da5dc3f122de59ffd5026657 Bug 1004008: Use symlink test rather than -e before call to rm Tested on devenv-stage_461, 1. Create jbossews app 2. Manually replace the lib symlink with real dir under jbossews dir for the gear 3. Run oo-admin-upgrade to re-setup the gear No error when upgrading. Move bug to verified. |
Description of problem: The jbossews setup script attempts to remove preexisting symlinks to the lib directory: [ -e ${OPENSHIFT_JBOSSEWS_DIR}/lib ] && rm ${OPENSHIFT_JBOSSEWS_DIR}/lib However, the -e test will pass if `lib` is a physical directory, causing the subsequent `rm` to fail due to a lack of the -r option. This check should use the -h test to ensure the target of the rm is a symlink. Version-Release number of selected component (if applicable): How reproducible: Upgrade an older jbossews application containing a symlinked ~/jbossews/lib directory. Steps to Reproduce: 1. 2. 3. Actual results: An error during setup: rm: cannot remove `/var/lib/openshift/.../jbossews//lib': Is a directory Expected results: Successful setup execution. Additional info: