Bug 949543

Summary: resource_limits.template should be replaced as resource_limits.conf and mark it as config file in rpm spec file.
Product: OKD Reporter: Brenton Leanhardt <bleanhar>
Component: ContainersAssignee: Luke Meyer <lmeyer>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: bmeng, jialiu, libra-onpremise-devel, lmeyer, wsun
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 949260 Environment:
Last Closed: 2013-04-20 03:37:42 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:
Bug Depends On:    
Bug Blocks: 949260    

Description Brenton Leanhardt 2013-04-08 12:41:50 UTC
+++ This bug was initially created as a clone of Bug #949260 +++

Description of problem:
According to rubygem-openshift-origin-node.spec,
<--snip-->
# copy this file only if it doesn't already exist
if ! [ -f /etc/openshift/resource_limits.conf ]; then
  cp -f /etc/openshift/resource_limits.template /etc/openshift/resource_limits.conf
fi
<--snip-->

Refer to BZ#949072, once resource_limits.template is updated in latest package, yum update will not update resource_limits.conf itself. 
And resource_limits.template is not necessary to exist, maybe this file could be renamed to resource_limits.conf, and mark this file as a config file in spec file, so when yum update and run oo-diagnostic, could notice user some conf file has been updated.

Version-Release number of selected component (if applicable):
rubygem-openshift-origin-node-1.0.13-1.el6op.noarch

How reproducible:
Always

Steps to Reproduce:
1.Install a old rubygem-openshift-origin-node on a fresh system, resource_limits.conf is copied there.
2.Update a new rubygem-openshift-origin-node package, e.g: some values in resource_limits.template are updated.
3. 
  
Actual results:
resource_limits.conf is not updated, user can not notice some update already happened.

Expected results:
No resource_limits.template is installed, only resource_limits.conf is installed, once update happened, either of two choice could be met:
1. new conf file is applied, old conf file is saved to .rpmsave
2. old conf file is still used, new conf file is saved to .rpmnew
Then run oo-dignostic will warn user resource_limits config file is changed, need user to check update and merge them.

Additional info:

--- Additional comment from RHEL Product and Program Management on 2013-04-07 06:24:53 EDT ---

Since this issue was entered in bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 1 openshift-github-bot 2013-04-09 22:52:46 UTC
Commits pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/74be242b19b4531c8a4f9712aa4a2e1fa399a9f6
<node spec> bug 949543 use resource_limits.template directly as .conf in RPM

https://bugzilla.redhat.com/show_bug.cgi?id=949543
(Origin clone of Enterprise https://bugzilla.redhat.com/show_bug.cgi?id=949260)
This change causes the node RPM to own the resource_limits.conf file so that
when it changes, users will at least get a .rpmnew file to show that they
might want to look at updating their resource_limits.conf file to incorporate
the changes.

https://github.com/openshift/origin-server/commit/e47f3b6e4456566f1e4c0e633a2606c9f74f0a25
Merge pull request #1978 from sosiouxme/bz949543

<node spec> bug 949543 use resource_limits.template directly as .conf in...

Comment 3 Meng Bo 2013-04-11 07:06:54 UTC
Checked this issue with package rubygem-openshift-origin-node.noarch 0:1.7.22-1.el6oso

1. Launch old_instance
2. Run rpm -qc rubygem-openshift-origin-node.noarch
There is no resource_limits listed.
3. Remove the sym link resource_limits.conf
4. Copy the resouce_limits.conf.medium to resource_limits.conf
5. Update packages to latest
6. After upgrade 
  resource_limits.conf.rpmnew exist under /etc/openshift/
  resource_limits.conf can be listed by rpm -qc rubygem-openshift-origin-node.noarch

Move bug to verified.