Bug 1293397 - Allow for ansible to set garbage_collection parameters for a cluster.
Summary: Allow for ansible to set garbage_collection parameters for a cluster.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Andrew Butcher
QA Contact: Ma xiaoqiang
URL:
Whiteboard:
Depends On:
Blocks: 1293413 1299023
TreeView+ depends on / blocked
 
Reported: 2015-12-21 16:46 UTC by Eric Rich
Modified: 2016-08-01 13:29 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1293413 (view as bug list)
Environment:
Last Closed: 2016-01-27 19:43:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0075 0 normal SHIPPED_LIVE Red Hat OpenShift Enterprise atomic-openshift-utils bug fix update 2016-01-28 00:42:22 UTC

Description Eric Rich 2015-12-21 16:46:27 UTC
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 17:26:56 UTC
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 18:51:40 UTC
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 14:36:11 UTC
Is there anything else to be done here?

Comment 4 Andrew Butcher 2016-01-04 14:52:56 UTC
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-05 01:59:19 UTC
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
<--snip-->
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
<--snip-->

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 19:43:31 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://access.redhat.com/errata/RHBA-2016:0075


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