Bug 1152700

Summary: node - skip partial deployments
Product: OpenShift Container Platform Reporter: Jason DeTiberus <jdetiber>
Component: ContainersAssignee: Jason DeTiberus <jdetiber>
Status: CLOSED ERRATA QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.1.0CC: adellape, anli, bmeng, jack, jhonce, jokerman, libra-bugs, libra-onpremise-devel, mmccomas, zzhao
Target Milestone: ---Keywords: Reopened, Upstream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, incomplete deployments that had never been activated caused the broker to no longer update the deployments list for the application. This created a situation where the user would be unable to rollback a failed deployment if the last successful deployment was after an incomplete one. This bug fix updates node logic to skip incomplete deployments when reporting to the broker, and as a result users can successfully rollback deployments in this scenario.
Story Points: ---
Clone Of: 1148252 Environment:
Last Closed: 2014-11-03 19:55:29 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: 1148252    
Bug Blocks:    

Comment 2 Anping Li 2014-10-16 02:16:20 UTC
Failed on OSE-2.2 puddle-2014-10-15.1, the  prior deployment can be roll-back. 
please refer to the step 4.
1) [hanli1@broker sphp]$ rhc show-app sphp --configuration
sphp @ http://sphp-hanli1dom.ose22-app-20141015.com.cn/ (uuid: 543e29774add71fc25000027)
----------------------------------------------------------------------------------------
  Deployment:        auto (on git push)
  Keep Deployments:  10
  Deployment Type:   git
  Deployment Branch: master

[hanli1@broker sphp]$ rhc deployment-list -a sphp
Oct 15  4:00 PM, deployment df29bcd6
9:45 AM, deployment 5cc02ac8
9:45 AM, deployment 307f5271
9:46 AM, deployment a1ca1ab2
9:46 AM, deployment e29ef07b
9:46 AM, deployment fef49c71

2) change keep-deployments 3 
[hanli1@broker sphp]$ rhc app-configure sphp --keep-deployments 3
Configuring application 'sphp' ... done

After git push:

sphp @ http://sphp-hanli1dom.ose22-app-20141015.com.cn/ (uuid: 543e29774add71fc25000027)
----------------------------------------------------------------------------------------
  Deployment:        auto (on git push)
  Keep Deployments:  3
  Deployment Type:   git
  Deployment Branch: master

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

[hanli1@broker sphp]$ rhc deployment-list -a sphp
9:46 AM, deployment e29ef07b
9:46 AM, deployment fef49c71
9:54 AM, deployment cfba2fe1


3) [root@node2 ~]# oo-devel-node report-deployments -c 543e29774add71fc25000027
Completed reporting deployments to Broker for gear 543e29774add71fc25000027

4) rollback the deploy


[hanli1@broker sphp]$ rhc app deploy fef49c71 -a sphp
Deployment of git ref 'fef49c71' in progress for application sphp ...
Git ref fef49c71 is invalid
Error deploying git ref. You can try to deploy manually with:
ssh -t 543e29774add71fc25000027.com.cn 'gear deploy fef49c71'
SSH command finished with exit status = 255

[sphp-hanli1dom.ose22-app-20141015.com.cn 543e29774add71fc25000027]\> gear deploy fef49c71
Git ref fef49c71 is invalid

Comment 4 Anping Li 2014-10-21 02:32:11 UTC
Verified and pass. 
the prior deployment can be roll-back by rhc deployment-activate fef49c71 - sphp.

Comment 6 errata-xmlrpc 2014-11-03 19:55:29 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.

https://rhn.redhat.com/errata/RHSA-2014-1796.html