StarlingX System Configuration Management
Go to file
Jim Gauld 209e346ab4 Container pinning on worker nodes and All-in-one servers
This story will pin the infrastructure and openstack pods to the
platform cores for worker nodes and All-in-one servers.

This configures systemd system.conf parameter
CPUAffinity=<platform_cpus> by generating
/etc/systemd/system.conf.d/platform-cpuaffinity.conf .
All services launch tasks with the appropriate cpu affinity.

This creates the cgroup called 'k8s-infra' for the following subset
of controllers ('cpuacct', 'cpuset', 'cpu', 'memory', 'systemd').
This configures custom cpuset.cpus (i.e., cpuset) and cpuset.mems
(i.e., nodeset) based on sysinv platform configurable cores. This is
generated by puppet using sysinv host cpu information and is stored
to the hieradata variables:
- platform::kubernetes::params::k8s_cpuset
- platform::kubernetes::params::k8s_nodeset

This creates the cgroup called 'machine.slice' for the controller
'cpuset' and sets cpuset.cpus and cpuset.mems to the parent values.
This prevents VMs from inheriting those settings from libvirt.

Note: systemd automatically mounts cgroups and all available
resource controllers, so the new puppet code does not need to do
that.

Kubelet is now launched with --cgroup-root /k8s-infra by configuring
kubeadm.yaml with the option: cgroupRoot: "/k8s-infra" .

For openstack based worker nodes including AIO
(i.e., host-label openstack-compute-node=enabled):
- the k8s cpuset and nodeset include the assigned platform cores

For non-openstack based worker nodes including AIO:
- the k8s cpuset and nodeset include all cpus except the assigned
  platform cores. This will be refined in a later update since
  we need isolate cpusets of k8s infrastructure from other pods.

The cpuset topology can be viewed with the following:
 sudo systemd-cgls cpuset

The task cpu affinity can be verified with the following:
 ps-sched.sh

The dynamic affining of platform tasks during start-up is disabled,
that code requires cleanup, and likely no longer required
since we are using systemd CPUAffinity and cgroups.

This includes a few small fixes to enable testing of this feature:
- facter platform_res_mem was updated to not require 'memtop', since
  that depends on existance of numa nodes. This was failing on QEMU
  environment when the host does not have Numa nodes. This occurs
  when there is no CPU topology specified.
- cpumap_functions.sh updated parameter defaults so that calling
  bash scripts may enable 'set -u' undefined variable checking.
- the generation of platform_cpu_list did not have all threads.
- the cpulist-to-ranges inline code was incorrect; in certain
  senarios the rstrip(',') would take out the wrong commas.

Story: 2004762
Task: 28879

Change-Id: I6fd21bac59fc2d408132905b88710da48aa8d928
Signed-off-by: Jim Gauld <james.gauld@windriver.com>
2019-04-11 01:39:44 -04:00
api-ref/source REST API doc update for system certificate 2019-04-02 10:44:33 -04:00
config-gate Add notices on Intel authored files. 2019-03-20 10:03:44 -06:00
controllerconfig Remove wrs-configutilities SDK Module 2019-04-02 11:50:23 -04:00
devstack Remove wrs-configutilities SDK Module 2019-04-02 11:50:23 -04:00
doc Clean up and standardize landing pages 2018-12-27 16:49:27 -08:00
kubernetes Merge "Further increase tolerance for declaring neutron agents down" 2019-04-10 20:02:47 +00:00
playbooks/tox-puppet-lint Replace openstack.org git:// URLs with https:// 2019-03-24 20:36:10 +00:00
puppet-manifests Container pinning on worker nodes and All-in-one servers 2019-04-11 01:39:44 -04:00
puppet-modules-wrs Add notices on Intel authored files. 2019-03-20 10:03:44 -06:00
releasenotes Update config for release notes to include project name 2019-02-05 14:03:49 -08:00
storageconfig Add notices on Intel authored files. 2019-03-20 10:03:44 -06:00
sysinv Container pinning on worker nodes and All-in-one servers 2019-04-11 01:39:44 -04:00
tmp/patch-scripts/EXAMPLE_SYSINV/scripts StarlingX open source release updates 2018-05-31 07:35:52 -07:00
worker-utils Container pinning on worker nodes and All-in-one servers 2019-04-11 01:39:44 -04:00
workerconfig Docker Registry Keystone Authentication 2019-03-07 12:55:59 -05:00
.gitignore Fixing up tox -e cover for stx-config 2018-12-20 08:53:15 -06:00
.gitreview Set .gitreview back to use review.openstack.org 2018-09-04 21:12:34 +00:00
.yamllint clear yamllint errors under stx-config 2018-09-12 21:11:57 +08:00
.zuul.yaml Remove wrs-configutilities SDK Module 2019-04-02 11:50:23 -04:00
CONTRIBUTORS.wrs StarlingX open source release updates 2018-05-31 07:35:52 -07:00
LICENSE StarlingX open source release updates 2018-05-31 07:35:52 -07:00
README.rst StarlingX open source release updates 2018-05-31 07:35:52 -07:00
centos_helm.inc Add stx-openstack-helm to the containers build 2018-11-14 11:55:29 -05:00
centos_iso_image.inc Remove wrs-configutilities SDK Module 2019-04-02 11:50:23 -04:00
centos_pkg_dirs Remove wrs-configutilities SDK Module 2019-04-02 11:50:23 -04:00
centos_pkg_dirs_containers Add stx-openstack-helm to the containers build 2018-11-14 11:55:29 -05:00
centos_stable_wheels.inc Remove wrs-configutilities SDK Module 2019-04-02 11:50:23 -04:00
test-requirements.txt Properly enable hacking checks for flake8 2018-12-18 11:28:56 -06:00
tox.ini Add puppet-lint support 2018-12-24 13:50:20 -06:00

README.rst

stx-config

StarlingX Configuration Management