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   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-23 22:26:41 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Attachments:
Description Flags
error_log_for_scaleapp none

Description Meng Bo 2013-10-25 03:22:55 EDT
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:
always

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 11:37:27 EDT
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 12:04:12 EDT
*** Bug 1023515 has been marked as a duplicate of this bug. ***
Comment 3 Lili Nader 2013-10-28 00:36:31 EDT
I think this may have been fixed as part of another bug.  I cannot reproduce it.
Comment 4 Meng Bo 2013-10-28 03:36:53 EDT
Created attachment 816710 [details]
error_log_for_scaleapp

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 15:03:37 EDT
Can you please list the steps you are using to upgrade?
Comment 7 Lili Nader 2013-10-29 13:53:51 EDT
*** Bug 1024165 has been marked as a duplicate of this bug. ***
Comment 8 Lili Nader 2013-10-29 14:02:37 EDT
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 15:49:55 EDT
Broker side fix to validate deployments so that app is not set to an invalid state

https://github.com/openshift/origin-server/pull/4037
Comment 10 Abhishek Gupta 2013-10-29 15:52:22 EDT
Actual issue withe the migration is fixed as described in bug 1023381
Comment 11 Dan McPherson 2013-10-29 21:37:36 EDT
New broker pull:  https://github.com/openshift/origin-server/pull/4044
Comment 12 openshift-github-bot 2013-10-29 23:06:06 EDT
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/726e1d60bbfcea421bb5537eb26fc91b039c4d2b
Checking deployment validations for bug 1023381, 1023304
Comment 13 Meng Bo 2013-10-30 07:19:49 EDT
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.