Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1108254 - Can not update user variables if reach user variables maximum value.
Can not update user variables if reach user variables maximum value.
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Containers (Show other bugs)
2.1.0
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Brenton Leanhardt
libra bugs
:
Depends On: 1073725
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-11 11:31 EDT by Johnny Liu
Modified: 2016-03-02 16:11 EST (History)
10 users (show)

See Also:
Fixed In Version: rubygem-openshift-origin-node-1.32.3.1-1
Doc Type: Bug Fix
Doc Text:
Due to a bug in the node runtime, if a user hit the maximum number of environment variables set, they would no longer be able to update the variables. This bug fix improves error handling, and users can now update environment variables in this scenario. After applying this update, the ruby193-mcollective service must be restarted.
Story Points: ---
Clone Of: 1073725
: 1266239 (view as bug list)
Environment:
Last Closed: 2014-12-10 08:24:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1979 normal SHIPPED_LIVE Red Hat OpenShift Enterprise 2.2.2 bug fix and enhancement update 2014-12-10 13:23:46 EST

  None (edit)
Description Johnny Liu 2014-06-11 11:31:04 EDT
+++ 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
Comment 2 Zamir SUN 2014-09-15 11:37:26 EDT
Upstream pull request:
https://github.com/openshift/origin-server/pull/5813
Comment 3 Luke Meyer 2014-09-16 09:55:02 EDT
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.
Comment 6 Yanping Zhang 2014-11-25 02:39:43 EST
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-->
Comment 8 errata-xmlrpc 2014-12-10 08:24:20 EST
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

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