Bug 1023304

Summary: Failed to set scalable app to manual deploy method after migration
Product: OpenShift Online Reporter: Meng Bo <bmeng>
Component: PodAssignee: Abhishek Gupta <abhgupta>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: abhgupta, dmcphers, jforrest, jhou, lnader
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-24 03:26:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
error_log_for_scaleapp none

Description Meng Bo 2013-10-25 07:22:55 UTC
Description of problem:
Try to set the app to manual deploy method via rhc after migration. Will meet the following error.

Unable to complete the requested operation due to: undefined method `each' for nil:NilClass.
Reference ID: 0fff0e4be53d724194cd26925ae25754

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

How reproducible:

Steps to Reproduce:
1. Create scalable app before server upgrade
2. INT upgrade
3. Try to set an existing scalable app to manual deploy mode
rhc app-configure -a jbeap2s --no-auto-deploy

Actual results:
Meets following error:
Unable to complete the requested operation due to: undefined method `each' for nil:NilClass.
Reference ID: d7bebe757e752e7aadf720360d28faf9

Expected results:
Should be able to configure the app.

Additional info:
There is no such issue for non-scalable apps.

Comment 1 Dan McPherson 2013-10-25 15:37:27 UTC
production.log-20131025.gz:2013-10-25 03:06:05.128 [ERROR] Reference ID: 0fff0e4be53d724194cd26925ae25754 - undefined method `each' for nil:NilClass
production.log-20131025.gz:  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.16.4/app/models/application.rb:408:in `update_configuration'
production.log-20131025.gz:  /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-controller-1.16.4/app/controllers/applications_controller.rb:198:in `update'
production.log-20131025.gz:  /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
production.log-20131025.gz:  /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/abstract_controller/base.rb:167:in `process_action'
production.log-20131025.gz:  /opt/rh/ruby193/root/usr/share/gems/gems/actionpack-3.2.8/lib/action_controller/metal/rendering.rb:10:in `process_action'

Comment 2 Dan McPherson 2013-10-25 16:04:12 UTC
*** Bug 1023515 has been marked as a duplicate of this bug. ***

Comment 3 Lili Nader 2013-10-28 04:36:31 UTC
I think this may have been fixed as part of another bug.  I cannot reproduce it.

Comment 4 Meng Bo 2013-10-28 07:36:53 UTC
Created attachment 816710 [details]

The issue still can be reproduced on devenv_3953 after upgraded from devenv-stage_528.

Attached the full error log.

Comment 5 Lili Nader 2013-10-28 19:03:37 UTC
Can you please list the steps you are using to upgrade?

Comment 7 Lili Nader 2013-10-29 17:53:51 UTC
*** Bug 1024165 has been marked as a duplicate of this bug. ***

Comment 8 Lili Nader 2013-10-29 18:02:37 UTC
The above pull request does not fix the issue that the deployment has an empty activations array.  It only makes sure the validation error is passed to the client.

Comment 9 Abhishek Gupta 2013-10-29 19:49:55 UTC
Broker side fix to validate deployments so that app is not set to an invalid state


Comment 10 Abhishek Gupta 2013-10-29 19:52:22 UTC
Actual issue withe the migration is fixed as described in bug 1023381

Comment 11 Dan McPherson 2013-10-30 01:37:36 UTC
New broker pull:  https://github.com/openshift/origin-server/pull/4044

Comment 12 openshift-github-bot 2013-10-30 03:06:06 UTC
Commit pushed to master at https://github.com/openshift/origin-server

Checking deployment validations for bug 1023381, 1023304

Comment 13 Meng Bo 2013-10-30 11:19:49 UTC
Checked on devenv_3967, issue has been fixed. 

[root@ip-10-236-138-216 ~]# rhc app-configure --no-auto-deploy -a perl1s
Configuring application 'perl1s' ... done

perl1s @ http://perl1s-migration2.dev.rhcloud.com/ (uuid: 5270bea3d9ee67dbde000327)
  Deployment:        manual (use 'rhc deploy')
  Keep Deployments:  1
  Deployment Type:   git
  Deployment Branch: master

Your application 'perl1s' is now configured as listed above.

Use 'rhc show-app perl1s --configuration' to check your configuration values any time.

Move bug to verified.