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_storage_domain: Unable to import domain #583

Open
jwahsnakupaku opened this issue Aug 15, 2022 · 2 comments
Open

ovirt_storage_domain: Unable to import domain #583

jwahsnakupaku opened this issue Aug 15, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@jwahsnakupaku
Copy link

SUMMARY

Hi, I'm trying to import a storage domain on a host I'm rebuilding.
When running the ansible playbook, it doesn't appear to be even attempting it as the error is referencing a missing name parameter for add.

COMPONENT NAME

ovirt_storage_domain: Import existing storage domain.
Running;

  • oVirt engine: 4.4.10.7-1.el8
  • ansible-core: 2.13.2
  • ovirt.ovirt collection: 2.2.2
  • ovirt-engine-sdk-python: 4.5.2 (have tried 4.4.15 as well).
STEPS TO REPRODUCE

Attempt to import a storage domain.

Here is the existing directory I'm trying to import as storage domain.

ls -l /data/images/
total 0
drwxr-xr-x. 5 vdsm kvm 64 Aug 15 15:00 c86e575b-266b-4a62-851b-27863b972a37
-rwxr-xr-x. 1 vdsm kvm  0 Jul  2  2021 __DIRECT_IO_TEST__

Here's the play;

        - name: Import storage domain
          ovirt.ovirt.ovirt_storage_domain:
            auth: "{{ ovirt_auth }}"
            data_center: "dcname"
            state: imported
            host: "hostname"
            id: 'c86e575b-266b-4a62-851b-27863b972a37'
            localfs:
              path: /data/images
EXPECTED RESULTS

Domain imports successfully or at least gives an error relevant to importing a storage domain rather than adding.
I'm able to import through the oVirt UI without issues

ACTUAL RESULTS

Task fails referencing a missing parameter for Add.
Documentation references that name isn't required for state imported.
https://docs.ansible.com/ansible/latest/collections/ovirt/ovirt/ovirt_storage_domain_module.html#parameter-name

TASK [Import storage domain] *************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ovirtsdk4.Error: Fault reason is "Incomplete parameters". Fault detail is "StorageDomain [name] required for add". HTTP response code is 400.
fatal: [hostname.domain.local -> localhost]: FAILED! => {"changed": false, "msg": "Fault reason is \"Incomplete parameters\". Fault detail is \"StorageDomain [name] required for add\". HTTP response code is 400."}

Adding a name parameter, caused it to fail at import (as there is an existing domain present).

TASK [Import storage domain] ******************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ovirtsdk4.Error: Fault reason is "Operation Failed". Fault detail is "[Error in creating a Storage Domain. The selected storage path is not empty (probably contains another Storage Domain). Either remove the existing Storage Domain from this path, or change the Storage path).]". HTTP response code is 400.
fatal: [hostname.domain.local -> localhost]: FAILED! => {"changed": false, "msg": "Fault reason is \"Operation Failed\". Fault detail is \"[Error in creating a Storage Domain. The selected storage path is not empty (probably contains another Storage Domain). Either remove the existing Storage Domain from this path, or change the Storage path).]\". HTTP response code is 400."}
@jwahsnakupaku jwahsnakupaku added the bug Something isn't working label Aug 15, 2022
@mwperina
Copy link
Member

@barpavel could you please take a look?

@barpavel barpavel self-assigned this Aug 16, 2022
@barpavel
Copy link
Member

BTW, added a Jira ticket:
https://issues.redhat.com/browse/RHV-47841

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants