Bug 983297 - Broker fails to handle exceptions on malformed manifest.yml
Summary: Broker fails to handle exceptions on malformed manifest.yml
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Node
Version: 1.2.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Luke Meyer
QA Contact: libra bugs
URL:
Whiteboard:
Depends On: 977519
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-10 22:14 UTC by Luke Meyer
Modified: 2017-03-08 17:35 UTC (History)
9 users (show)

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]
Clone Of: 977519
Environment:
Last Closed: 2013-08-05 17:19:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1138 0 normal SHIPPED_LIVE OpenShift Enterprise 1.2.1 bug fix and enhancement update 2013-08-05 21:14:54 UTC

Description Luke Meyer 2013-07-10 22:14:27 UTC
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 17:16:59 UTC
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 17:41:31 UTC
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 05:42:37 UTC
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 17:19:21 UTC
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.