Bug 988578 - Error when trying to add mysql to an app
Error when trying to add mysql to an app
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Pod (Show other bugs)
2.x
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Rajat Chopra
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-25 17:39 EDT by Thomas Wiest
Modified: 2015-05-14 20:19 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-07 18:56:47 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 Thomas Wiest 2013-07-25 17:39:48 EDT
Description of problem:
While trying to add mysql to an application, I get "undefined method `<=' for nil:NilClass."


From RHC:
[...snip...]
Unable to complete the requested operation due to: undefined method `<=' for nil:NilClass.
Reference ID: 4a5916d3957867674fa7501bf5045e13
Reference ID: 4a5916d3957867674fa7501bf5045e13
Connection to ex-srv1.int.rhcloud.com closed.
[...snip...]

From Broker production.log:
[...snip...]
2013-07-25 17:32:56.531 [DEBUG] MOPED: 10.34.78.221:27017 UPDATE       database=openshift_broker collection=applicati
ons selector={"_id"=>"51f1996d03ef6447810001f7"} update={"$pull"=>{"pending_op_groups"=>{"_id"=>"51f1998803ef64de2000
01a3"}}} flags=[] (pid:27433)
2013-07-25 17:32:56.531 [DEBUG] COMMAND      database=openshift_broker command={:getlasterror=>1, :safe=>true} (0.758
2ms) (pid:27433)
2013-07-25 17:32:56.532 [DEBUG] MOPED: 10.34.78.221:27017 QUERY        database=openshift_broker collection=domains s
elector={"$query"=>{"_id"=>"51edd57e03ef64266c000003"}, "$orderby"=>{:_id=>1}} flags=[] limit=-1 skip=0 batch_size=ni
l fields=nil (0.5786ms) (pid:27433)
2013-07-25 17:32:56.534 [DEBUG] MOPED: 10.34.78.221:27017 COMMAND      database=openshift_broker command={:findAndMod
ify=>"locks", :query=>{"user_id"=>"51edc9a203ef645959000001", "locked"=>false, "app_ids.51f1996d03ef6447810001f7"=>{"
$exists"=>true}}, :new=>true, :update=>{"$unset"=>{"app_ids.51f1996d03ef6447810001f7"=>""}}} (0.7303ms) (pid:27433)

[...snip...]

2013-07-25 17:32:56.534 [ERROR] Reference ID: 4a5916d3957867674fa7501bf5045e13 - undefined method `<=' for nil:NilClass
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.12.2/app/models/application.rb:1556:in `valid_sparse_resident'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.12.2/app/models/application.rb:1581:in `block (2 levels) in calculate_add_component_ops'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.12.2/app/models/application.rb:1579:in `each'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.12.2/app/models/application.rb:1579:in `each_with_index'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.12.2/app/models/application.rb:1579:in `block in calculate_add_component_ops'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.12.2/app/models/application.rb:1567:in `each'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.12.2/app/models/application.rb:1567:in `calculate_add_component_ops'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.12.2/app/models/application.rb:1788:in `block in calculate_ops'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.12.2/app/models/application.rb:1761:in `each'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.12.2/app/models/application.rb:1761:in `calculate_ops'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.12.2/app/models/application.rb:1335:in `update_requirements'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.12.2/app/models/application.rb:1177:in `run_jobs'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.12.2/app/models/application.rb:507:in `block in add_features'
  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.12.2/app/models/application.rb:1309:in `run_in_application_lock'
[...snip...]



Version-Release number of selected component (if applicable):
rhc-broker-1.12.3-1.el6oso.noarch


How reproducible:
Very, I was able to repro 2 times in a row.


Steps to Reproduce:
1. Create a php non-scalable app
2. Try to add mysql to the app
3. Notice the error as above


Actual results:
Errors with the above error.


Expected results:
It should embed the mysql cart.
Comment 1 Rajat Chopra 2013-07-25 19:04:44 EDT
The above error is apparently because of stale cartridge parsing data.

The new deploy needs to do two things (now added to Release Ticket) :
1. Restart mcollective on all nodes
2. Clear cache (oo-admin-broker-cache -c) on all broker nodes
Comment 2 Thomas Wiest 2013-07-25 20:04:44 EDT
We always restart mcollective on all ex-nodes for every deploy.

I cleared the broker cache on all brokers and that fixed the problem.
Comment 3 Jianwei Hou 2013-07-25 22:31:28 EDT
Mark as verified according to comment 2

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