Bug 1125026 - [RFE] OpenShift Should provide a way to do file integrity checks for configuration files.
Summary: [RFE] OpenShift Should provide a way to do file integrity checks for configur...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: RFE
Version: 2.1.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Mike Barrett
QA Contact:
URL:
Whiteboard:
Depends On: 1078787
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-30 21:57 UTC by Eric Rich
Modified: 2016-01-27 19:13 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-01-27 19:13:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Eric Rich 2014-07-30 21:57:39 UTC
Description of problem:

As a JBoss developer / admin I use jboss-cli to edit my configuration file (either directly on the gear with ssh or using rhc port-forwarding). When I do this the configuration file differs from that of what I have in my git repository.

Subsequent check-ins cause git to overwrite my configuration file. 

How reproducible: Very

Steps to Reproduce:
1. us jboss cli to edit the log level (follow https://access.redhat.com/solutions/240123) 
2. commit a change to your git repository. 

Actual results:

standalone.xml is revert to the prior configuration

Expected results:

standalone.xml should be merged, or a developer should get a notification. 

Additional info:

Thought on implementation: 

1: Improve git hook handling of file mismatch like this, and force a merge.
2: Provide an add-on monitoring cartridge that can tell or inform gear owner what needs to be changed or merged with there git repo. 
3: Watch man script to complete same function as 2

The following is a way to check a file's integrity and if it differs from what git has, provide a patch to resolve the difference. 

FILE_PATH=setup.py; if [[ "$(sha1sum $OPENSHIFT_DEPLOYMENTS_DIR/current/repo/$FILE_PATH | awk '{print $1}')" != "$(git show HEAD:$FILE_PATH | sha1sum | awk '{print $1}')" ]]; then diff -u <(cat $OPENSHIFT_DEPLOYMENTS_DIR/current/repo/$FILE_PATH) <(git show HEAD:$FILE_PATH);

Comment 2 Brenton Leanhardt 2014-08-01 19:24:33 UTC
Just fyi, if the DISABLE_OPENSHIFT_MANAGED_SERVER_CONFIG environment variable is set then the standalone.xml won't be overwritten at deployment time.  It's useful in cases where either manual editing is performed or when jboss-cli.sh is used.

Comment 5 Aleksandar Kostadinov 2014-08-01 20:10:03 UTC
Would be nice if you provide your input on bug 1108939


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