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
Reproduced on devenv_4936. Still met the error: User Variables maximum of 50 exceeded when update existing user variable values after setting 50 user variables. Any plan to fix this?
+1. This is a really annoying problem and seems like an artificial restriction with little benefit.
Thanks for the clear clear bug analysis. PR: https://github.com/openshift/origin-server/pull/5813
Check on devenv_5281, the code is not merged, wait for the next verion.
check on devene_5286 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 -a perlapp In the step 3, update the value successfully.