Bug 1012812

Summary: The config files under haproxy/conf can be deleted by user and cause the app cannot be started anymore
Product: OpenShift Online Reporter: Meng Bo <bmeng>
Component: ContainersAssignee: Jhon Honce <jhonce>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: jhonce, mpatel
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-10-17 13:32:24 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-27 08:02:55 UTC
Description of problem:
Create scalable app and ssh login to the app, check the config files under haproxy/conf, all the files can be deleted by user.

After delete those files, the app will be broken and cannot be started.

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

How reproducible:
always

Steps to Reproduce:
1.Create scalable app
2.SSH login to the app
3.Delete all the files under haproxy/conf/ dir
4.Restart or git push the app

Actual results:
The app cannot be started anymore.

Starting gear...
cut: /var/lib/openshift/524533b847b357775100003e/haproxy//conf/gear-registry.db: No such file or directory
An error occurred executing 'gear start' (exit code: 1)
Error message: Failed to execute: 'control start' for /var/lib/openshift/524533b847b357775100003e/haproxy

For more details about the problem, try running the command again with the '--trace' option.


Expected results:
The files should not be able to deleted by user.

Additional info:
[php1s-bmengdev.dev.rhcloud.com conf]\> ls -l
total 4
-rw-r--r--. 1 524533b847b357775100003e 524533b847b357775100003e    0 Sep 27 03:29 gear-registry.db
-rw-r--r--. 1 524533b847b357775100003e 524533b847b357775100003e    0 Sep 27 03:29 gear-registry.db.lock
-rw-r--r--. 1 524533b847b357775100003e 524533b847b357775100003e 2335 Sep 27 03:29 haproxy.cfg
-rw-r--r--. 1 524533b847b357775100003e 524533b847b357775100003e    0 Sep 27 03:29 haproxy.cfg.lock

Comment 1 Jhon Honce 2013-09-27 19:47:32 UTC
Cartridge now presents a meaningful error if these configuration files are missing.  The gear needs to be able to update them so they cannot be locked.

Comment 2 openshift-github-bot 2013-09-27 21:39:08 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/50d54243d556cf8067cc2a320a176fa110f28b13
Bug 1012812 - Report error if configuration files are missing

Comment 3 Meng Bo 2013-09-30 02:36:16 UTC
[bmeng@localhost devtest]$ rhc app restart php1s
HAProxy required configuration file "gear-registry.db" not found.

According to comment#1, the meaningful error message added to the client output.

Move bug to verified.