Bug 983297 - Broker fails to handle exceptions on malformed manifest.yml
Broker fails to handle exceptions on malformed manifest.yml
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Pod (Show other bugs)
1.2.0
Unspecified Unspecified
high Severity medium
: ---
: ---
Assigned To: Luke Meyer
libra bugs
:
Depends On: 977519
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-10 18:14 EDT by Luke Meyer
Modified: 2017-03-08 12 EST (History)
9 users (show)

See Also:
Fixed In Version: rubygem-openshift-origin-controller-1.9.16.1-1
Doc Type: Bug Fix
Doc Text:
The broker did not handle malformed manifest.yml files correctly. Adding a downloadable cartridge with malformed YAML to an application caused the broker to return an error on all subsequent calls. With this fix, proper input handling code was added and malformed manifest.yml files are now rejected. However, this will not fix an application that is already broken in this way. In that case, the application should be removed by an administrator using the following command: $ oo-admin-ctl-app --command force-destroy -l [openshift user] -a [app name]
Story Points: ---
Clone Of: 977519
Environment:
Last Closed: 2013-08-05 13:19:21 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Luke Meyer 2013-07-10 18:14:27 EDT
Need to ensure upstream fix gets into Enterprise.

+++ This bug was initially created as a clone of Bug #977519 +++

Description of problem:

When a user adds a downloadable cartridge with malformed YAML to an app, the broker returns an ISE on all subsequent calls. 

How reproducible:
Always

Steps to Reproduce:
1. rhc app create dlcart jbossas-7
2. rhc cartridge add https://raw.github.com/Tok/OpenShift-IRC-cartridge/master/metadata/manifest.yml
3. Try to use the web console or any rhc commands.

Actual results:
rhc returns "The server did not respond correctly."
The web console shows "We appear to be having technical difficulties"

Expected results:
The broker should handle exceptions.  The cartridge addition should fail, or the user should be able to remove it to get back into a working state.
Comment 2 Luke Meyer 2013-07-16 13:16:59 EDT
https://github.com/openshift/enterprise-server/pull/107
Fix CPed from origin-server
origin stage commit a6cb4f474fde8fb8930f097eb6ed428b9783f468
origin master commit 4a7c640248f238d59e1304e526b3f92383fb7c3f

However, note that it won't fix an application that is already broken in this way. For that, you pretty much need to force-destroy it administratively, e.g.:

# oo-admin-ctl-app --command force-destroy -l demo -a boom
Comment 3 Luke Meyer 2013-07-16 13:41:31 EDT
There was a follow-on fix upstream at https://github.com/openshift/origin-server/pull/3068 but the code has already drifted enough that I think pulling that in would be overly complicated/risky. That was not as urgent a problem as the one solved above.
Comment 6 Gaoyun Pei 2013-07-19 01:42:37 EDT
Verify this bug on puddle 1.2/2013-07-18.4

1. create an app
   rhc app create app1 ruby-1.8
2. add a malformed mysql cartridge to the application
[root@dhcp-8-133 workspace]# rhc cartridge add https://raw.github.com/jhou1/downloadable-malformed/master/metadata/manifest.yml -a app1
The cartridge
'https://raw.github.com/jhou1/downloadable-malformed/master/metadata/manifest.yml' will be
downloaded and installed
Adding https://raw.github.com/jhou1/downloadable-malformed/master/metadata/manifest.yml to
application 'app1' ...
can't convert nil into String
Comment 9 errata-xmlrpc 2013-08-05 13:19:21 EDT
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-2013-1138.html

Note You need to log in before you can comment on or make changes to this bug.