Page MenuHomePhabricator

Kubernetes dependency upgrade in spicerack
Closed, ResolvedPublic

Description

As part of the parent task, we're preparing to upgrade the cumin hosts to bookworm. See the parent task for the upgrade plan.

The current kubernetes dependency in spicerack is:

"kubernetes==12.0.*",  # frozen to the version available on debian bullseye

Debian bullseye (current cumin hosts) have version 12.0.1.
Debian bookworm has version 22.6.0.
We need to determine if the two versions are compatible with our current code and cookbooks or if we need to make patches to make the code compatible with both versions.

It would be great if someone from serviceops could have a look at the changelog and determine the best course of action.

Quickly running CI with version 22.6.0 reports basically a single error:

spicerack/k8s.py
  Line: 459
    pylint: no-member / Module 'kubernetes.client' has no 'V1beta1Eviction' member (col 15)


FAILED spicerack/tests/unit/test_k8s.py::TestKubernetesNode::test_drain[unschedulable] - AttributeError: module 'kubernetes.client' has no attribute 'V1beta1Eviction'
FAILED spicerack/tests/unit/test_k8s.py::TestKubernetesNode::test_drain_eventually_successful[unschedulable] - AttributeError: module 'kubernetes.client' has no attribute 'V1beta1Eviction'
FAILED spicerack/tests/unit/test_k8s.py::TestKubernetesNode::test_drain_leftover[unschedulable] - AttributeError: module 'kubernetes.client' has no attribute 'V1beta1Eviction'
FAILED spicerack/tests/unit/test_k8s.py::TestKubernetesPod::test_evict - AttributeError: module 'kubernetes.client' has no attribute 'V1beta1Eviction'
FAILED spicerack/tests/unit/test_k8s.py::TestKubernetesPod::test_evict_error - AttributeError: module 'kubernetes.client' has no attribute 'V1beta1Eviction'
FAILED spicerack/tests/unit/test_k8s.py::TestKubernetesPod::test_evict_retry - AttributeError: module 'kubernetes.client' has no attribute 'V1beta1Eviction'

Related Objects

Event Timeline

Change #1139851 had a related patch set uploaded (by Elukey; author: Elukey):

[operations/software/spicerack@master] k8s: rename V1beta1Eviction to support future upgrades

https://gerrit.wikimedia.org/r/1139851

The changelog is very huge, but I think that V1beta1Eviction vs V1Eviction may be our only problem for the moment. I'd be inclined to review/merge the above patch in a new version of spicerack, and test on bookworm.

Change #1139851 merged by jenkins-bot:

[operations/software/spicerack@master] k8s: rename V1beta1Eviction to support future upgrades

https://gerrit.wikimedia.org/r/1139851

elukey claimed this task.