StatefulSet fail when using Kubernetes client v23.3.0

Bug #1968960 reported by Ayumu Ueha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kuryr-kubernetes
New
Undecided
Unassigned

Bug Description

The Kubernetes client library has been updated from v22.6.0 to v23.3.0 at openstack/requirements [1].

The following error occurs when using the latest devstack environment:
```
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/kubernetes/client/api_client.py", line 348, in call_api
return self.__call_api(resource_path, method,
  File "/usr/local/lib/python3.8/dist-packages/kubernetes/client/api_client.py", line 192, in __call_api
return_data = self.deserialize(response_data, response_type)
  File "/usr/local/lib/python3.8/dist-packages/kubernetes/client/api_client.py", line 264, in deserialize
return self.__deserialize(data, response_type)
  File "/usr/local/lib/python3.8/dist-packages/kubernetes/client/api_client.py", line 303, in __deserialize
return self.__deserialize_model(data, klass)
  File "/usr/local/lib/python3.8/dist-packages/kubernetes/client/api_client.py", line 639, in __deserialize_model
kwargs[attr] = self.__deserialize(value, attr_type)
  File "/usr/local/lib/python3.8/dist-packages/kubernetes/client/api_client.py", line 303, in __deserialize
return self.__deserialize_model(data, klass)
  File "/usr/local/lib/python3.8/dist-packages/kubernetes/client/api_client.py", line 641, in __deserialize_model
instance = klass(**kwargs)
  File "/usr/local/lib/python3.8/dist-packages/kubernetes/client/models/v1_stateful_set_status.py", line 79, in __init__
self.available_replicas = available_replicas
  File "/usr/local/lib/python3.8/dist-packages/kubernetes/client/models/v1_stateful_set_status.py", line 119, in available_replicas
raise ValueError("Invalid value for `available_replicas`, must not be `None`") # noqa: E501
ValueError: Invalid value for `available_replicas`, must not be `None`
```

This is because kuryr-kubernetes uses Kubernetes v1.22.3 now and it does not return `available_replicas` and fails in added client side validation [2].
To avoid this, the Kubernetes on the kuryr-kubernetes should be upgraded v1.22.6 or later (v1.23.3 is best for client version).

[1] https://opendev.org/openstack/requirements/commit/ebba5ca1181490597366d79416bc65b49aa4450b
[2] https://github.com/kubernetes-client/python/commit/b227345fb27fdee65b3218e0d7af18748d78469d

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.