Skip to content

sap_vm_provision/kubevirt_vm: Provisioning emits “unknown field” warnings for VM spec fields indicating CRD/API mismatch #145

@geetikakay

Description

@geetikakay

role is generating a VM spec that doesn’t match the cluster’s VM CRD. Since i saw these these warnings, it's not easy to trust that the provisioned VM matches the requested config even if Ansible says “changed”.

 TASK [community.sap_infrastructure.sap_vm_provision : Provision KubeVirt Virtual Machine] **********************************************
task path: /home/cloud-user/.ansible/collections/ansible_collections/community/sap_infrastructure/roles/sap_vm_provision/tasks/platform_ansible/kubevirt_vm/execute_provision.yml:257
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: cloud-user
<localhost> EXEC /bin/sh -c 'echo ~cloud-user && sleep 0'
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/cloud-user/.ansible/tmp `"&& mkdir "` echo /home/cloud-user/.ansible/tmp/ansible-tmp-1766143324.243634-2394340-68470504455515 `" && echo ansible-tmp-1766143324.243634-2394340-68470504455515="` echo /home/cloud-user/.ansible/tmp/ansible-tmp-1766143324.243634-2394340-68470504455515 `" ) && sleep 0'
Using module file /home/cloud-user/.ansible/collections/ansible_collections/kubevirt/core/plugins/modules/kubevirt_vm.py
<localhost> PUT /home/cloud-user/.ansible/tmp/ansible-local-2394220lc64x5xr/tmp9wrtwizm TO /home/cloud-user/.ansible/tmp/ansible-tmp-1766143324.243634-2394340-68470504455515/AnsiballZ_kubevirt_vm.py
<localhost> EXEC /bin/sh -c 'chmod u+rwx /home/cloud-user/.ansible/tmp/ansible-tmp-1766143324.243634-2394340-68470504455515/ /home/cloud-user/.ansible/tmp/ansible-tmp-1766143324.243634-2394340-68470504455515/AnsiballZ_kubevirt_vm.py && sleep 0'
<localhost> EXEC /bin/sh -c 'K8S_AUTH_KUBECONFIG=/tmp/ibmc.cnv-qe.rhood.us/bm01-ibm/auth/kubeconfig KUBECONFIG=/tmp/ibmc.cnv-qe.rhood.us/bm01-ibm/auth/kubeconfig /home/cloud-user/gkapoor/sap_july3/venv/bin/python /home/cloud-user/.ansible/tmp/ansible-tmp-1766143324.243634-2394340-68470504455515/AnsiballZ_kubevirt_vm.py && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /home/cloud-user/.ansible/tmp/ansible-tmp-1766143324.243634-2394340-68470504455515/ > /dev/null 2>&1 && sleep 0'
[WARNING]: unknown field "spec.template.spec.domain.devices.disks[0].disk.io"
[WARNING]: unknown field "spec.template.spec.domain.evictionStrategy"
[WARNING]: unknown field "spec.template.spec.domain.hostname"
[WARNING]: unknown field "spec.template.spec.domain.terminationGracePeriodSeconds"
[WARNING]: unknown field "spec.template.spec.volumes[2].disk"
[WARNING]: Deprecation warnings can be disabled by setting `deprecation_warnings=False` in ansible.cfg.
[DEPRECATION WARNING]: Passing `warnings` to `exit_json` or `fail_json` is deprecated. This feature will be removed from ansible-core version 2.23. Use `AnsibleModule.warn` instead.
changed: [worker1 -> localhost] => {

Observed in version
ansible-playbook [core 2.19.2]
python version = 3.11.13 (main, Jun 4 2025, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-7)] (/usr/bin/python)
jinja version = 3.1.6
pyyaml version = 6.0.3 (with libyaml v0.2.5)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions