Bug 855717 - Deployments launch fails with error "undefined method `minutes' for nil:NilClass".
Deployments launch fails with error "undefined method `minutes' for nil:NilCl...
Status: CLOSED ERRATA
Product: CloudForms Cloud Engine
Classification: Red Hat
Component: aeolus-conductor (Show other bugs)
1.1.0
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Imre Farkas
Rehana
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-10 01:48 EDT by Aziza Karol
Modified: 2016-09-20 01:02 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
The Penalty for Failure strategy caused an error when launching an application due to compatibility issues with Ruby. This change fixes the compatibility issues and lauches applications successfully while the Penalty for Failure strategy is enabled.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-04 10:18:46 EST
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)
err (46.97 KB, image/png)
2012-09-10 01:49 EDT, Aziza Karol
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:1516 normal SHIPPED_LIVE CloudForms Cloud Engine 1.1 update 2012-12-04 14:51:45 EST

  None (edit)
Description Aziza Karol 2012-09-10 01:48:37 EDT
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.Install aeolus and configure ec2.
2.Build/push and create a deployable.
3.click on luanch button.
  
Actual results:
undefined method `minutes' for nil:NilClass is displayed.see attached screenshot

Expected results:
deployment launch should be successful.


Additional info:
rpm -qa | grep aeolus
aeolus-all-0.13.0-0.20120910030008gitb478e0c.fc16.noarch
rubygem-aeolus-image-0.6.0-0.20120909230031git902c81c.fc16.noarch
aeolus-conductor-daemons-0.13.0-0.20120910030008gitb478e0c.fc16.noarch
aeolus-configure-2.8.0-0.20120909230024gitb24d837.fc16.noarch
aeolus-conductor-0.13.0-0.20120910030008gitb478e0c.fc16.noarch
rubygem-aeolus-cli-0.7.0-0.20120909230025git8a46b3f.fc16.noarch
aeolus-conductor-doc-0.13.0-0.20120910030008gitb478e0c.fc16.noarch
Comment 1 Aziza Karol 2012-09-10 01:49:12 EDT
Created attachment 611297 [details]
err
Comment 3 Tzu-Mainn Chen 2012-09-10 11:38:28 EDT
I can't seem to duplicate this, do you have a stack trace?
Comment 4 Tzu-Mainn Chen 2012-09-10 15:48:58 EDT
Partial stack trace:

/usr/share/aeolus-conductor/vendor/provider_selection/strategies/penalty_for_failure/strategy.rb:41:in `calculate'
/usr/share/aeolus-conductor/vendor/provider_selection/strategies/penalty_for_failure/strategy.rb:39:in `each'
/usr/share/aeolus-conductor/vendor/provider_selection/strategies/penalty_for_failure/strategy.rb:39:in `calculate'
/usr/share/aeolus-conductor/lib/provider_selection/base.rb:85:in `match_exists?'
/usr/share/aeolus-conductor/app/models/deployment.rb:603:in `provider_selection_match_exists?'
/usr/share/aeolus-conductor/app/models/deployment.rb:391:in `check_assemblies_matches'
/usr/share/aeolus-conductor/app/controllers/deployments_controller.rb:89:in `launch_time_params'
/usr/lib/ruby/gems/1.8/gems/actionpack-3.0.10/lib/action_controller/metal/implicit_render.rb:4:in `send_action'

Re-assigning to ifarkas, as he knows the most about provider selection (I think; Imre, correct me if I'm wrong).  It looks like the problem is with this line:

            failures_count[provider_account] =
              provider_account.failure_count(:from => Time.now - @options[:time_period_minutes].minutes)

I can't figure out how @options is set. . . ?
Comment 5 Imre Farkas 2012-09-11 06:34:38 EDT
It's set in the included module which you can find in lib/provider_selection/chainable_strategy.rb.
Comment 6 Imre Farkas 2012-09-11 07:27:57 EDT
I am unable to replicate this issue too. 

I guess the steps in the description is missing the enabling and the configuration of the Penalty for Failure strategy because the stacktrace is from this strategy.

What was the settings for the Penalty for Failure strategy when you experienced the issue?
Comment 7 Aziza Karol 2012-09-11 08:04:40 EDT
Yes, you are right.I missed this step.The setting for Penalty for Failure strategy was enabled.

if the penalty for Failure strategy is on,we get the error.
I am able to replicate this issue.
Comment 8 Imre Farkas 2012-09-11 09:34:16 EDT
Pull request sent:
https://github.com/aeolusproject/conductor/pull/53
Comment 9 Tzu-Mainn Chen 2012-09-11 12:01:47 EDT
ACK'd and merged to master
Comment 10 Tzu-Mainn Chen 2012-09-11 18:16:16 EDT
Reviewed followup patch to fix minor issue:

https://github.com/aeolusproject/conductor/pull/54

Both patches in master and 1.1.
Comment 12 Aziza Karol 2012-09-17 05:56:08 EDT
Deployment launch successful after enabling Penalty for Failure strategy.

verified:
rpm -qa | grep aeolus
aeolus-conductor-0.13.7-1.el6cf.noarch
aeolus-all-0.13.7-1.el6cf.noarch
rubygem-aeolus-cli-0.7.1-1.el6cf.noarch
aeolus-conductor-doc-0.13.7-1.el6cf.noarch
aeolus-configure-2.8.6-1.el6cf.noarch
rubygem-aeolus-image-0.3.0-12.el6.noarch
aeolus-conductor-daemons-0.13.7-1.el6cf.noarch
Comment 14 errata-xmlrpc 2012-12-04 10:18:46 EST
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/RHEA-2012-1516.html

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