Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oVirt: 'NoneType' object has no attribute 'disk_attachments' when modifying existing VMs #71620

Closed
stefan-as opened this issue Sep 3, 2020 · 3 comments

Comments

@stefan-as
Copy link

SUMMARY

When modifying an existing oVirt-VM ovirt_vm fails with error message 'NoneType' object has no attribute 'disk_attachments'.

I assume the bug was introduced by 508ebf2#diff-9415a363b6dea8b0c2cb21bd497654a4. Applying this patch, in function __get_template_with_version there is only a code path left for new VMs and no code path for existing VMs at all, neither with a given template (previous working code), nor with template gathering using the oVirt API. As a result, template is None for all existing VMs.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

modules/cloud/ovirt/ovirt_vm.py

ANSIBLE VERSION

Bug was introduced in Ansible-2.9.3, reproducible with Ansible 2.9.12, probably also existent in newer versions.

CONFIGURATION
DEFAULT_STRATEGY_PLUGIN_PATH(/home/stefan/Dokumente/Develop/deployment/provisioning-ansible/ansible.cfg) = ['/home/stefan/Dokumente/Develop/deployment/provisioning-ansible/lib/plugins/strategy']
INTERPRETER_PYTHON(/home/stefan/Dokumente/Develop/deployment/provisioning-ansible/ansible.cfg) = auto_silent

OS / ENVIRONMENT

reproducible using Arch Linux, Ubuntu Linux, Debian Linux, ...

STEPS TO REPRODUCE
  • Create oVirt VM using ovirt_vm module
  • Change parameter of VM
  • Run ovirt_vm module again
EXPECTED RESULTS

Running VM with modified parameters

ACTUAL RESULTS
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'NoneType' object has no attribute 'disk_attachments'
fatal: [identity-production-worker-01.identity.production.intern.campact.de]: FAILED! => {"changed": false, "msg": "'NoneType' object has no attribute 'disk_attachments'"}
@ansibot
Copy link
Contributor

ansibot commented Sep 3, 2020

Files identified in the description:

  • lib/ansible/modules/cloud/ovirt/ovirt_vm.py

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Sep 3, 2020

Thank you very much for your interest in Ansible. Ansible has migrated much of the content into separate repositories to allow for more rapid, independent development. We are closing this issue/PR because this content has been moved to one or more collection repositories.

For further information, please see:
https://github.com/ansible/ansibullbot/blob/master/docs/collection_migration.md

@stefan-as
Copy link
Author

For future reading: re-created as oVirt/ovirt-ansible-collection#100

@ansible ansible locked and limited conversation to collaborators Oct 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants