Skip to content

[3.2.0] Not Compatible with https://github.com/kubernetes-client/python/releases/tag/v31.0.0 #785

@hswong3i

Description

@hswong3i
SUMMARY

https://github.com/kubernetes-client/python/releases/tag/v31.0.0 released on 2024-09-19, and now officially available from https://pypi.org/project/kubernetes/31.0.0/

When running following playbook with v30.1.0 everything looks good (see https://github.com/alvistack/ansible-collection-kubernetes/blob/8d0e953/playbooks/70-kube_csi_cephfs-verify.yml#L40-L57):

    - name: setup csi-cephfs as default storageclass
      vars:
        ansible_python_interpreter: python3
      kubernetes.core.k8s:
        state: present
        wait: true
        definition:
          apiVersion: storage.k8s.io/v1
          kind: StorageClass
          metadata:
            name: csi-cephfs
            annotations:
              storageclass.kubernetes.io/is-default-class: "true"
      when: inventory_hostname == groups['kube_master'][0]
      register: result
      until: result is succeeded
      changed_when: result is not succeeded
      retries: 60

But it is totally failed when running with v31.0.0; once rolling back to v30.1.0 problem get solved.

ISSUE TYPE
  • Bug Report
COMPONENT NAME
ANSIBLE VERSION
$ ansible --version
ansible [core 2.17.5]
  config file = /home/hswong3i/Documents/alvistack/ansible-collection-kubernetes/ansible.cfg
  configured module search path = ['/home/hswong3i/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3/dist-packages/ansible
  ansible collection location = /home/hswong3i/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.12.7 (main, Oct  3 2024, 15:15:22) [GCC 14.2.0] (/usr/bin/python3)
  jinja version = 3.1.4
  libyaml = True
COLLECTION VERSION
$ ansible-galaxy collection list kubernetes.core

# /usr/lib/python3/dist-packages/ansible_collections
Collection      Version
--------------- -------
kubernetes.core 3.2.0  

# /usr/share/ansible/collections/ansible_collections
Collection      Version
--------------- -------
kubernetes.core 3.2.0
CONFIGURATION
$ ansible-config dump --only-changed
ANSIBLE_FORCE_COLOR(env: ANSIBLE_FORCE_COLOR) = True
ANSIBLE_NOCOWS(/home/hswong3i/Documents/alvistack/ansible-collection-kubernetes/ansible.cfg) = True
CONFIG_FILE() = /home/hswong3i/Documents/alvistack/ansible-collection-kubernetes/ansible.cfg
DEFAULT_FORKS(/home/hswong3i/Documents/alvistack/ansible-collection-kubernetes/ansible.cfg) = 20
DEFAULT_MANAGED_STR(/home/hswong3i/Documents/alvistack/ansible-collection-kubernetes/ansible.cfg) = Ansible managed: Do NOT edit this file manually!
HOST_KEY_CHECKING(/home/hswong3i/Documents/alvistack/ansible-collection-kubernetes/ansible.cfg) = False
INTERPRETER_PYTHON(/home/hswong3i/Documents/alvistack/ansible-collection-kubernetes/ansible.cfg) = auto
RETRY_FILES_ENABLED(/home/hswong3i/Documents/alvistack/ansible-collection-kubernetes/ansible.cfg) = False
OS / ENVIRONMENT
$ cat /etc/os-release 
PRETTY_NAME="Ubuntu 24.10"
NAME="Ubuntu"
VERSION_ID="24.10"
VERSION="24.10 (Oracular Oriole)"
VERSION_CODENAME=oracular
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=oracular
LOGO=ubuntu-logo
STEPS TO REPRODUCE
EXPECTED RESULTS
ACTUAL RESULTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs_infoNeeds additional information from original reporter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions