Bug 1265423 - .gitconfig is not configurable for application create
Summary: .gitconfig is not configurable for application create
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Timothy Williams
QA Contact: Chao Yang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-22 22:00 UTC by Eric Rich
Modified: 2019-10-10 10:13 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Allows for .gitconfig of gears to be configurable by an admin on the system, through the use of skeleton files. Reason: This is needed to allow for an existing Git repository with a large amount of data to be more easily used in OpenShift. Without this change, some Git repositories could not be imported into OpenShift using --from-code, due to their size or memory consumption during the clone process. Result: This enhancement allows for an administrator to use concepts in https://access.redhat.com/solutions/535653 configuration as defined by https://access.redhat.com/solutions/693593. It should be noted that when setting up a custom .gitconfig that: 1) The .gitconfig file can now be overwritten by a .gitconfig file provided in the user's git repository 2) The user-provided .gitconfig "should" contain the following options to ensure the Git repository can be cloned when the gear is close to its memory limits: [gc] auto=100 [pack] windowMemory = 10m packSizeLimit = 20m
Clone Of:
Environment:
Last Closed: 2016-03-22 16:51:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:0489 0 normal SHIPPED_LIVE Important: Red Hat OpenShift Enterprise 2.2.9 security, bug fix, and enhancement update 2016-03-22 20:49:04 UTC

Description Eric Rich 2015-09-22 22:00:45 UTC
Description of problem:

The git configuration for an application's initial creation is hard coded. See code below: 

Version-Release number of selected component (if applicable): 2.2.6
How reproducible: 100% 

Steps to Reproduce:

1. set up .gitconfig in /etc/openshift/skel with a custom .gitconfig

Actual results:

Configuration is always: 

https://github.com/openshift/origin-server/blob/master/node/lib/openshift-origin-node/model/application_repository.rb#L361-L369

Expected results:

Provided skeleton configuration should be the configuration that is put in place. 

Additional info:
https://github.com/openshift/origin-server/blob/master/node/lib/openshift-origin-node/model/application_repository.rb#L361-L369
    # rpm -qf /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.36.2.2/lib/openshift-origin-node/model/application_repository.rb
    rubygem-openshift-origin-node-1.36.2.2-1.el6op.noarch

    # rpm -qc rubygem-openshift-origin-node-1.36.2.2-1.el6op.noarch
    /etc/cron.d/1minutely
    /etc/logrotate.d/rubygem-openshift-origin-node
    /etc/openshift/env/OPENSHIFT_BROKER_HOST
    /etc/openshift/env/OPENSHIFT_CARTRIDGE_SDK_BASH
    /etc/openshift/env/OPENSHIFT_CARTRIDGE_SDK_RUBY
    /etc/openshift/env/OPENSHIFT_CLOUD_DOMAIN
    /etc/openshift/env/OPENSHIFT_UMASK
    /etc/openshift/env/PATH
    /etc/openshift/iptables.filter.rules
    /etc/openshift/iptables.nat.rules
    /etc/openshift/logshifter.conf
    /etc/openshift/node.conf
    /etc/openshift/resource_limits.conf
    /etc/openshift/resource_limits.conf.README
    /etc/openshift/resource_limits.conf.large.m3.xlarge
    /etc/openshift/resource_limits.conf.medium.m3.xlarge
    /etc/openshift/resource_limits.conf.small.m3.xlarge
    /etc/openshift/resource_limits.conf.xpaas.m3.xlarge
    /etc/openshift/system-config-firewall-compat
    /usr/lib/openshift/node/jobs/1minutely

Comment 7 Miciah Dashiel Butler Masters 2016-01-11 20:13:06 UTC
Eric, to clarify, is it possible to use a custom .gitconfig under /etc/openshift/skel/ as described in the original description for this Bugzilla report, or does your change *only* enable the user or administrator to provide a custom .gitconfig by putting it in the Git repository specified by the user or configured by the administrator?

We need to clone this Bugzilla report to track the required modifications to the documentation, but first I want to clarify that point.  Thanks!

Comment 8 Eric Rich 2016-01-11 20:46:03 UTC
Miciah, 

This change simply allows for an "administrator" to set a "default" for a gear using a skeleton file. If a default is not specified then the system will use the hard coded values. 

- in the case of the customer asking for this to be change the hard coded values were not what were needed to use "--from-code" to launch an application.

Comment 9 Rory Thrasher 2016-02-22 22:39:35 UTC
QE,

Please verify that a custom .gitconfig file, if provided, will be used instead of the default .gitconfig file.

1. Set up .gitconfig in /etc/openshift/USER with a custom .gitconfig.  It should contain the [gc] and [pack] sections as outlined in comment #4.

2. The values from this custom .gitconfig should be used instead of the default .gitconfig.



Puddle: http://etherpad.corp.redhat.com/puddle-2-2-2016-02-19

Thank you

Comment 10 Johnny Liu 2016-02-29 08:12:45 UTC
Verified this bug with OpenShiftEnterpriseErrata/2.2/2016-02-25.2 puddle, and PASS.

# cat /etc/openshift/skel/.gitconfig 
[user]
  name = 111
[gc]
  auto = 100
[pack]
  windowMemory = 10m
  packSizeLimit = 20m


Create an app, then log into it to check its gitconfig.

[perlapp-jialiu.ose22-auto.com.cn jialiu-perlapp-1]\> cat .gitconfig 


[user]
  name = 111
[gc]
  auto = 100
[pack]
  windowMemory = 10m
  packSizeLimit = 20m



User's customized .gitconfig take effect.

Comment 12 errata-xmlrpc 2016-03-22 16:51:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2016-0489.html


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