Bug 803332

Summary: idled app can never be recovered after move it from one node to another.
Product: OKD Reporter: Johnny Liu <jialiu>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 1.xCC: dmcphers, rmillner
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-19 18:23:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Johnny Liu 2012-03-14 13:12:21 UTC
Description of problem:
idled app can never be recovered after move it from one node to another.

Try to access app home page via browser after move operation, but it return "Service Temporarily Unavailable" error.

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

How reproducible:
Always

Steps to Reproduce:
1. Setup multi-node env
2. Create a jboss app
3. Log into instance, idle this app
# rhc-idler -u cc5fc37ebe1e41a49f2dbb5c46c28e88
4. Move this app from on node to another.
# rhc-admin-move --app_uuid cc5fc37ebe1e41a49f2dbb5c46c28e88 -i ip-10-72-238-117
URL: http://jb-jialiu.dev.rhcloud.com
Login: jialiu
App UUID: cc5fc37ebe1e41a49f2dbb5c46c28e88
DEBUG: Source district uuid: df03c6c0ee5b4f92b5b16c26e3a68abc
DEBUG: Destination district uuid: df03c6c0ee5b4f92b5b16c26e3a68abc
DEBUG: District unchanged keeping uid
DEBUG: Moving app 'jb' with uuid cc5fc37ebe1e41a49f2dbb5c46c28e88 from ip-10-110-222-57 to ip-10-72-238-117
DEBUG: Getting existing app 'jb' status before moving
DEBUG: App 'jb' was idle
DEBUG: Not accessing url since application was stopped
DEBUG: Force stopping existing app 'jb' before moving
DEBUG: Creating new account for app 'jb' on ip-10-72-238-117
DEBUG: Moving content for app 'jb' to ip-10-72-238-117
Identity added: /var/www/stickshift/broker/config/keys/rsync_id_rsa (/var/www/stickshift/broker/config/keys/rsync_id_rsa)
Agent pid 9476
DEBUG: Performing cartridge level move for 'jb' on ip-10-72-238-117
DEBUG: Fixing DNS and mongo for app 'jb' after move
DEBUG: Changing server identity of 'jb' from 'ip-10-110-222-57' to 'ip-10-72-238-117'
URL: http://jb-jialiu.dev.rhcloud.com
DEBUG: Deconfiguring old app 'jb' on ip-10-110-222-57 after move
Successfully moved 'jb' with uuid 'cc5fc37ebe1e41a49f2dbb5c46c28e88' from 'ip-10-110-222-57' to 'ip-10-72-238-117'
5. Check this app's status, and try to access app's page from browser.
  
Actual results:
# rhc-idler -l
cc5fc37ebe1e41a49f2dbb5c46c28e88 is idled

# ls .httpd.d/cc5fc37ebe1e41a49f2dbb5c46c28e88_jialiu_jb
00000_default.conf

NOTE:
0000000000000_disabled.conf is not listed there.

Access app home page via browser, but it return "Service Temporarily Unavailable" error.

Expected results:
After move idled app should be accessible when accessing it.

Additional info:

Comment 1 Dan McPherson 2012-03-14 20:34:46 UTC
The issue here is rhc-idler is now looking at the state files.  Which says the app is idled already.

Comment 2 Jhon Honce 2012-03-14 21:25:15 UTC
commit 89c64c408ef1600338941efefd8deaaefbe96a7a

State file is now checked after original checks are indeterminate.

Comment 3 Johnny Liu 2012-03-15 08:10:09 UTC
Verified this bug with devenv_1662, and PASS.