Bug 1728195 - Adding openshift_node_local_quota_per_fsgroup parameter creates incorrect node config
Summary: Adding openshift_node_local_quota_per_fsgroup parameter creates incorrect nod...
Keywords:
Status: CLOSED DUPLICATE of bug 1727140
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.11.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: 3.11.z
Assignee: Patrick Dillon
QA Contact: Johnny Liu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-09 09:57 UTC by Suresh
Modified: 2019-07-30 01:43 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-07-30 01:43:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Suresh 2019-07-09 09:57:35 UTC
Description of problem:

Setting "openshift_node_local_quota_per_fsgroup=40960Mi" creates incorrect node config. Because of this, atomic-openshift-node service keeps on restarting every 3 minutes.

The problem is the node template and the volume template as put together in one configmap. 

- name: create node-config.yaml and volume-config.yaml configmap
  oc_configmap:
    name: "{{ l_openshift_node_group_name }}"
    namespace: "{{ openshift_node_group_namespace }}"
    from_file:
      node-config.yaml: "{{ mktempout.stdout }}/node-config.yaml"
      volume-config.yaml: "{{ mktempout.stdout }}/volume-config.yaml"
  when:
  - openshift_node_local_quota_per_fsgroup is defined and openshift_node_local_quota_per_fsgroup != ""
  run_once: true

The parameter "openshift_node_local_quota_per_fsgroup" is set to null by default.

      https://github.com/openshift/openshift-ansible/blob/release-3.11/roles/openshift_node/defaults/main.yml#L8

The volume config template is created here:

      https://github.com/openshift/openshift-ansible/blob/release-3.11/roles/openshift_node_group/tasks/create_config.yml#L45-L54

The node-config which is generated from the template will add the below details:

volumeConfig:
  localQuota:
    perFSGroup: null
volumeDirectory: {{ openshift_node_group_node_data_dir }}/openshift.local.volumes
{% if (openshift_node_group_cloud_provider | default('', true) == 'azure') and
      (openshift_kubelet_name_override | default('', true) != '') and
(not openshift_node_group_configmap | default(false) | bool) %}

This is the relevant snip from the node-config-compute configmap:

<snip>

    volumeConfig:
      localQuota:
        perFSGroup:
    volumeDirectory: /var/lib/origin/openshift.local.volumes
  volume-config.yaml: |
    apiVersion: kubelet.config.openshift.io/v1
    kind: VolumeConfig
    localQuota:
      perFSGroup: 40960Mi
kind: ConfigMap

</snip>

Version-Release number of the following components:
rpm -q openshift-ansible
openshift-ansible-3.11.123-1.git.0.db681ba.el7.noarch

rpm -q ansible
ansible-2.6.17-1.el7ae.noarch

ansible --version
ansible 2.6.17
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /bin/ansible
  python version = 2.7.5 (default, Jun 11 2019, 12:19:05) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]


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