+++ This bug was initially created as a clone of Bug #1073725 +++ Description of problem: Can not update user variables if user have setted maximum user variables Version-Release number of selected component (if applicable): devenv-stage_734 How reproducible: always Steps to Reproduce: 1.create a app with perl cartridge #rhc app create perlapp perl 2.set env to a app with 50 variables #for i in `seq 1 50`;do rhc env set NAME$i=NAME$i -a perlapp --confirm ;done 3.update a variable #rhc env set NAME1=Name Actual results: Setting environment variable(s) ... User Variables maximum of 50 exceeded Expected results: update successfully Additional info: # vim /opt/rh/ruby193/root/usr/share/gems/gems/openshift-origin-node-1.21.5/lib/openshift-origin-node/model/application_container_ext/environment.rb <--snip--> def user_var_add(variables, gears = []) directory = PathUtils.join(@container_dir, '.env', 'user_vars') FileUtils.mkpath(directory) unless File.directory?(directory) if (Dir.entries(directory).size - 2 + variables.size) > USER_VARIABLE_MAX_COUNT return 255, "CLIENT_ERROR: User Variables maximum of #{USER_VARIABLE_MAX_COUNT} exceeded\n" end
Upstream pull request: https://github.com/openshift/origin-server/pull/5813
If accepted upstream soon, the change should automatically make it into OSE 2.2. It does not appear urgent enough to cherry-pick to 2.1.
Verified on http://etherpad.corp.redhat.com/puddle-2-2-2014-11-24 Steps to verify: 1.Create app with php cartridge. #rhc app create php1 php-5.4 2.Set 50 env variables for php1 # for i in `seq 1 50`;do rhc env set VAR$i=v$i -a php1 --confirm;done 3.Update one env variable of php1. # rhc env set VAR1=test -a php1 4.Check env variables of php1. Actual results: 3.# rhc env set VAR1=test -a php1 Setting environment variable(s) ... done 4.Env VAR1 was updated succesfully # rhc env list -a php1 VAR1=test VAR10=v10 VAR11=v11 VAR12=v12 VAR13=v13 VAR14=v14 VAR15=v15 VAR16=v16 VAR17=v17 VAR18=v18 VAR19=v19 <--snip-->
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/RHBA-2014-1979.html