Bug 1012812 - The config files under haproxy/conf can be deleted by user and cause the app cannot be started anymore
Summary: The config files under haproxy/conf can be deleted by user and cause the app ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-27 08:02 UTC by Meng Bo
Modified: 2015-05-14 23:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-17 13:32:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.