Bug 1004687

Summary: Met "undefined method `json_create'" error when trying to restore frontend config with oo-devel-node frontend-restore
Product: OpenShift Online Reporter: Meng Bo <bmeng>
Component: ContainersAssignee: Michal Fojtik <mfojtik>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: mfojtik
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: 2013-09-19 16:49:20 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:

Description Meng Bo 2013-09-05 08:48:39 UTC
Description of problem:
When trying to restore frontend configs from a backed-up file, will meet the following error.

# oo-devel-node frontend-restore -c 5228233ae7da5b3f020003e7 --file back.json 
undefined method `json_create' for #<OpenShift::Runtime::FrontendHttpServer:0x00000001b72ce8>


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

How reproducible:
always

Steps to Reproduce:
1.Create app
2.Backup the app frontend config to file
# oo-devel-node frontend-backup -c 5228233ae7da5b3f020003e7 > back.json
3.Try to restore the config 
# oo-devel-node frontend-restore -c 5228233ae7da5b3f020003e7 --file back.json 

Actual results:
Will meet error: 
undefined method `json_create' for #<OpenShift::Runtime::FrontendHttpServer:0x00000001b72ce8>

Expected results:
Should restore without errors.

Additional info:
Try this on devenv-stage_461, the oo-frontend-restore did not need a container uuid which is required in new command.

And I think it is better to support backup to file for the frontend-backup option.

Comment 1 Michal Fojtik 2013-09-10 08:20:46 UTC
Pull request here:

https://github.com/openshift/origin-server/pull/3594

Comment 2 openshift-github-bot 2013-09-10 13:28:06 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/b44b614f1cdcad8e709a8f8dc450d945d0401a51
Bug 1004687 - Fix 'undefined method json_create' in frontend-restore

Comment 3 Meng Bo 2013-09-11 03:19:10 UTC
Checked on devenv_3770,

Issue has been fixed, frontend config can be restored.