Bug 1293397 - Allow for ansible to set garbage_collection parameters for a cluster.
Allow for ansible to set garbage_collection parameters for a cluster.
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
Unspecified Unspecified
unspecified Severity urgent
: ---
: ---
Assigned To: Andrew Butcher
Ma xiaoqiang
Depends On:
Blocks: 1293413 1299023
  Show dependency treegraph
Reported: 2015-12-21 11:46 EST by Eric Rich
Modified: 2016-08-01 09:29 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1293413 (view as bug list)
Last Closed: 2016-01-27 14:43:31 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Eric Rich 2015-12-21 11:46:27 EST
Description of problem:

Customers who need / wish to set up GC (https://docs.openshift.com/enterprise/3.1/admin_guide/garbage_collection.html) for there environment often run into [0] ([1] is one solution to this). 

Because ansible overwrites or alters the configuration (after GC is configured - directly on the hosts) you loose your GC configuration. 

Version-Release number of selected component (if applicable): 3.1

How reproducible: 100% 

Steps to Reproduce:

1. Passing: openshift_node_kubelet_arguments = [{'image-high-gc-threshold': '90'}, {'image-gc-low-threshold': '80'}] 

Actual results:

This does not seem to be parsable to yaml in the installer. 

Expected results:

This should set the GC configuration based on [2] and [3]. 

Additional info:

[0] https://bugzilla.redhat.com/show_bug.cgi?id=1292961
[1] https://github.com/openshift/openshift-ansible/pull/1095
[2] https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_node/templates/node.yaml.v1.j2#L14-L16
[3] https://github.com/openshift/openshift-ansible/blob/master/roles/openshift_node/tasks/main.yml#L26
Comment 1 Andrew Butcher 2015-12-21 12:26:56 EST
Instead of a list, arguments are passed as a dictionary with list values.

openshift_node_kubelet_args={'image-gc-high-threshold': ['90'], 'image-gc-low-threshold': ['80']}
Comment 2 Eric Rich 2015-12-21 13:51:40 EST
Note that 'image-high-gc-threshold' is an invalid argument as it should be 'image-gc-high-threshold' based on http://kubernetes.io/v1.0/docs/admin/kubelet.html
Comment 3 Brenton Leanhardt 2016-01-04 09:36:11 EST
Is there anything else to be done here?
Comment 4 Andrew Butcher 2016-01-04 09:52:56 EST
I've opened https://github.com/openshift/openshift-ansible/pull/1108 to document the argument in openshift-ansible and BZ#1293413 is tracking the docs PR which is https://github.com/openshift/openshift-docs/pull/1372.
Comment 6 Ma xiaoqiang 2016-01-04 20:59:19 EST
1. Install env with the following parameters
openshift_node_kubelet_args: {'max-pods': ['4'], 'image-gc-high-threshold': ['90'], 'image-gc-low-threshold': ['80']}

2. check the node configuration
kind: NodeConfig
kubeletArguments: {"image-gc-low-threshold": ["80"], "image-gc-high-threshold": ["90"], "max-pods": ["4"]}
masterKubeConfig: system:node:openshift-148.lab.sjc.redhat.com.kubeconfig

3. create 5 pods on the env
the fifth pod is pending

4. change the max-pods to 10 and restart the node service
service atomic-openshift-node restart

5. the pending pod become running 

the parameters take effect.
Comment 8 errata-xmlrpc 2016-01-27 14:43:31 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.


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