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

Resource disk_from_image fails to upload via imageio proxy. #508

Open
jzandbergen opened this issue Jul 27, 2023 · 2 comments
Open

Resource disk_from_image fails to upload via imageio proxy. #508

jzandbergen opened this issue Jul 27, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jzandbergen
Copy link

Describe the bug

I am unable to upload an image to oVirt 4.5 using the disk_from_image resource. Although a upload from the browser works fine.

When examining the terraform logs I see that the provider is trying to connect to a oVirt node directly instead of the imageio service on the ovirt-engine. This fails since the node is not accessible directly.

I'm wondering i'm missing some configuration somewhere or that this might be expected behaviour...

To Reproduce

terraform {
  required_providers {
    ovirt = {
      source = "oVirt/ovirt"
      version = "2.1.5"
    }
  }
}

provider "ovirt" {
  url = var.ovirt_url
  username  = var.ovirt_username
  password  = var.ovirt_password
  tls_system = true
}

resource "ovirt_disk_from_image" "test" {
  storage_domain_id = var.storage_domain_id
  format           = cow
  alias               = DiskyMcDiskface
  sparse           = true
  source_file    = ./debian-12-genericcloud-amd64.qcow2
}

Expected behavior

Disk successfully created in storage domain.

Kind regards

@jzandbergen jzandbergen added the bug Something isn't working label Jul 27, 2023
@engelmi
Copy link
Collaborator

engelmi commented Jul 31, 2023

Hi @jzandbergen

When examining the terraform logs I see that the provider is trying to connect to a oVirt node directly instead of the imageio service on the ovirt-engine.

That is correct and the expected behavior. The oVirt Terraform Provider (only) uses the API of the engine and, therefore, needs access to upload an image as well. Could you make the ovirt-engine node accessible and check if that problem persists?
Also, there had been an issue with creating qcow disks (see #496) with this provider. Although it has been fixed, there has been no release for it.

@jzandbergen
Copy link
Author

Hi @engelmi thank you very much for your time.

That is correct and the expected behavior. The oVirt Terraform Provider
(only) uses the API of the engine and, therefore, needs access to upload
an image as well.

Could you make the ovirt-engine node accessible and check if that problem
persists?

I think I was unclear in my original message. The ovirt-engine is accessible
although the ovirt nodes (eg. the kvm machines) are not.

So the provider first goes to the ovirt-engine where it successfully "creates" the
disk image. But when it actually tries to send data it tries to send the data
directly to the ovirt nodes (not accessible) instead of the
ovirt-engine (is accessible).

When running this terraform from within the network where the ovirt-nodes
reside it works like it should.

Also, there had been an issue with creating qcow disks (see #496) with this provider. Although it has been fixed, there has been no release for it.

Thanks for the heads up 👍

Regards,

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

2 participants