Merge branch 'master' into f/centos8
Change-Id: I08bda955d1ca9bc802787eb2009bba05e1c06192
This commit is contained in:
commit
da2659f53a
98
.zuul.yaml
98
.zuul.yaml
|
@ -3,9 +3,16 @@
|
|||
check:
|
||||
jobs:
|
||||
- stx-puppet-linters
|
||||
- openstack-tox-pep8
|
||||
- openstack-tox-pylint
|
||||
gate:
|
||||
jobs:
|
||||
- stx-puppet-linters
|
||||
- openstack-tox-pep8
|
||||
- openstack-tox-pylint
|
||||
post:
|
||||
jobs:
|
||||
- stx-stx-puppet-upload-git-mirror
|
||||
|
||||
- job:
|
||||
name: stx-puppet-linters
|
||||
|
@ -14,3 +21,94 @@
|
|||
Run linters for stx-puppet
|
||||
pre-run: playbooks/tox-puppet-lint/pre.yaml
|
||||
|
||||
- job:
|
||||
name: stx-stx-puppet-upload-git-mirror
|
||||
parent: upload-git-mirror
|
||||
description: >
|
||||
Mirrors opendev.org/starlingx/stx-puppet to
|
||||
github.com/starlingx/stx-puppet
|
||||
vars:
|
||||
git_mirror_repository: starlingx/stx-puppet
|
||||
secrets:
|
||||
- name: git_mirror_credentials
|
||||
secret: stx-stx-puppet-github-secret
|
||||
pass-to-parent: true
|
||||
|
||||
- secret:
|
||||
name: stx-stx-puppet-github-secret
|
||||
data:
|
||||
user: git
|
||||
host: github.com
|
||||
# yamllint disable-line rule:line-length
|
||||
host_key: github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6g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N1RRllQY9ost33kROeGkBFNiV9YE1Abvo8MCawk0
|
||||
djkKIQtSSv0rJHDTBKeqjfJc4BEBNxjJXye9rMOcpvFU/qf27nWHe88DAvRHzDTwRYelu
|
||||
Zlau0/yjPH16tjQBfzhLPYcwvboq89my0776jZApfg37QEluOXKreuWuxv7tPkHumiwdg
|
||||
uySOewrHz3+fjObBadt6TH821nekNCKBMNfBAc26X86CtYjLFNvFLR+sH4buB0=
|
||||
- sxeZgc/LoeVmpE7XL20z3/tPH+dOPRBID+GfN1gWdRsX1Ac9Xquvx16/pmGZ2G+YY4Wro
|
||||
hyEOc8coOqviMcuK3y0nywHMZPX0JOUJdutwbnwcIia+RwQrBKkoAwA9u/WPw9nFFrS20
|
||||
p9EusSw3nANpqkGMyn1sTDomunbXIWe93hJCKoWUQjF5oR61dQJxCzWK0fKxVypJ/tX0v
|
||||
Lh8m/jSbgFoFScjlfp/XYhWSLffZ6R49UWY7fqDga7cujPFDzrxOV9D/SqJqnLhDkodq9
|
||||
M2EgAv7bnjfCNnmHa622mmJDeneiONvkqkdUruOrBc7aMflO+Umz6fHH/ZlgmXPFOQl7C
|
||||
8RipvofZhezMvPB2dphvqypYX/IEpTrLmK+oOztv6AQVFD9cKMtRWKzudrt+5Uwb0XohA
|
||||
4UGEO6EdrVGyyxsj81K4P0ysjwv2sxOpgzrxiZZPkoaDUpO+I1ozWbmp2lmZMZfqeoGJH
|
||||
EWvJJHZrch2s1Tp5LlFjfYLchvxIDqGbvxPOo7k1Mzm3f7e8QSFBROBAakRLBzdD5Y+RC
|
||||
Ogf4CYJOGGJbqJhPBbEkndXVz1ph14hdvDcL110DESIbNKY8CDl34NQS12I44S7PCkIUX
|
||||
oNn5qe1ApRGmW3aq4lN8DkIE2/5YlOtg03B2RXK7NaPxke5awMx7QNYwuJn5B8=
|
||||
|
|
|
@ -60,6 +60,9 @@ Requires: puppet-puppi
|
|||
Requires: puppet-vlan
|
||||
Requires: puppet-collectd
|
||||
|
||||
# python scripts
|
||||
Requires: python2-ruamel-yaml
|
||||
|
||||
%description
|
||||
Platform puppet configuration files and manifests
|
||||
|
||||
|
|
|
@ -375,7 +375,7 @@ $SERVER["socket"] == "[::]:<%= @https_port %>" {
|
|||
# (i.e. mgmt or pxeboot networks)
|
||||
include "/etc/lighttpd/lighttpd-inc.conf"
|
||||
$HTTP["remoteip"] != "127.0.0.1" {
|
||||
$HTTP["url"] =~ "^/(rel-[^/]*|feed|updates)/" {
|
||||
$HTTP["url"] =~ "^/(rel-[^/]*|feed|updates|iso)/" {
|
||||
dir-listing.activate = "enable"
|
||||
}
|
||||
$HTTP["remoteip"] != var.management_ip_network {
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
#
|
||||
# Copyright (c) 2020 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# This script edits a file containing a kubernetes cluster configmap.
|
||||
# It currently adds/removes certain kube-apiserver startup parameters.
|
||||
# If the script is run without a particular kube-apiserver parameter
|
||||
# passed in as an argument, the existing kube-apiserver parameter will
|
||||
# be removed.
|
||||
|
||||
import argparse
|
||||
import ruamel.yaml as yaml
|
||||
|
||||
configmap_file = '/tmp/cluster_configmap.yaml'
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--configmap_file")
|
||||
parser.add_argument("--oidc_issuer_url")
|
||||
parser.add_argument("--oidc_client_id")
|
||||
parser.add_argument("--oidc_username_claim")
|
||||
parser.add_argument("--oidc_groups_claim")
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.configmap_file:
|
||||
configmap_file = args.configmap_file
|
||||
|
||||
with open(configmap_file, 'r') as dest:
|
||||
configmap = yaml.load(dest, Loader=yaml.RoundTripLoader)
|
||||
# cluster config is a single string, so we need to parse the string
|
||||
# in order to modify it correctly
|
||||
cluster_config = yaml.load(configmap['data']['ClusterConfiguration'],
|
||||
Loader=yaml.RoundTripLoader)
|
||||
|
||||
if args.oidc_issuer_url:
|
||||
cluster_config['apiServer']['extraArgs']['oidc-issuer-url'] = \
|
||||
args.oidc_issuer_url
|
||||
else:
|
||||
if 'oidc-issuer-url' in cluster_config['apiServer']['extraArgs']:
|
||||
del cluster_config['apiServer']['extraArgs']['oidc-issuer-url']
|
||||
|
||||
if args.oidc_client_id:
|
||||
cluster_config['apiServer']['extraArgs']['oidc-client-id'] = \
|
||||
args.oidc_client_id
|
||||
else:
|
||||
if 'oidc-client-id' in cluster_config['apiServer']['extraArgs']:
|
||||
del cluster_config['apiServer']['extraArgs']['oidc-client-id']
|
||||
|
||||
if args.oidc_username_claim:
|
||||
cluster_config['apiServer']['extraArgs']['oidc-username-claim'] = \
|
||||
args.oidc_username_claim
|
||||
else:
|
||||
if 'oidc-username-claim' in cluster_config['apiServer']['extraArgs']:
|
||||
del cluster_config['apiServer']['extraArgs']['oidc-username-claim']
|
||||
|
||||
if args.oidc_groups_claim:
|
||||
cluster_config['apiServer']['extraArgs']['oidc-groups-claim'] = \
|
||||
args.oidc_groups_claim
|
||||
else:
|
||||
if 'oidc-groups-claim' in cluster_config['apiServer']['extraArgs']:
|
||||
del cluster_config['apiServer']['extraArgs']['oidc-groups-claim']
|
||||
|
||||
cluster_config_string = yaml.dump(cluster_config, Dumper=yaml.RoundTripDumper,
|
||||
default_flow_style=False)
|
||||
# use yaml.scalarstring.PreservedScalarString to make sure the yaml is
|
||||
# constructed with proper formatting and tabbing
|
||||
cluster_config_string = yaml.scalarstring.PreservedScalarString(
|
||||
cluster_config_string)
|
||||
configmap['data']['ClusterConfiguration'] = cluster_config_string
|
||||
with open(configmap_file, 'w') as dest:
|
||||
yaml.dump(configmap, dest, Dumper=yaml.RoundTripDumper,
|
||||
default_flow_style=False)
|
|
@ -181,7 +181,7 @@ class platform::ceph::monitor
|
|||
|
||||
if $service_enabled {
|
||||
if $system_type == 'All-in-one' and 'duplex' in $system_mode {
|
||||
if str2bool($::is_standalone_controller) {
|
||||
if str2bool($::is_controller_active) or str2bool($::is_standalone_controller) {
|
||||
# Ceph mon is configured on a DRBD partition,
|
||||
# when 'ceph' storage backend is added in sysinv.
|
||||
# Then SM takes care of starting ceph after manifests are applied.
|
||||
|
@ -208,7 +208,7 @@ class platform::ceph::monitor
|
|||
ensure => present,
|
||||
volume_group => $::platform::filesystem::params::vg_name,
|
||||
size => "${mon_lv_size_reserved}G",
|
||||
} -> Class['platform::filesystem::docker']
|
||||
}
|
||||
}
|
||||
|
||||
if $configure_ceph_mon {
|
||||
|
@ -232,10 +232,6 @@ class platform::ceph::monitor
|
|||
fs_options => $mon_fs_options,
|
||||
} -> Class['::ceph']
|
||||
|
||||
if $::personality == 'worker' {
|
||||
Platform::Filesystem[$mon_lv_name] -> Class['platform::filesystem::docker']
|
||||
}
|
||||
|
||||
file { '/etc/pmon.d/ceph.conf':
|
||||
ensure => link,
|
||||
target => '/etc/ceph/ceph.conf.pmon',
|
||||
|
@ -552,14 +548,12 @@ class platform::ceph::runtime_base {
|
|||
include ::platform::ceph::monitor
|
||||
include ::platform::ceph
|
||||
|
||||
# Make sure mgr-restful-plugin is running as it is needed by sysinv config
|
||||
# TODO(oponcea): Remove when sm supports in-service config reload
|
||||
if str2bool($::is_controller_active) {
|
||||
Ceph::Mon <| |>
|
||||
-> exec { '/etc/init.d/mgr-restful-plugin start':
|
||||
command => '/etc/init.d/mgr-restful-plugin start',
|
||||
logoutput => true,
|
||||
}
|
||||
$system_mode = $::platform::params::system_mode
|
||||
$system_type = $::platform::params::system_type
|
||||
|
||||
if $system_type == 'All-in-one' and 'duplex' in $system_mode {
|
||||
Drbd::Resource <| |> -> Class[$name]
|
||||
Class[$name] -> Class['::platform::sm::ceph::runtime']
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -384,7 +384,8 @@ class platform::drbd::cephmon ()
|
|||
$system_mode = $::platform::params::system_mode
|
||||
$system_type = $::platform::params::system_type
|
||||
|
||||
if str2bool($::is_standalone_controller) and ! str2bool($::is_node_ceph_configured) {
|
||||
if ((str2bool($::is_controller_active) or str2bool($::is_standalone_controller))
|
||||
and ! str2bool($::is_node_ceph_configured)) {
|
||||
# Active controller, first time configuration.
|
||||
$drbd_primary = true
|
||||
$drbd_initial = true
|
||||
|
|
|
@ -16,7 +16,12 @@ class platform::kubernetes::params (
|
|||
$k8s_cpu_mgr_policy = 'none',
|
||||
$k8s_topology_mgr_policy = 'best-effort',
|
||||
$k8s_cni_bin_dir = '/usr/libexec/cni',
|
||||
$join_cmd = undef
|
||||
$k8s_vol_plugin_dir = '/usr/libexec/kubernetes/kubelet-plugins/volume/exec/',
|
||||
$join_cmd = undef,
|
||||
$oidc_issuer_url = undef,
|
||||
$oidc_client_id = undef,
|
||||
$oidc_username_claim = undef,
|
||||
$oidc_groups_claim = undef
|
||||
) { }
|
||||
|
||||
class platform::kubernetes::cgroup::params (
|
||||
|
@ -106,6 +111,7 @@ class platform::kubernetes::kubeadm {
|
|||
$k8s_reserved_mem = $::platform::kubernetes::params::k8s_reserved_mem
|
||||
$k8s_isol_cpus = $::platform::kubernetes::params::k8s_isol_cpus
|
||||
$k8s_cni_bin_dir = $::platform::kubernetes::params::k8s_cni_bin_dir
|
||||
$k8s_vol_plugin_dir = $::platform::kubernetes::params::k8s_vol_plugin_dir
|
||||
$k8s_cpu_mgr_policy = $::platform::kubernetes::params::k8s_cpu_mgr_policy
|
||||
$k8s_topology_mgr_policy = $::platform::kubernetes::params::k8s_topology_mgr_policy
|
||||
|
||||
|
@ -216,18 +222,6 @@ class platform::kubernetes::master::init
|
|||
logoutput => true,
|
||||
}
|
||||
|
||||
-> exec { 'create kubeadm.yaml':
|
||||
command => 'kubeadm config view > /etc/kubernetes/kubeadm.yaml',
|
||||
creates => '/etc/kubernetes/kubeadm.yaml'
|
||||
}
|
||||
|
||||
-> file { '/etc/kubernetes/kubeadm.yaml':
|
||||
ensure => file,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0644',
|
||||
}
|
||||
|
||||
# Update ownership/permissions for file created by "kubeadm init".
|
||||
# We want it readable by sysinv and sysadmin.
|
||||
-> file { '/etc/kubernetes/admin.conf':
|
||||
|
@ -615,3 +609,15 @@ class platform::kubernetes::worker::upgrade_kubelet
|
|||
command => '/usr/local/sbin/pmon-restart kubelet'
|
||||
}
|
||||
}
|
||||
|
||||
class platform::kubernetes::master::change_apiserver_parameters
|
||||
inherits ::platform::kubernetes::params {
|
||||
|
||||
$configmap_temp_file = '/tmp/cluster_configmap.yaml'
|
||||
$configview_temp_file = '/tmp/kubeadm_config_view.yaml'
|
||||
|
||||
exec { 'update kube-apiserver params':
|
||||
command => template('platform/kube-apiserver-change-params.erb')
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -170,25 +170,53 @@ class platform::network::routes (
|
|||
}
|
||||
|
||||
|
||||
define platform::interfaces::sriov_config(
|
||||
define platform::interfaces::sriov_enable (
|
||||
$pf_addr,
|
||||
$num_vfs,
|
||||
$vf_addrs,
|
||||
$vf_driver = undef
|
||||
) {
|
||||
if $vf_driver != undef {
|
||||
if $num_vfs {
|
||||
exec { "sriov-enable-device: ${title}":
|
||||
command => template('platform/sriov.enable-device.erb'),
|
||||
logoutput => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
define platform::interfaces::sriov_bind (
|
||||
$pf_addr,
|
||||
$num_vfs,
|
||||
$vf_addrs,
|
||||
$vf_driver = undef
|
||||
) {
|
||||
if ($vf_driver != undef) and length($vf_addrs) > 0 {
|
||||
ensure_resource(kmod::load, $vf_driver)
|
||||
exec { "sriov-vf-bind-device: ${title}":
|
||||
Anchor['platform::networking']
|
||||
-> exec { "sriov-vf-bind-device: ${title}":
|
||||
command => template('platform/sriov.bind-device.erb'),
|
||||
logoutput => true,
|
||||
require => Kmod::Load[$vf_driver],
|
||||
require => [ Kmod::Load[$vf_driver] ],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class platform::interfaces::sriov (
|
||||
$sriov_config = {}
|
||||
$sriov_config = {},
|
||||
$runtime = false
|
||||
) {
|
||||
create_resources('platform::interfaces::sriov_config', $sriov_config, {})
|
||||
if $runtime {
|
||||
create_resources('platform::interfaces::sriov_enable', $sriov_config, {})
|
||||
} else {
|
||||
create_resources('platform::interfaces::sriov_bind', $sriov_config, {})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class platform::interfaces::sriov::runtime {
|
||||
class { 'platform::interfaces::sriov': runtime => true }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -53,12 +53,18 @@ class platform::params (
|
|||
# memory headroom per worker (e.g., buffers, cached)
|
||||
$eng_overhead_mb = 1000
|
||||
|
||||
notice("DEBUG: Platform cpu count obtained from sysinv DB is ${platform_cpu_count}.")
|
||||
|
||||
# number of workers per service
|
||||
if $system_type == 'All-in-one' {
|
||||
if ($system_type != 'All-in-one' or $distributed_cloud_role == 'systemcontroller') {
|
||||
# number of workers we can support based on memory
|
||||
$small_footprint = false
|
||||
$eng_workers_mem = floor($::memorysize_mb) / ($eng_worker_mb + $eng_overhead_mb)
|
||||
$eng_workers = min($eng_max_workers, $eng_workers_mem, max($phys_core_count, 2))
|
||||
$eng_workers_by_2 = min($eng_max_workers, $eng_workers_mem, max($phys_core_count/2, 2))
|
||||
$eng_workers_by_4 = min($eng_max_workers, $eng_workers_mem, max($phys_core_count/4, 2))
|
||||
$eng_workers_by_5 = min($eng_max_workers, $eng_workers_mem, max($phys_core_count/5, 2))
|
||||
$eng_workers_by_6 = min($eng_max_workers, $eng_workers_mem, max($phys_core_count/6, 2))
|
||||
} else {
|
||||
$small_footprint = true
|
||||
|
||||
# Set eng_workers for AIO based on the number of platform cores, not exceeding 2 for
|
||||
# AIO simplex, Xeon-D and virtual box and not exceeding 3 for AIO duplex.
|
||||
# All eng_workers derivatives are set to 1 for AIO.
|
||||
|
@ -76,15 +82,6 @@ class platform::params (
|
|||
$eng_workers_by_4 = $eng_min_workers
|
||||
$eng_workers_by_5 = $eng_min_workers
|
||||
$eng_workers_by_6 = $eng_min_workers
|
||||
} else {
|
||||
# number of workers we can support based on memory
|
||||
$small_footprint = false
|
||||
$eng_workers_mem = floor($::memorysize_mb) / ($eng_worker_mb + $eng_overhead_mb)
|
||||
$eng_workers = min($eng_max_workers, $eng_workers_mem, max($phys_core_count, 2))
|
||||
$eng_workers_by_2 = min($eng_max_workers, $eng_workers_mem, max($phys_core_count/2, 2))
|
||||
$eng_workers_by_4 = min($eng_max_workers, $eng_workers_mem, max($phys_core_count/4, 2))
|
||||
$eng_workers_by_5 = min($eng_max_workers, $eng_workers_mem, max($phys_core_count/5, 2))
|
||||
$eng_workers_by_6 = min($eng_max_workers, $eng_workers_mem, max($phys_core_count/6, 2))
|
||||
}
|
||||
|
||||
$init_database = $controller_upgrade
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
class platform::ptp (
|
||||
$enabled = false,
|
||||
$mode = 'hardware',
|
||||
$transport = 'l2',
|
||||
$mechanism = 'e2e',
|
||||
$ptp4l_options = [],
|
||||
$transport = 'L2',
|
||||
$phc2sys_options = '',
|
||||
$master_devices = [],
|
||||
$slave_devices = []
|
||||
$slave_devices = [],
|
||||
$runtime = false
|
||||
) {
|
||||
if empty($master_devices) {
|
||||
$slave_only = true
|
||||
|
@ -12,15 +13,32 @@ class platform::ptp (
|
|||
$slave_only = false
|
||||
}
|
||||
|
||||
if $enabled {
|
||||
$ensure = 'running'
|
||||
$enable = true
|
||||
} else {
|
||||
$ensure = 'stopped'
|
||||
$enable = false
|
||||
}
|
||||
|
||||
if $runtime {
|
||||
# During runtime we set first_step_threshold to 0. This ensures there are no
|
||||
# large time changes to a running host
|
||||
$phc2sys_cmd_opts = "${phc2sys_options} -F 0"
|
||||
} else {
|
||||
$phc2sys_cmd_opts = $phc2sys_options
|
||||
}
|
||||
|
||||
file { 'ptp4l_config':
|
||||
ensure => file,
|
||||
path => '/etc/ptp4l.conf',
|
||||
mode => '0644',
|
||||
content => template('platform/ptp4l.conf.erb'),
|
||||
notify => [ Service['phc2sys'], Service['ptp4l'] ],
|
||||
}
|
||||
-> file { 'ptp4l_service':
|
||||
ensure => file,
|
||||
path => '/usr/lib/systemd/system/ptp4l.service',
|
||||
path => '/etc/systemd/system/ptp4l.service',
|
||||
mode => '0644',
|
||||
content => template('platform/ptp4l.service.erb'),
|
||||
}
|
||||
|
@ -32,7 +50,7 @@ class platform::ptp (
|
|||
}
|
||||
-> file { 'phc2sys_service':
|
||||
ensure => file,
|
||||
path => '/usr/lib/systemd/system/phc2sys.service',
|
||||
path => '/etc/systemd/system/phc2sys.service',
|
||||
mode => '0644',
|
||||
content => template('platform/phc2sys.service.erb'),
|
||||
}
|
||||
|
@ -41,33 +59,33 @@ class platform::ptp (
|
|||
path => '/etc/sysconfig/phc2sys',
|
||||
mode => '0644',
|
||||
content => template('platform/phc2sys.erb'),
|
||||
notify => Service['phc2sys'],
|
||||
}
|
||||
-> exec { 'systemctl-daemon-reload':
|
||||
command => '/usr/bin/systemctl daemon-reload',
|
||||
command => '/usr/bin/systemctl daemon-reload',
|
||||
}
|
||||
-> service { 'ptp4l':
|
||||
ensure => $ensure,
|
||||
enable => $enable,
|
||||
name => 'ptp4l',
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
}
|
||||
-> service { 'phc2sys':
|
||||
ensure => $ensure,
|
||||
enable => $enable,
|
||||
name => 'phc2sys',
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
}
|
||||
|
||||
if $enabled {
|
||||
exec { 'enable-ptp4l':
|
||||
command => '/usr/bin/systemctl enable ptp4l.service',
|
||||
require => Exec['systemctl-daemon-reload'],
|
||||
require => Service['phc2sys'],
|
||||
}
|
||||
-> exec { 'enable-phc2sys':
|
||||
command => '/usr/bin/systemctl enable phc2sys.service',
|
||||
}
|
||||
-> service { 'ptp4l':
|
||||
ensure => 'running',
|
||||
enable => true,
|
||||
name => 'ptp4l',
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
}
|
||||
-> service { 'phc2sys':
|
||||
ensure => 'running',
|
||||
enable => true,
|
||||
name => 'phc2sys',
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
}
|
||||
} else {
|
||||
exec { 'disable-ptp4l':
|
||||
command => '/usr/bin/systemctl disable ptp4l.service',
|
||||
|
@ -76,7 +94,7 @@ class platform::ptp (
|
|||
-> exec { 'disable-phc2sys':
|
||||
command => '/usr/bin/systemctl disable phc2sys.service',
|
||||
}
|
||||
exec { 'stop-ptp4l':
|
||||
-> exec { 'stop-ptp4l':
|
||||
command => '/usr/bin/systemctl stop ptp4l.service',
|
||||
}
|
||||
-> exec { 'stop-phc2sys':
|
||||
|
@ -84,3 +102,7 @@ class platform::ptp (
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
class platform::ptp::runtime {
|
||||
class { 'platform::ptp': runtime => true }
|
||||
}
|
||||
|
|
|
@ -672,6 +672,41 @@ class platform::sm
|
|||
command => 'sm-provision service registry-token-server',
|
||||
}
|
||||
|
||||
# Even when ceph is not configured, service domain members must be present
|
||||
# because we can't configure them at runtime.
|
||||
exec { 'Provision (service-domain-member storage-services)':
|
||||
command => 'sm-provision service-domain-member controller storage-services',
|
||||
}
|
||||
-> exec { 'Provision (service-group storage-services)':
|
||||
command => 'sm-provision service-group storage-services',
|
||||
}
|
||||
-> exec { 'Provision (service-domain-member storage-monitoring-services':
|
||||
command => 'sm-provision service-domain-member controller storage-monitoring-services',
|
||||
}
|
||||
-> exec { 'Provision service-group storage-monitoring-services':
|
||||
command => 'sm-provision service-group storage-monitoring-services',
|
||||
}
|
||||
|
||||
# On an AIO-DX system, cephmon DRBD must always be configured, even
|
||||
# if ceph is not enabled. Configured, but not enabled services have
|
||||
# no impact on the system
|
||||
if $system_type == 'All-in-one' and 'duplex' in $system_mode {
|
||||
Exec['Provision service-group storage-monitoring-services']
|
||||
-> exec { 'Configure Cephmon DRBD':
|
||||
command => "sm-configure service_instance drbd-cephmon drbd-cephmon:${hostunit} \"drbd_resource=${cephmon_drbd_resource}\"",
|
||||
}
|
||||
-> exec { 'Configure Cephmon FileSystem':
|
||||
command => "sm-configure service_instance cephmon-fs cephmon-fs \"device=${cephmon_fs_device},directory=${cephmon_fs_directory},options=noatime,nodiratime,fstype=ext4,check_level=20\"",
|
||||
}
|
||||
-> exec { 'Configure cephmon':
|
||||
command => "sm-configure service_instance ceph-mon ceph-mon \"\"",
|
||||
}
|
||||
-> exec { 'Configure ceph-osd':
|
||||
command => "sm-configure service_instance ceph-osd ceph-osd \"\"",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Barbican
|
||||
exec { 'Provision OpenStack - Barbican API (service-group-member)':
|
||||
command => 'sm-provision service-group-member cloud-services barbican-api',
|
||||
|
@ -694,52 +729,23 @@ class platform::sm
|
|||
|
||||
if $ceph_configured {
|
||||
if $system_type == 'All-in-one' and 'duplex' in $system_mode {
|
||||
exec { 'Provision Cephmon FS in SM (service-group-member cephmon-fs)':
|
||||
Exec['Configure ceph-osd']
|
||||
-> exec { 'Provision Cephmon FS in SM (service-group-member cephmon-fs)':
|
||||
command => 'sm-provision service-group-member controller-services cephmon-fs',
|
||||
}
|
||||
-> exec { 'Provision Cephmon FS in SM (service cephmon-fs)':
|
||||
command => 'sm-provision service cephmon-fs',
|
||||
}
|
||||
-> exec { 'Provision Cephmon DRBD in SM (service-group-member drbd-cephmon':
|
||||
command => 'sm-provision service-group-member controller-services drbd-cephmon',
|
||||
}
|
||||
-> exec { 'Provision Cephmon DRBD in SM (service drbd-cephmon)':
|
||||
command => 'sm-provision service drbd-cephmon',
|
||||
}
|
||||
-> exec { 'Configure Cephmon DRBD':
|
||||
command => "sm-configure service_instance drbd-cephmon drbd-cephmon:${hostunit} \"drbd_resource=${cephmon_drbd_resource}\"",
|
||||
}
|
||||
-> exec { 'Configure Cephmon FileSystem':
|
||||
command => "sm-configure service_instance cephmon-fs cephmon-fs \"device=${cephmon_fs_device},directory=${cephmon_fs_directory},options=noatime,nodiratime,fstype=ext4,check_level=20\"",
|
||||
}
|
||||
-> exec { 'Configure cephmon':
|
||||
command => "sm-configure service_instance ceph-mon ceph-mon \"\"",
|
||||
}
|
||||
-> exec { 'Provision cephmon (service-group-member)':
|
||||
command => 'sm-provision service-group-member controller-services ceph-mon',
|
||||
}
|
||||
-> exec { 'Provision cephmon (service)':
|
||||
command => 'sm-provision service ceph-mon',
|
||||
}
|
||||
-> exec { 'Configure ceph-osd':
|
||||
command => "sm-configure service_instance ceph-osd ceph-osd \"\"",
|
||||
}
|
||||
-> exec { 'Provision ceph-osd (service-group-member)':
|
||||
command => 'sm-provision service-group-member storage-services ceph-osd',
|
||||
}
|
||||
-> exec { 'Provision ceph-osd (service)':
|
||||
command => 'sm-provision service ceph-osd',
|
||||
}
|
||||
}
|
||||
|
||||
# Ceph mgr RESTful plugin
|
||||
exec { 'Provision mgr-restful-plugin (service-domain-member storage-services)':
|
||||
command => 'sm-provision service-domain-member controller storage-services',
|
||||
}
|
||||
-> exec { 'Provision mgr-restful-plugin (service-group storage-services)':
|
||||
command => 'sm-provision service-group storage-services',
|
||||
}
|
||||
-> exec { 'Provision mgr-restful-plugin (service-group-member mgr-restful-plugin)':
|
||||
exec { 'Provision mgr-restful-plugin (service-group-member mgr-restful-plugin)':
|
||||
command => 'sm-provision service-group-member storage-services mgr-restful-plugin',
|
||||
}
|
||||
-> exec { 'Provision mgr-restful-plugin (service mgr-restful-plugin)':
|
||||
|
@ -747,12 +753,6 @@ class platform::sm
|
|||
}
|
||||
|
||||
# Ceph-Manager
|
||||
-> exec { 'Provision Ceph-Manager (service-domain-member storage-monitoring-services)':
|
||||
command => 'sm-provision service-domain-member controller storage-monitoring-services',
|
||||
}
|
||||
-> exec { 'Provision Ceph-Manager service-group storage-monitoring-services)':
|
||||
command => 'sm-provision service-group storage-monitoring-services',
|
||||
}
|
||||
-> exec { 'Provision Ceph-Manager (service-group-member ceph-manager)':
|
||||
command => 'sm-provision service-group-member storage-monitoring-services ceph-manager',
|
||||
}
|
||||
|
@ -994,3 +994,35 @@ class platform::sm::rgw::runtime {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
class platform::sm::ceph::runtime {
|
||||
$ceph_configured = $::platform::ceph::params::service_enabled
|
||||
$system_mode = $::platform::params::system_mode
|
||||
$system_type = $::platform::params::system_type
|
||||
|
||||
if $ceph_configured {
|
||||
Class['::platform::ceph::monitor'] -> Class[$name]
|
||||
Class['::platform::ceph'] -> Class[$name]
|
||||
|
||||
if $system_type == 'All-in-one' and 'duplex' in $system_mode {
|
||||
exec { 'Provision Cephmon FS in SM --apply (service-group-member cephmon-fs)':
|
||||
command => 'sm-provision service-group-member controller-services cephmon-fs --apply',
|
||||
}
|
||||
-> exec { 'Provision Cephmon DRBD in SM --apply (service-group-member drbd-cephmon':
|
||||
command => 'sm-provision service-group-member controller-services drbd-cephmon --apply',
|
||||
}
|
||||
-> exec { 'Provision cephmon --apply (service-group-member)':
|
||||
command => 'sm-provision service-group-member controller-services ceph-mon --apply',
|
||||
}
|
||||
-> exec { 'Provision ceph-osd --apply (service-group-member)':
|
||||
command => 'sm-provision service-group-member storage-services ceph-osd --apply',
|
||||
}
|
||||
}
|
||||
exec { 'Provision mgr-restful-plugin --apply (service-group-member mgr-restful-plugin)':
|
||||
command => 'sm-provision service-group-member storage-services mgr-restful-plugin --apply',
|
||||
}
|
||||
-> exec { 'Provision Ceph-Manager --apply (service-group-member ceph-manager)':
|
||||
command => 'sm-provision service-group-member storage-monitoring-services ceph-manager --apply',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,8 +78,6 @@ oom_score = 0
|
|||
conf_template = ""
|
||||
[plugins.cri.registry]
|
||||
[plugins.cri.registry.mirrors]
|
||||
[plugins.cri.registry.mirrors."docker.io"]
|
||||
endpoint = ["https://registry-1.docker.io"]
|
||||
# Begin of insecure registries
|
||||
<%- @insecure_registries.each do |insecure_registry| -%>
|
||||
[plugins.cri.registry.mirrors."<%= insecure_registry %>"]
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
<%# Kubeadm stores the cluster configuration as a configmap in the cluster. -%>
|
||||
<%# We will change that configmap to include/remove kube-apiserver parameters. -%>
|
||||
<%# In order to restart kube-apiserver, we will use the "kubeadm init phase" -%>
|
||||
<%# command and feed it the output of "kubeadm config view". -%>
|
||||
<%# This keeps the configmap consistent and keeps kube-apiserver managed by kubeadm. -%>
|
||||
umask 077; touch <%= @configmap_temp_file %>
|
||||
umask 077; touch <%= @configview_temp_file %>
|
||||
kubectl --kubeconfig=/etc/kubernetes/admin.conf get configmap kubeadm-config -o yaml -n kube-system > <%= @configmap_temp_file %>
|
||||
python /usr/share/puppet/modules/platform/files/change_kube_apiserver_params.py \
|
||||
--configmap_file <%= @configmap_temp_file %> \
|
||||
<%- if @oidc_issuer_url -%>
|
||||
--oidc_issuer_url <%= @oidc_issuer_url %> \
|
||||
<%- end -%>
|
||||
<%- if @oidc_client_id -%>
|
||||
--oidc_client_id <%= @oidc_client_id %> \
|
||||
<%- end -%>
|
||||
<%- if @oidc_username_claim -%>
|
||||
--oidc_username_claim <%= @oidc_username_claim %> \
|
||||
<%- end -%>
|
||||
<%- if @oidc_groups_claim -%>
|
||||
--oidc_groups_claim <%= @oidc_groups_claim %> \
|
||||
<%- end -%>
|
||||
|
||||
kubectl --kubeconfig=/etc/kubernetes/admin.conf -n kube-system patch configmap kubeadm-config -p "$(cat <%= @configmap_temp_file %>)"
|
||||
kubeadm config view > <%= @configmap_temp_file %>
|
||||
kubeadm init phase control-plane apiserver --config <%= @configmap_temp_file %>
|
||||
rm <%= @configmap_temp_file %>
|
||||
rm <%= @configview_temp_file %>
|
|
@ -1,2 +1,2 @@
|
|||
# Overrides config file for kubelet
|
||||
KUBELET_EXTRA_ARGS=--cni-bin-dir=<%= @k8s_cni_bin_dir %> --node-ip=<%= @node_ip %> <%= @k8s_cpu_manager_opts %> --container-runtime=remote --container-runtime-endpoint=unix:///var/run/containerd/containerd.sock
|
||||
KUBELET_EXTRA_ARGS=--cni-bin-dir=<%= @k8s_cni_bin_dir %> --node-ip=<%= @node_ip %> --volume-plugin-dir=<%= @k8s_vol_plugin_dir %> <%= @k8s_cpu_manager_opts %> --container-runtime=remote --container-runtime-endpoint=unix:///var/run/containerd/containerd.sock
|
||||
|
|
|
@ -1 +1 @@
|
|||
OPTIONS="-a -r -E linreg -R 10 -u 600"
|
||||
OPTIONS="-a -r -f /etc/ptp4l.conf <%= @phc2sys_cmd_opts %>"
|
||||
|
|
|
@ -5,7 +5,7 @@ After=ptp4l.service
|
|||
[Service]
|
||||
Type=simple
|
||||
EnvironmentFile=-/etc/sysconfig/phc2sys
|
||||
ExecStart=-/usr/sbin/phc2sys $OPTIONS
|
||||
ExecStart=/usr/sbin/phc2sys $OPTIONS
|
||||
ExecStartPost=/bin/bash -c 'echo $MAINPID > /var/run/phc2sys.pid'
|
||||
ExecStopPost=/bin/rm -f /var/run/phc2sys.pid
|
||||
Restart=on-failure
|
||||
|
|
|
@ -2,100 +2,15 @@
|
|||
#
|
||||
# Default Data Set
|
||||
#
|
||||
twoStepFlag 1
|
||||
<%- if @slave_only == true -%>
|
||||
slaveOnly 1
|
||||
<%- else -%>
|
||||
slaveOnly 0
|
||||
<%- end -%>
|
||||
priority1 128
|
||||
priority2 128
|
||||
domainNumber 0
|
||||
#utc_offset 37
|
||||
clockClass 248
|
||||
clockAccuracy 0xFE
|
||||
offsetScaledLogVariance 0xFFFF
|
||||
free_running 0
|
||||
freq_est_interval 1
|
||||
dscp_event 0
|
||||
dscp_general 0
|
||||
#
|
||||
# Port Data Set
|
||||
#
|
||||
logAnnounceInterval 1
|
||||
logSyncInterval 0
|
||||
logMinDelayReqInterval 0
|
||||
logMinPdelayReqInterval 0
|
||||
announceReceiptTimeout 3
|
||||
syncReceiptTimeout 0
|
||||
delayAsymmetry 0
|
||||
fault_reset_interval 4
|
||||
neighborPropDelayThresh 20000000
|
||||
#
|
||||
# Run time options
|
||||
#
|
||||
assume_two_step 0
|
||||
logging_level 6
|
||||
path_trace_enabled 0
|
||||
follow_up_info 0
|
||||
hybrid_e2e 0
|
||||
tx_timestamp_timeout 20
|
||||
use_syslog 1
|
||||
verbose 0
|
||||
summary_interval 6
|
||||
kernel_leap 1
|
||||
check_fup_sync 0
|
||||
#
|
||||
# Servo Options
|
||||
#
|
||||
pi_proportional_const 0.0
|
||||
pi_integral_const 0.0
|
||||
pi_proportional_scale 0.0
|
||||
pi_proportional_exponent -0.3
|
||||
pi_proportional_norm_max 0.7
|
||||
pi_integral_scale 0.0
|
||||
pi_integral_exponent 0.4
|
||||
pi_integral_norm_max 0.3
|
||||
step_threshold 0.0
|
||||
first_step_threshold 0.00002
|
||||
max_frequency 900000000
|
||||
clock_servo linreg
|
||||
sanity_freq_limit 200000000
|
||||
ntpshm_segment 0
|
||||
#
|
||||
# Transport options
|
||||
#
|
||||
transportSpecific 0x0
|
||||
ptp_dst_mac 01:1B:19:00:00:00
|
||||
p2p_dst_mac 01:80:C2:00:00:0E
|
||||
udp_ttl 1
|
||||
udp6_scope 0x0E
|
||||
uds_address /var/run/ptp4l
|
||||
#
|
||||
# Default interface options
|
||||
#
|
||||
network_transport L2
|
||||
delay_mechanism <%= scope['platform::ptp::mechanism'].upcase %>
|
||||
time_stamping <%= scope['platform::ptp::mode'].downcase %>
|
||||
tsproc_mode filter
|
||||
delay_filter moving_median
|
||||
delay_filter_length 10
|
||||
egressLatency 0
|
||||
ingressLatency 0
|
||||
<%- if scope['platform::ptp::mode'].downcase == 'hardware' -%>
|
||||
boundary_clock_jbod 1
|
||||
<%- else -%>
|
||||
boundary_clock_jbod 0
|
||||
<%- @ptp4l_options.each do |option| -%>
|
||||
<%= option['name'] %> <%= option['value'] %>
|
||||
<%- end -%>
|
||||
#
|
||||
# Clock description
|
||||
#
|
||||
productDescription ;;
|
||||
revisionData ;;
|
||||
manufacturerIdentity 00:00:00
|
||||
userDescription ;
|
||||
timeSource 0xA0
|
||||
#
|
||||
# Slave devices
|
||||
#
|
||||
<%- if @slave_devices -%>
|
||||
|
|
|
@ -6,7 +6,7 @@ Wants=network-online.target
|
|||
[Service]
|
||||
Type=simple
|
||||
EnvironmentFile=-/etc/sysconfig/ptp4l
|
||||
ExecStart=-/usr/sbin/ptp4l $OPTIONS
|
||||
ExecStart=/usr/sbin/ptp4l $OPTIONS
|
||||
ExecStartPost=/bin/bash -c 'echo $MAINPID > /var/run/ptp4l.pid'
|
||||
ExecStopPost=/bin/rm -f /var/run/ptp4l.pid
|
||||
Restart=on-failure
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
echo 0 > /sys/bus/pci/devices/<%= @pf_addr %>/sriov_numvfs; echo <%= @num_vfs -%> > /sys/bus/pci/devices/<%= @pf_addr %>/sriov_numvfs
|
|
@ -0,0 +1,237 @@
|
|||
[MASTER]
|
||||
# Specify a configuration file.
|
||||
rcfile=pylint.rc
|
||||
|
||||
# Python code to execute, usually for sys.path manipulation such as
|
||||
# pygtk.require().
|
||||
#init-hook=
|
||||
|
||||
# Add files or directories to the blacklist. Should be base names, not paths.
|
||||
ignore=
|
||||
|
||||
# Pickle collected data for later comparisons.
|
||||
persistent=yes
|
||||
|
||||
# List of plugins (as comma separated values of python modules names) to load,
|
||||
# usually to register additional checkers.
|
||||
load-plugins=
|
||||
|
||||
# Use multiple processes to speed up Pylint.
|
||||
jobs=4
|
||||
|
||||
# Allow loading of arbitrary C extensions. Extensions are imported into the
|
||||
# active Python interpreter and may run arbitrary code.
|
||||
unsafe-load-any-extension=no
|
||||
|
||||
# A comma-separated list of package or module names from where C extensions may
|
||||
# be loaded. Extensions are loading into the active Python interpreter and may
|
||||
# run arbitrary code
|
||||
extension-pkg-whitelist=lxml.etree,greenlet
|
||||
|
||||
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
# Enable the message, report, category or checker with the given id(s). You can
|
||||
# either give multiple identifier separated by comma (,) or put this option
|
||||
# multiple time.
|
||||
#enable=
|
||||
|
||||
# Disable the message, report, category or checker with the given id(s). You
|
||||
# can either give multiple identifier separated by comma (,) or put this option
|
||||
# multiple time (only on the command line, not in the configuration file where
|
||||
# it should appear only once).
|
||||
# See "Messages Control" section of
|
||||
# https://pylint.readthedocs.io/en/latest/user_guide
|
||||
# We are disabling (C)onvention
|
||||
disable=C,
|
||||
|
||||
[REPORTS]
|
||||
# Set the output format. Available formats are text, parseable, colorized, msvs
|
||||
# (visual studio) and html
|
||||
output-format=text
|
||||
|
||||
# Put messages in a separate file for each module / package specified on the
|
||||
# command line instead of printing them on stdout. Reports (if any) will be
|
||||
# written in a file name "pylint_global.[txt|html]".
|
||||
files-output=no
|
||||
|
||||
# Tells whether to display a full report or only the messages
|
||||
reports=yes
|
||||
|
||||
# Python expression which should return a note less than 10 (10 is the highest
|
||||
# note). You have access to the variables errors warning, statement which
|
||||
# respectively contain the number of errors / warnings messages and the total
|
||||
# number of statements analyzed. This is used by the global evaluation report
|
||||
# (RP0004).
|
||||
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
|
||||
|
||||
|
||||
[SIMILARITIES]
|
||||
# Minimum lines number of a similarity.
|
||||
min-similarity-lines=4
|
||||
|
||||
# Ignore comments when computing similarities.
|
||||
ignore-comments=yes
|
||||
|
||||
# Ignore docstrings when computing similarities.
|
||||
ignore-docstrings=yes
|
||||
|
||||
|
||||
[FORMAT]
|
||||
# Maximum number of characters on a single line.
|
||||
max-line-length=85
|
||||
|
||||
# Maximum number of lines in a module
|
||||
max-module-lines=1000
|
||||
|
||||
# String used as indentation unit. This is usually 4 spaces or "\t" (1 tab).
|
||||
indent-string=' '
|
||||
|
||||
|
||||
[TYPECHECK]
|
||||
# Tells whether missing members accessed in mixin class should be ignored. A
|
||||
# mixin class is detected if its name ends with "mixin" (case insensitive).
|
||||
ignore-mixin-members=yes
|
||||
|
||||
# List of module names for which member attributes should not be checked
|
||||
# (useful for modules/projects where namespaces are manipulated during runtime
|
||||
# and thus existing member attributes cannot be deduced by static analysis
|
||||
ignored-modules=distutils,eventlet.green.subprocess,six,six.moves
|
||||
|
||||
# List of classes names for which member attributes should not be checked
|
||||
# (useful for classes with attributes dynamically set).
|
||||
# pylint is confused by sqlalchemy Table, as well as sqlalchemy Enum types
|
||||
# ie: (unprovisioned, identity)
|
||||
# LookupDict in requests library confuses pylint
|
||||
ignored-classes=SQLObject, optparse.Values, thread._local, _thread._local,
|
||||
Table, unprovisioned, identity, LookupDict
|
||||
|
||||
# List of members which are set dynamically and missed by pylint inference
|
||||
# system, and so shouldn't trigger E0201 when accessed. Python regular
|
||||
# expressions are accepted.
|
||||
generated-members=REQUEST,acl_users,aq_parent
|
||||
|
||||
|
||||
[BASIC]
|
||||
# List of builtins function names that should not be used, separated by a comma
|
||||
bad-functions=map,filter,apply,input
|
||||
|
||||
# Regular expression which should only match correct module names
|
||||
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
|
||||
|
||||
# Regular expression which should only match correct module level names
|
||||
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
|
||||
|
||||
# Regular expression which should only match correct class names
|
||||
class-rgx=[A-Z_][a-zA-Z0-9]+$
|
||||
|
||||
# Regular expression which should only match correct function names
|
||||
function-rgx=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Regular expression which should only match correct method names
|
||||
method-rgx=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Regular expression which should only match correct instance attribute names
|
||||
attr-rgx=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Regular expression which should only match correct argument names
|
||||
argument-rgx=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Regular expression which should only match correct variable names
|
||||
variable-rgx=[a-z_][a-z0-9_]{2,30}$
|
||||
|
||||
# Regular expression which should only match correct list comprehension /
|
||||
# generator expression variable names
|
||||
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
|
||||
|
||||
# Good variable names which should always be accepted, separated by a comma
|
||||
good-names=i,j,k,ex,Run,_
|
||||
|
||||
# Bad variable names which should always be refused, separated by a comma
|
||||
bad-names=foo,bar,baz,toto,tutu,tata
|
||||
|
||||
# Regular expression which should only match functions or classes name which do
|
||||
# not require a docstring
|
||||
no-docstring-rgx=__.*__
|
||||
|
||||
|
||||
[MISCELLANEOUS]
|
||||
# List of note tags to take in consideration, separated by a comma.
|
||||
notes=FIXME,XXX,TODO
|
||||
|
||||
|
||||
[VARIABLES]
|
||||
# Tells whether we should check for unused import in __init__ files.
|
||||
init-import=no
|
||||
|
||||
# A regular expression matching the beginning of the name of dummy variables
|
||||
# (i.e. not used).
|
||||
dummy-variables-rgx=_|dummy
|
||||
|
||||
# List of additional names supposed to be defined in builtins. Remember that
|
||||
# you should avoid to define new builtins when possible.
|
||||
additional-builtins=
|
||||
|
||||
|
||||
[IMPORTS]
|
||||
# Deprecated modules which should not be used, separated by a comma
|
||||
deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
|
||||
|
||||
# Create a graph of every (i.e. internal and external) dependencies in the
|
||||
# given file (report RP0402 must not be disabled)
|
||||
import-graph=
|
||||
|
||||
# Create a graph of external dependencies in the given file (report RP0402 must
|
||||
# not be disabled)
|
||||
ext-import-graph=
|
||||
|
||||
# Create a graph of internal dependencies in the given file (report RP0402 must
|
||||
# not be disabled)
|
||||
int-import-graph=
|
||||
|
||||
|
||||
[DESIGN]
|
||||
# Maximum number of arguments for function / method
|
||||
max-args=5
|
||||
|
||||
# Argument names that match this expression will be ignored. Default to name
|
||||
# with leading underscore
|
||||
ignored-argument-names=_.*
|
||||
|
||||
# Maximum number of locals for function / method body
|
||||
max-locals=15
|
||||
|
||||
# Maximum number of return / yield for function / method body
|
||||
max-returns=6
|
||||
|
||||
# Maximum number of branch for function / method body
|
||||
max-branchs=12
|
||||
|
||||
# Maximum number of statements in function / method body
|
||||
max-statements=50
|
||||
|
||||
# Maximum number of parents for a class (see R0901).
|
||||
max-parents=7
|
||||
|
||||
# Maximum number of attributes for a class (see R0902).
|
||||
max-attributes=7
|
||||
|
||||
# Minimum number of public methods for a class (see R0903).
|
||||
min-public-methods=2
|
||||
|
||||
# Maximum number of public methods for a class (see R0904).
|
||||
max-public-methods=20
|
||||
|
||||
|
||||
[CLASSES]
|
||||
# List of method names used to declare (i.e. assign) instance attributes.
|
||||
defining-attr-methods=__init__,__new__,setUp
|
||||
|
||||
# List of valid names for the first argument in a class method.
|
||||
valid-classmethod-first-arg=cls
|
||||
|
||||
|
||||
[EXCEPTIONS]
|
||||
# Exceptions that will emit a warning when being caught. Defaults to
|
||||
# "Exception"
|
||||
overgeneral-exceptions=Exception
|
31
tox.ini
31
tox.ini
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = linters
|
||||
envlist = linters,pep8,pylint
|
||||
minversion = 2.3
|
||||
skipsdist = True
|
||||
sitepackages=False
|
||||
|
@ -52,3 +52,32 @@ commands =
|
|||
| xargs -0 puppet-lint --fail-on-warnings {[testenv:linters]skip_tests}"
|
||||
{[testenv:bashate]commands}
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
usedevelop = False
|
||||
description =
|
||||
Run style checks.
|
||||
|
||||
|
||||
commands =
|
||||
flake8 puppet-manifests/src/modules/platform/files
|
||||
|
||||
[testenv:pylint]
|
||||
basepython = python3
|
||||
sitepackages = False
|
||||
|
||||
deps = {[testenv]deps}
|
||||
ruamel.yaml
|
||||
pylint
|
||||
commands =
|
||||
pylint {posargs} --rcfile=./pylint.rc puppet-manifests
|
||||
|
||||
[flake8]
|
||||
# E123, E125 skipped as they are invalid PEP-8.
|
||||
# E501 skipped because some of the code files include templates
|
||||
# that end up quite wide
|
||||
# H405: multi line docstring summary not separated with an empty line
|
||||
show-source = True
|
||||
ignore = E123,E125,E501,H405,W504
|
||||
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,release-tag-*
|
||||
|
||||
|
|
Loading…
Reference in New Issue