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

old bug of issue #41008 reappeared in ansible 2.9 #69431

Closed
marconsys opened this issue May 11, 2020 · 2 comments
Closed

old bug of issue #41008 reappeared in ansible 2.9 #69431

marconsys opened this issue May 11, 2020 · 2 comments
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. support:core This issue/PR relates to code supported by the Ansible Engineering Team. traceback This issue/PR includes a traceback.

Comments

@marconsys
Copy link

SUMMARY

The ovirt_disks module does not reliably extend disks when they are specified by name and vm_name. If two disks exist that share the same name, then the first result is always selected.

The passed vm_name should be used to filter the search results and select the correct disk.

Bug was already reported on ansible 2.5 with issue #41008 and resolved in 2018 with ansible 2.6.
But it reappeared in ansible 2.9 and was present in all minor releases.
Had to downgrade till 2.8.11 to find a working release. So it seems on 2.8 the bug wasn't there.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

ovirt_disks

ANSIBLE VERSION
  config file = /home/manny/ovirttest/ansible.cfg
  configured module search path = [u'/home/manny/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /home/manny/venv-ansible/local/lib/python2.7/site-packages/ansible
  executable location = /home/manny/venv-ansible/bin/ansible
  python version = 2.7.17 (default, Nov  7 2019, 10:07:09) [GCC 9.2.1 20191008]
CONFIGURATION
DEFAULT_HOST_LIST(/home/manny/ovirttest/ansible.cfg) = [u'/home/manny/ovirttest/hosts']
DEFAULT_PRIVATE_KEY_FILE(/home/manny/ovirttest/ansible.cfg) = /home/manny/.ssh/id_rsa
DEFAULT_REMOTE_USER(/home/manny/ovirttest/ansible.cfg) = ansible
DEFAULT_TIMEOUT(/home/manny/ovirttest/ansible.cfg) = 60
DEFAULT_VAULT_PASSWORD_FILE(/home/manny/ovirttest/ansible.cfg) = /home/manny/.vault_ovirttest
HOST_KEY_CHECKING(/home/manny/ovirttest/ansible.cfg) = False
RETRY_FILES_ENABLED(/home/manny/ovirttest/ansible.cfg) = False
OS / ENVIRONMENT

Running from: Ubuntu 19.10
Managing: RHV 4.3

STEPS TO REPRODUCE
  ovirt_disk:
    vm_name: 'the-vm'
    name: 'root-disk'
    size: '32GiB'
    interface: virtio_scsi
    storage_domain: vm_storage
    bootable: yes
    auth: '{{ rhv_auth }}'

EXPECTED RESULTS

The disk to be expanded.

ACTUAL RESULTS

The wrong disk is "found" and ovirt attempts expansion (unsuccessfully, in this case).

Traceback (most recent call last):
  File "/tmp/ansible_ovirt_disk_payload_YZT59A/ansible_ovirt_disk_payload.zip/ansible/modules/cloud/ovirt/ovirt_disk.py", line 791, in main
  File "/tmp/ansible_ovirt_disk_payload_YZT59A/ansible_ovirt_disk_payload.zip/ansible/module_utils/ovirt.py", line 623, in create
    **kwargs
  File "/home/manny/.local/lib/python2.7/site-packages/ovirtsdk4/services.py", line 6985, in add
    return self._internal_add(attachment, headers, query, wait)
  File "/home/manny/.local/lib/python2.7/site-packages/ovirtsdk4/service.py", line 232, in _internal_add
    return future.wait() if wait else future
  File "/home/manny/.local/lib/python2.7/site-packages/ovirtsdk4/service.py", line 55, in wait
    return self._code(response)
  File "/home/manny/.local/lib/python2.7/site-packages/ovirtsdk4/service.py", line 229, in callback
    self._check_fault(response)
  File "/home/manny/.local/lib/python2.7/site-packages/ovirtsdk4/service.py", line 132, in _check_fault
    self._raise_error(response, body)
  File "/home/manny/.local/lib/python2.7/site-packages/ovirtsdk4/service.py", line 118, in _raise_error
    raise error
Error: Fault reason is "Operation Failed". Fault detail is "[Cannot attach Virtual Disk. The disk is not shareable and is already attached to a VM.]". HTTP response code is 409.
failed: [localhost] (item={u'group': u'logging', u'name': u'logger05', u'ram': u'16GiB', u'net2_addr': u'10.12.126.15', u'net1_addr': u'10.12.125.15', u'net3_addr': u'10.12.231.206', u'net0_addr': u'10.12.124.15', u'processors': 4}) => {
    "ansible_loop_var": "item",
    "changed": false,
    "invocation": {
        "module_args": {
            "activate": true,
            "auth": {
                "ca_file": null,
                "compress": true,
                "headers": null,
                "insecure": true,
                "kerberos": false,
                "timeout": 0,
                "token": "HX3lA90SCgpsJx9lXACZLHCR3Uv4SzphOV2lkPkbN93zrfzbTTpAIweq4YEfrY08X18N4oV51GB7FJ-Z6nC5qw",
                "url": "https://labengine.hk093znit.lab/ovirt-engine/api"
            },
            "bootable": null,
            "content_type": "data",
            "description": null,
            "download_image_path": null,
            "fetch_nested": false,
            "force": false,
            "format": "cow",
            "host": null,
            "id": "026b7c41-b186-46ff-a9a3-72fb0a1e4a50",
            "image_provider": null,
            "interface": "virtio_scsi",
            "logical_unit": null,
            "name": "logger-vm_Disk2",
            "nested_attributes": [],
            "openstack_volume_type": null,
            "poll_interval": 3,
            "profile": null,
            "quota_id": null,
            "shareable": null,
            "size": "500GiB",
            "sparse": true,
            "sparsify": null,
            "state": "present",
            "storage_domain": "vm_storage",
            "storage_domains": null,
            "timeout": 180,
            "upload_image_path": null,
            "vm_id": null,
            "vm_name": "logger05",
            "wait": true,
            "wipe_after_delete": null
        }
    },
    "item": {
        "group": "logging",
        "name": "logger05",
        "net0_addr": "10.12.124.15",
        "net1_addr": "10.12.125.15",
        "net2_addr": "10.12.126.15",
        "net3_addr": "10.12.231.206",
        "processors": 4,
        "ram": "16GiB"
    },
    "msg": "Fault reason is \"Operation Failed\". Fault detail is \"[Cannot attach Virtual Disk. The disk is not shareable and is already attached to a VM.]\". HTTP response code is 409."
}

@ansibot
Copy link
Contributor

ansibot commented May 11, 2020

Files identified in the description:
None

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 ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. traceback This issue/PR includes a traceback. labels May 11, 2020
@sivel
Copy link
Member

sivel commented May 11, 2020

Thank you very much for your interest in Ansible. This plugin is no longer maintained in this repository and has been migrated to https://github.com/oVirt/ovirt-ansible-collection

Please re-submit this issue in the above repository.

If you have further questions please stop by IRC or the mailing list:

@sivel sivel closed this as completed May 11, 2020
@mkrizek mkrizek removed the needs_triage Needs a first human triage before being processed. label May 12, 2020
@ansible ansible locked and limited conversation to collaborators Jun 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. support:core This issue/PR relates to code supported by the Ansible Engineering Team. traceback This issue/PR includes a traceback.
Projects
None yet
Development

No branches or pull requests

4 participants