python: Recent changes to v1_node_condition.py causing ValueError for MCEHardwareErrors on Oracle OKE cloud platform
Changes for 23.3.0: https://github.com/kubernetes-client/python/commit/b227345fb27fdee65b3218e0d7af18748d78469d
Includes a hard coded set of conditions which may not include all supported conditions for different cloud providers:
On Oracle’s OKE cloud platform, it includes an additional condition: MCEHardwareErrors
Which is causing a ValueError when the 23.3.0 client is used to list nodes:
File "/usr/local/lib/python3.6/site-packages/kubernetes/client/models/v1_node_condition.py", line 221, in type
.format(type, allowed_values)
ValueError: Invalid value for `type` (MCEHardwareErrors), must be one of ['DiskPressure', 'MemoryPressure', 'NetworkUnavailable', 'PIDPressure',
Node conditions should be more dynamic based on the cloud provider used.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 4
- Comments: 18 (2 by maintainers)
Commits related to this issue
- fix problem from issue https://github.com/kubernetes-client/python/issues/1733 — committed to montikids/kubernetes-client-python by novakivskiy 2 years ago
Is there any mitigation available while a permanent fix is being developed yet?
Same for GCP/GKE:
This is about pod conditions or pod readiness gates, but it looks to me like is has the same root cause as the node condition issue of @koaps
Edit: it happened first after upgrading from 21.7.0 to 23.3.0
I see the change that was breaking it was reverted in https://github.com/kubernetes-client/python/pull/1789
We faced the issue too. We would like to know a workaround until a new version will be released.