Revert "Add instrumentation log for kubeadm join command"
This reverts commit b1ec6538c6daeb21c01f59b74196b87bf99040ec. Reason for revert: Fix an issue where puppet doesn't stop when a command fails. Also aims to fix kubeadm join failures when unlocking controller-1 after Backup & Restore. This also enforces Zuul to use python 3.9, since it was running tox checks with python 3.12. Closes-bug: 2090224 Change-Id: Iebb76674e45f82563d9901b44cf0afe44a436822
This commit is contained in:
parent
74f90fc674
commit
c2c9a70d97
26
.zuul.yaml
26
.zuul.yaml
@ -5,13 +5,13 @@
|
|||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
- stx-puppet-linters
|
- stx-puppet-linters
|
||||||
- openstack-tox-pep8
|
- stx-puppet-tox-pep8
|
||||||
- openstack-tox-pylint
|
- stx-puppet-tox-pylint
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- stx-puppet-linters
|
- stx-puppet-linters
|
||||||
- openstack-tox-pep8
|
- stx-puppet-tox-pep8
|
||||||
- openstack-tox-pylint
|
- stx-puppet-tox-pylint
|
||||||
post:
|
post:
|
||||||
jobs:
|
jobs:
|
||||||
- stx-stx-puppet-upload-git-mirror
|
- stx-stx-puppet-upload-git-mirror
|
||||||
@ -23,6 +23,24 @@
|
|||||||
Run linters for stx-puppet
|
Run linters for stx-puppet
|
||||||
pre-run: playbooks/tox-puppet-lint/pre.yaml
|
pre-run: playbooks/tox-puppet-lint/pre.yaml
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: stx-puppet-tox-pep8
|
||||||
|
parent: openstack-tox-pep8
|
||||||
|
nodeset: debian-bullseye
|
||||||
|
description: |
|
||||||
|
Run pep8 checks for stx-puppet
|
||||||
|
vars:
|
||||||
|
python_version: 3.9
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: stx-puppet-tox-pylint
|
||||||
|
parent: openstack-tox-pylint
|
||||||
|
nodeset: debian-bullseye
|
||||||
|
description: |
|
||||||
|
Run pylint checks for stx-puppet
|
||||||
|
vars:
|
||||||
|
python_version: 3.9
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: stx-stx-puppet-upload-git-mirror
|
name: stx-stx-puppet-upload-git-mirror
|
||||||
parent: upload-git-mirror
|
parent: upload-git-mirror
|
||||||
|
@ -236,10 +236,9 @@ class platform::kubernetes::cgroup
|
|||||||
define platform::kubernetes::kube_command (
|
define platform::kubernetes::kube_command (
|
||||||
$command,
|
$command,
|
||||||
$logname,
|
$logname,
|
||||||
$environment = [],
|
$environment = undef,
|
||||||
$timeout = undef,
|
$timeout = undef,
|
||||||
$onlyif = undef,
|
$onlyif = undef
|
||||||
$unless = undef
|
|
||||||
) {
|
) {
|
||||||
# Execute kubernetes command with instrumentation.
|
# Execute kubernetes command with instrumentation.
|
||||||
# Note that puppet captures no command output on timeout.
|
# Note that puppet captures no command output on timeout.
|
||||||
@ -251,12 +250,11 @@ define platform::kubernetes::kube_command (
|
|||||||
# by puppet-manifest-apply.sh command.
|
# by puppet-manifest-apply.sh command.
|
||||||
|
|
||||||
exec { "${title}": # lint:ignore:only_variable_string
|
exec { "${title}": # lint:ignore:only_variable_string
|
||||||
environment => $environment,
|
environment => [ $environment ],
|
||||||
provider => shell,
|
provider => shell,
|
||||||
command => "stdbuf -oL -eL ${command} |& tee /var/log/puppet/latest/${logname}",
|
command => "stdbuf -oL -eL ${command} |& tee /var/log/puppet/latest/${logname}",
|
||||||
timeout => $timeout,
|
timeout => $timeout,
|
||||||
onlyif => $onlyif,
|
onlyif => $onlyif,
|
||||||
unless => $unless,
|
|
||||||
logoutput => true,
|
logoutput => true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -453,10 +451,9 @@ class platform::kubernetes::master::init
|
|||||||
local_registry_auth => $local_registry_auth,
|
local_registry_auth => $local_registry_auth,
|
||||||
}
|
}
|
||||||
|
|
||||||
-> platform::kubernetes::kube_command { 'configure master node':
|
-> exec { 'configure master node':
|
||||||
command => $join_cmd,
|
command => $join_cmd,
|
||||||
logname => 'kubeadm-join-command.log',
|
logoutput => true,
|
||||||
timeout => 300,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Update ownership/permissions for file created by "kubeadm init".
|
# Update ownership/permissions for file created by "kubeadm init".
|
||||||
@ -663,11 +660,10 @@ class platform::kubernetes::worker::init
|
|||||||
|
|
||||||
# Configure the worker node. Only do this once, so check whether the
|
# Configure the worker node. Only do this once, so check whether the
|
||||||
# kubelet.conf file has already been created (by the join).
|
# kubelet.conf file has already been created (by the join).
|
||||||
platform::kubernetes::kube_command { 'configure worker node':
|
exec { 'configure worker node':
|
||||||
command => $join_cmd,
|
command => $join_cmd,
|
||||||
logname => 'kubeadm-join-command.log',
|
logoutput => true,
|
||||||
unless => 'test -f /etc/kubernetes/kubelet.conf',
|
unless => 'test -f /etc/kubernetes/kubelet.conf',
|
||||||
timeout => 300,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add kubelet service override
|
# Add kubelet service override
|
||||||
@ -973,7 +969,7 @@ class platform::kubernetes::upgrade_first_control_plane
|
|||||||
command => "kubeadm -v6 upgrade apply ${version} \
|
command => "kubeadm -v6 upgrade apply ${version} \
|
||||||
--allow-experimental-upgrades --allow-release-candidate-upgrades -y",
|
--allow-experimental-upgrades --allow-release-candidate-upgrades -y",
|
||||||
logname => 'kubeadm-upgrade-apply.log',
|
logname => 'kubeadm-upgrade-apply.log',
|
||||||
environment => [ 'KUBECONFIG=/etc/kubernetes/admin.conf' ],
|
environment => 'KUBECONFIG=/etc/kubernetes/admin.conf',
|
||||||
timeout => 210,
|
timeout => 210,
|
||||||
}
|
}
|
||||||
-> exec { 'purge all kubelet-config except most recent':
|
-> exec { 'purge all kubelet-config except most recent':
|
||||||
@ -1033,7 +1029,7 @@ class platform::kubernetes::upgrade_control_plane
|
|||||||
platform::kubernetes::kube_command { 'upgrade_control_plane':
|
platform::kubernetes::kube_command { 'upgrade_control_plane':
|
||||||
command => 'kubeadm -v6 upgrade node',
|
command => 'kubeadm -v6 upgrade node',
|
||||||
logname => 'kubeadm-upgrade-node.log',
|
logname => 'kubeadm-upgrade-node.log',
|
||||||
environment => [ 'KUBECONFIG=/etc/kubernetes/admin.conf:/etc/kubernetes/kubelet.conf' ],
|
environment => 'KUBECONFIG=/etc/kubernetes/admin.conf:/etc/kubernetes/kubelet.conf',
|
||||||
timeout => 210,
|
timeout => 210,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1177,7 +1173,7 @@ class platform::kubernetes::worker::upgrade_kubelet
|
|||||||
# The -v6 gives verbose debug output includes health, GET response, delay.
|
# The -v6 gives verbose debug output includes health, GET response, delay.
|
||||||
command => "/usr/local/kubernetes/${kubeadm_version}/stage1/usr/bin/kubeadm -v6 upgrade node",
|
command => "/usr/local/kubernetes/${kubeadm_version}/stage1/usr/bin/kubeadm -v6 upgrade node",
|
||||||
logname => 'kubeadm-upgrade-node.log',
|
logname => 'kubeadm-upgrade-node.log',
|
||||||
environment => [ 'KUBECONFIG=/etc/kubernetes/kubelet.conf' ],
|
environment => 'KUBECONFIG=/etc/kubernetes/kubelet.conf',
|
||||||
timeout => 300,
|
timeout => 300,
|
||||||
}
|
}
|
||||||
-> Class['platform::kubernetes::mask_stop_kubelet']
|
-> Class['platform::kubernetes::mask_stop_kubelet']
|
||||||
@ -1926,7 +1922,7 @@ class platform::kubernetes::update_kubelet_config::runtime
|
|||||||
platform::kubernetes::kube_command { 'update kubelet config':
|
platform::kubernetes::kube_command { 'update kubelet config':
|
||||||
command => 'kubeadm upgrade node phase kubelet-config',
|
command => 'kubeadm upgrade node phase kubelet-config',
|
||||||
logname => 'kubeadm-upgrade-node-phase-kubelet-config.log',
|
logname => 'kubeadm-upgrade-node-phase-kubelet-config.log',
|
||||||
environment => [ 'KUBECONFIG=/etc/kubernetes/admin.conf:/etc/kubernetes/kubelet.conf' ],
|
environment => 'KUBECONFIG=/etc/kubernetes/admin.conf:/etc/kubernetes/kubelet.conf',
|
||||||
timeout => 60,
|
timeout => 60,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1959,7 +1955,7 @@ class platform::kubernetes::cordon_node {
|
|||||||
--skip-wait-for-delete-timeout=10 \
|
--skip-wait-for-delete-timeout=10 \
|
||||||
--force --timeout=150s",
|
--force --timeout=150s",
|
||||||
logname => 'cordon.log',
|
logname => 'cordon.log',
|
||||||
environment => [ 'KUBECONFIG=/etc/kubernetes/admin.conf:/etc/kubernetes/kubelet.conf' ],
|
environment => 'KUBECONFIG=/etc/kubernetes/admin.conf:/etc/kubernetes/kubelet.conf',
|
||||||
onlyif => "kubectl get node ${::platform::params::hostname}",
|
onlyif => "kubectl get node ${::platform::params::hostname}",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user