Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 991410 - Node execution failure
Summary: Node execution failure
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Abhishek Gupta
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-02 11:42 UTC by Michal Fojtik
Modified: 2015-05-15 00:19 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-29 12:49:27 UTC
Target Upstream Version:


Attachments (Terms of Use)
MCollective and rhc data (deleted)
2013-08-15 15:08 UTC, Dan Mace
no flags Details

Description Michal Fojtik 2013-08-02 11:42:02 UTC
Description of problem:

When adding cartridge and the install script fails with return code != 0, I get this message:

Unable to complete the requested operation due to: Node execution failure (invalid exit code
from node).  If the problem persists please contact Red Hat support..
Reference ID: aec8a20e8ea61e7b3d88299c4d377987

How reproducible:

Create an cartridge and return from the install script with code other than 0, as an example have look on this repo:

https://github.com/mfojtik/openshift-sidekiq-cart/blob/master/bin/install


Steps to Reproduce:
1. rhc add-cartridge http://cartreflect-claytondev.rhcloud.com/reflect?github=mfojtik/openshift-sidekiq-cart --app test_app

Actual results:

 ~/code/openshift-sidekiq-cart → rhc add-cartridge http://cartreflect-claytondev.rhcloud.com/reflect?github=mfojtik/openshift-sidekiq-cart --app test
The cartridge
'http://cartreflect-claytondev.rhcloud.com/reflect?github=mfojtik/openshift-sidekiq-cart' will
be downloaded and installed
Adding http://cartreflect-claytondev.rhcloud.com/reflect?github=mfojtik/openshift-sidekiq-cart
to application 'test' ...
Unable to complete the requested operation due to: Node execution failure (invalid exit code
from node).  If the problem persists please contact Red Hat support..
Reference ID: aec8a20e8ea61e7b3d88299c4d377987

Expected results:

Cartridge registration should fail with the client_result printed out.

Comment 3 Dan Mace 2013-08-15 15:07:11 UTC
This appears to be a bug in the broker. I've attached diagnostic output demonstrating two scenarios where the MCollective reply for the cart 'configure' action returns CLIENT_MESSAGE and CLIENT_RESPONSE strings which the broker never sends back to the client (revealed using rhc with HTTP_DEBUG=true).

Comment 4 Dan Mace 2013-08-15 15:08:14 UTC
Created attachment 786970 [details]
MCollective and rhc data

Comment 5 Abhishek Gupta 2013-08-15 22:03:30 UTC
In your install script of the cartridge, instead of using "client_result" for reporting configuration/validation/pre-requisite failures, you need to use "client_error". 

Please refer the 10gen-mms-agent cartridge as an example. Let me know if this resolves this issue.

Comment 6 Michal Fojtik 2013-08-16 11:34:22 UTC
Yes, this fixed it. Thanks Abhishek!

Maybe we should consider more descriptive error message than 'Node failure' here.

Comment 7 Abhishek Gupta 2013-08-16 15:46:47 UTC
Node failure is the catch-all exception being thrown and "client_error" messages from the node are displayed.

Comment 8 Jianwei Hou 2013-08-19 03:04:47 UTC
Verified on devenv_3671

Forked the repo and update client_result with client_error, now the client is able to see the error messages, mark as verified.

master $ rhc add-cartridge https://github.com/jhou1/openshift-sidekiq-cart/raw/master/metadata/manifest.yml -a d1 -px         [11:02:17]
The cartridge 'https://github.com/jhou1/openshift-sidekiq-cart/raw/master/metadata/manifest.yml' will be downloaded and installed
Adding https://github.com/jhou1/openshift-sidekiq-cart/raw/master/metadata/manifest.yml to application 'd1' ... 
ERROR: You must create the 'sidekiq.rb' file in your root folder first:
Sidekiq.configure_client do |config|
  config.redis = { url: "redis://:#{ENV['REDIS_PASSWORD']}@#{ENV['OPENSHIFT_REDIS_HOST']}:#{ENV['OPENSHIFT_REDIS_PORT']}" }
end
Sidekiq.configure_server do |config|
  config.redis = { url: "redis://:#{ENV['REDIS_PASSWORD']}@#{ENV['OPENSHIFT_REDIS_HOST']}:#{ENV['OPENSHIFT_REDIS_PORT']}" }
end
require_relative './lib/workers/sample_worker.rb'


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