config/sysinv/sysinv/sysinv/sysinv/puppet
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
..
__init__.py Open vSwitch integration with host and configuration framework 2018-06-14 16:03:52 -05:00
aodh.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
barbican.py Store BMC password in Openstack Barbican instead of keyring. 2019-02-12 10:12:54 -05:00
base.py Container pinning on worker nodes and All-in-one servers 2019-04-11 01:39:44 -04:00
ceilometer.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
ceph.py Remove swift endpoints from baremetal 2019-04-08 15:09:33 -05:00
cinder.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
common.py CEPH: Adding OSD storage devices no longer need nodes to be locked 2019-03-11 10:34:18 +02:00
dcmanager.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
dcorch.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
device.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
dockerdistribution.py Docker Registry Keystone Authentication 2019-03-07 12:55:59 -05:00
fm.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
glance.py Enable python3.5 sysinv unit test 2019-01-30 08:51:07 +08:00
gnocchi.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
heat.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
horizon.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
interface.py Update nova helm overrides for PCI alias, passthrough, and SR-IOV 2019-02-13 14:00:51 -05:00
inventory.py Add Barbican bootstrap and runtime manifests 2019-01-11 13:33:00 -05:00
ironic.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
keystone.py Enable python3.5 sysinv unit test 2019-01-30 08:51:07 +08:00
kubernetes.py Container pinning on worker nodes and All-in-one servers 2019-04-11 01:39:44 -04:00
ldap.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
magnum.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
mtce.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
murano.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
networking.py Fix mtu configuration for dns and nfs 2019-02-01 09:54:44 -05:00
neutron.py Create DataNetworks modelling in System Configuration 2019-01-22 17:43:45 -05:00
nfv.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
nova.py Remove unused puppet modules 2019-03-20 08:03:07 -05:00
openstack.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
ovs.py Create DataNetworks modelling in System Configuration 2019-01-22 17:43:45 -05:00
panko.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
patching.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
platform.py Container pinning on worker nodes and All-in-one servers 2019-04-11 01:39:44 -04:00
puppet.py Store puppet config in context 2018-12-18 10:45:13 -05:00
service_parameter.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
smapi.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00
storage.py Create docker-lv in the automatically created ctgs-vg volume group 2019-01-07 20:03:07 -05:00
swift.py Fix: "import" issue for Python 2/3 compatible code 2018-12-25 08:58:03 +08:00