Description
What happened?
Hello,
An assertion is raised when API servers version is not equal to the git version object apiserver_response.json.gitVersion
The gitVersion value contains a leading 'v', but in 2.28.0 version we must remove the leading 'v' (cf. changelog)
file : tests/testcases/010_check-apiserver.yml
task : Check API servers version
Regards,
What did you expect to happen?
Pass test
The test must add a 'v' to compare these objects
How can we reproduce it (as minimally and precisely as possible)?
launch smoketests or check api server.
tests/testcases/010_check-apiserver.yml
OS
Ubuntu 22
Version of Ansible
ansible [core 2.16.14]
config file = /ansible.cfg
configured module search path = ['/library']
ansible python module location = /usr/local/lib/python3.12/dist-packages/ansible
ansible collection location = /usr/share/ansible/collections
executable location = /usr/local/bin/ansible
python version = 3.12.3 (main, Feb 4 2025, 14:48:35) [GCC 13.3.0] (/usr/bin/python3)
jinja version = 3.1.6
libyaml = True
Version of Python
Python 3.12.3
Version of Kubespray (commit)
Network plugin used
calico
Full inventory with variables
Command used to invoke ansible
kubespray.smoke-tests.yml
Output of ansible run
`[task 4651] 18:14:18.673693 D ansible_mitogen.mixins: _remove_tmp_path(None)
ok: [srv003] => {
"msg": {
"buildDate": "2024-12-11T17:59:15Z",
"compiler": "gc",
"gitCommit": "70d3cc986aa8221cd1dfb1121852688902d3bf53",
"gitTreeState": "clean",
"gitVersion": "v1.32.0",
"goVersion": "go1.23.3",
"major": "1",
"minor": "32",
"platform": "linux/amd64"
}
}
[task 4652] 18:14:18.735557 D ansible_mitogen.mixins: _remove_tmp_path(None)
[task 4653] 18:14:18.774317 D ansible_mitogen.mixins: _remove_tmp_path(None)
TASK [Check API servers version] ***********************************************
task path: /kubespray/tests/testcases/010_check-apiserver.yml:18
[task 4654] 18:14:18.813017 D ansible_mitogen.mixins: _remove_tmp_path(None)
fatal: [srv003]: FAILED! => {
"assertion": "apiserver_response.json.gitVersion == kube_version",
"changed": false,
"evaluated_to": false,
"msg": "apiserver version different than expected 1.32.0"
}`
Anything else we need to know
No response