Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1073604

Summary: ApplicationsController#create raisedMCollective::DDLValidationError: Cannot validate input uid: value should be a number
Product: OpenShift Container Platform Reporter: Luke Meyer <lmeyer>
Component: NodeAssignee: Brenton Leanhardt <bleanhar>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.0.0CC: bleanhar, cryan, dmcphers, jforrest, jhou, jialiu, libra-onpremise-devel
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Minor bug in the rubygem-openshift-origin-msg-broker-mcollective package. Consequence: Under certain circumstances a DDL validation error could be raised by our MCollective agent. Fix: Ensure that the argument passed to the MCollective agent has the correct type. Result: The openshift-broker service will need to be restarted after this fix is installed. The ruby193-mcollective service on the Nodes will have to be restarted.
Story Points: ---
Clone Of: 1039641 Environment:
Last Closed: 2014-03-18 15:06:22 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:
Embargoed:
Bug Depends On: 1039641    
Bug Blocks:    

Description Luke Meyer 2014-03-06 19:07:49 UTC
+++ This bug was initially created as a clone of Bug #1039641 +++

Description of problem:
Reported in both PROD and INT, ApplicationsController#create raisedMCollective::DDLValidationError: Cannot validate input uid: value should be a number 

Some investigation already done to uncover that in mcollective_application_container_proxy.rb in has_uid_or_gid?  the call to client.has_uid_or_gid(:uid => uid.to_s) will always fail.


Stacktrace:
…rh/ruby193/root/usr/share/ruby/mcollective/ddl/
base.rb: 144:in `rescue in validate_input_argument'
…rh/ruby193/root/usr/share/ruby/mcollective/ddl/
base.rb: 125:in `validate_input_argument'
…uby193/root/usr/share/ruby/mcollective/ddl/
agentddl.rb: 167:in `block in validate_rpc_request'
…uby193/root/usr/share/ruby/mcollective/ddl/
agentddl.rb: 159:in `each'
…uby193/root/usr/share/ruby/mcollective/ddl/
agentddl.rb: 159:in `validate_rpc_request'
…/ruby193/root/usr/share/ruby/mcollective/rpc/
client.rb: 220:in `method_missing'
…b/openshift/
mcollective_application_container_proxy.rb:2813:in `block in has_uid_or_gid?'
…b/openshift/
mcollective_application_container_proxy.rb:2325:in `rpc_exec'
…b/openshift/
mcollective_application_container_proxy.rb:2812:in `has_uid_or_gid?'
…b/openshift/
mcollective_application_container_proxy.rb: 407:in `rescue in block in create'
…b/openshift/
mcollective_application_container_proxy.rb: 396:in `block in create'
…b/openshift/
mcollective_application_container_proxy.rb: 383:in `each'
…b/openshift/
mcollective_application_container_proxy.rb: 383:in `create'
…/openshift-origin-controller-1.18.1/app/models/
gear.rb: 112:in `create_gear'
…roller-1.18.1/app/models/pending_ops/
create_gear_op.rb:   8:in `execute'
…n-controller-1.18.1/app/models/
pending_app_op_group.rb: 108:in `block in execute'
…n-controller-1.18.1/app/models/
pending_app_op_group.rb:  97:in `each'
…n-controller-1.18.1/app/models/
pending_app_op_group.rb:  97:in `execute'
…ift-origin-controller-1.18.1/app/models/
application.rb:1511:in `run_jobs'
…ift-origin-controller-1.18.1/app/models/
application.rb: 667:in `block in add_features'
…ift-origin-controller-1.18.1/app/models/
application.rb:1577:in `run_in_application_lock'
…ift-origin-controller-1.18.1/app/models/
application.rb: 651:in `add_features'
…ift-origin-controller-1.18.1/app/models/
application.rb: 253:in `create_app'
…ller-1.18.1/app/controllers/
applications_controller.rb: 157:in `create'
…ntroller-1.18.1/lib/openshift/controller/
action_log.rb:  80:in `set_logged_request'
…sr/share/gems/gems/journey-1.0.4/lib/journey/
router.rb:  68:in `block in call'
…sr/share/gems/gems/journey-1.0.4/lib/journey/
router.rb:  56:in `each'
…sr/share/gems/gems/journey-1.0.4/lib/journey/
router.rb:  56:in `call'
…per-0.11.1/lib/mongo_mapper/middleware/
identity_map.rb:  10:in `call'
…oid-3.0.21/lib/rack/mongoid/middleware/
identity_map.rb:  34:in `block in call'
…e/gems/gems/mongoid-3.0.21/lib/mongoid/
unit_of_work.rb:  39:in `unit_of_work'
…oid-3.0.21/lib/rack/mongoid/middleware/
identity_map.rb:  34:in `call'
…3/root/usr/share/gems/gems/rack-1.4.1/lib/rack/
etag.rb:  23:in `call'
…/share/gems/gems/rack-1.4.1/lib/rack/
conditionalget.rb:  35:in `call'
…e/gems/gems/rack-1.4.1/lib/rack/session/abstract/
id.rb: 205:in `context'
…e/gems/gems/rack-1.4.1/lib/rack/session/abstract/
id.rb: 200:in `call'
…/share/gems/gems/rack-1.4.1/lib/rack/
methodoverride.rb:  21:in `call'
…oot/usr/share/gems/gems/rack-1.4.1/lib/rack/
runtime.rb:  17:in `call'
…3/root/usr/share/gems/gems/rack-1.4.1/lib/rack/
lock.rb:  15:in `call'
…are/gems/gems/rack-cache-1.2/lib/rack/cache/
context.rb: 136:in `forward'
…are/gems/gems/rack-cache-1.2/lib/rack/cache/
context.rb: 143:in `pass'
…are/gems/gems/rack-cache-1.2/lib/rack/cache/
context.rb: 155:in `invalidate'
…are/gems/gems/rack-cache-1.2/lib/rack/cache/
context.rb:  71:in `call!'
…are/gems/gems/rack-cache-1.2/lib/rack/cache/
context.rb:  51:in `call'
…r-3.0.21/lib/phusion_passenger/rack/
request_handler.rb:  97:in `process_request'
…0.21/lib/phusion_passenger/
abstract_request_handler.rb: 521:in `accept_and_process_next_request'
…0.21/lib/phusion_passenger/
abstract_request_handler.rb: 274:in `main_loop'
…0.21/lib/phusion_passenger/rack/
application_spawner.rb: 206:in `start_request_handler'
…0.21/lib/phusion_passenger/rack/
application_spawner.rb:  79:in `block in spawn_application'
…s/gems/passenger-3.0.21/lib/phusion_passenger/
utils.rb: 470:in `safe_fork'
…0.21/lib/phusion_passenger/rack/
application_spawner.rb:  64:in `spawn_application'
…assenger-3.0.21/lib/phusion_passenger/
spawn_manager.rb: 264:in `spawn_rack_application'
…assenger-3.0.21/lib/phusion_passenger/
spawn_manager.rb: 137:in `spawn_application'
…assenger-3.0.21/lib/phusion_passenger/
spawn_manager.rb: 275:in `handle_spawn_application'
…senger-3.0.21/lib/phusion_passenger/
abstract_server.rb: 357:in `server_main_loop'
…senger-3.0.21/lib/phusion_passenger/
abstract_server.rb: 206:in `start_synchronously'

--- Additional comment from Jessica Forrester on 2013-12-09 11:44:34 EST ---

New relic error report: https://rpm.newrelic.com/accounts/411887/applications/2116199/traced_errors/1015552102?tw[end]=1386606778&tw[start]=1386347578

--- Additional comment from Dan McPherson on 2013-12-09 13:32:55 EST ---

https://github.com/openshift/origin-server/pull/4300

Stage pull request will follow.

--- Additional comment from openshift-github-bot on 2013-12-09 14:27:44 EST ---

Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/32e688a62bc6321c0a81b42a1ab913e0073cc825
Bug 1039641

--- Additional comment from Dan McPherson on 2013-12-09 14:32:36 EST ---

Will be in devenv-stage_608 as well.

--- Additional comment from Hou Jianwei on 2013-12-10 06:59:12 EST ---

This problem is not reproducible on devenv_4115, will also verify it on devenv-stage_608 when the image was ready

--- Additional comment from Hou Jianwei on 2013-12-11 01:20:21 EST ---

This problem is not reproducible on devenv-stage_609. Mark as verified.

Comment 6 Johnny Liu 2014-03-14 10:25:48 UTC
Reproduce steps:
1. Set "DISTRICTS_MAX_CAPACITY=1" in /etc/openshift/plugins.d/openshift-origin-msg-broker-mcollective.conf
2. Re-start openshift-broker service.
3. Create a district, add a node to it.
4. On node, add a test user with gid=1000 using useradd command.
5. Create app.


Rest this bug with the above steps, though this issue is fixed, will introduce a new bug.

https://bugzilla.redhat.com/show_bug.cgi?id=1047957

So need pick the following patch to Enterprise.
https://github.com/openshift/origin-server/commit/305277c8f3d101b2fde4e75d30739f6e183a6912

Comment 9 Johnny Liu 2014-03-17 02:35:15 UTC
Verified this bug with 2.0.z/2014-03-14.1 puddle, and PASS.

Follow the steps mentioned in comment 6.

# rhc app create phpapp php -p redhat -l jialiu
Using php-5.3 (PHP 5.3) for 'php'

Application Options
-------------------
Domain:     jialiu
Cartridges: php-5.3
Gear Size:  default
Scaling:    no

Creating application 'phpapp' ... 
Unable to complete the requested operation due to: uid could not be reserved in target district '5322c37596511dbba5000001'.  Please ensure the target district has available capacity..
Reference ID: 34a1a547fe055316d6cd87bd63e5d2fc

Comment 11 errata-xmlrpc 2014-03-18 15:06:22 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-2014-0309.html