Bug 999679

Summary: oo-admin-cartridge must be able to reinstall broken cartridge
Product: OpenShift Online Reporter: Jhon Honce <jhonce>
Component: ContainersAssignee: Paul Morie <pmorie>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 2.xCC: bmeng, xtian, yadu
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-08-29 12:54:25 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:

Description Jhon Honce 2013-08-21 20:36:16 UTC
Description of problem:
If there are 0-byte manifest files in the cartridge repository oo-admin-cartridge can no longer install a new copy.

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. cp /dev/null to any manifest in the cartridge repository
2. oo-admin-cartridge -a install -r -s /usr/libexec/openshift/cartridges
3.

Actual results:
Manifest will not be installed

Expected results:
Corrupt manifest is re-installed

Additional info:

Comment 1 openshift-github-bot 2013-08-22 02:26:04 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/93667c211d5d63823c826382b249c816784c861d
Fix bug 999679: skip corrupted manifests during cartridge installation

Comment 2 Meng Bo 2013-08-23 09:46:09 UTC
Checked on devenv_3692, issue has been fixed.



[root@ip-10-147-221-181 metadata]# cp /dev/null manifest.yml
cp: overwrite `manifest.yml'? y
[root@ip-10-147-221-181 metadata]# ls -al
total 20
drwxr-xr-x.  2 root root 4096 Aug 23 00:54 .
drwxr-xr-x. 10 root root 4096 Aug 23 05:03 ..
-rw-r--r--.  1 root root  690 Aug 23 00:48 jenkins_shell_command.erb
-rw-r--r--.  1 root root  183 Aug 23 00:48 managed_files.yml
-rw-r--r--.  1 root root    0 Aug 23 05:38 manifest.yml
-rw-r--r--.  1 root root 2517 Aug 23 00:48 manifest.yml.0.10
# oo-admin-cartridge -a install -s /usr/libexec/openshift/cartridges/nodejs/
succeeded


Check the platform.log, found the following log in it

August 23 05:39:13 WARN Skipping load of /var/lib/openshift/.cartridge_repository/redhat-nodejs/0.0.4/metadata/manifest.yml because manifest appears to be corrupted

Move the bug to verified.

Note, the fix has not been merged into devenv-stage_452.